blob: 070f1ab69d252dc2994909b2e8def98ac57e9560 [file] [log] [blame]
[email protected]5d9cace72012-06-21 16:07:121// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_CHROME_PAGES_H_
6#define CHROME_BROWSER_UI_CHROME_PAGES_H_
[email protected]5d9cace72012-06-21 16:07:127
[email protected]7a19ea22012-08-02 14:39:398#include <string>
9
[email protected]cc1569b2013-10-28 21:29:1010#include "chrome/browser/ui/host_desktop.h"
[email protected]08f71012014-07-25 10:27:5411#include "components/content_settings/core/common/content_settings_types.h"
[email protected]8a585cb2014-03-21 17:13:5212#include "url/gurl.h"
[email protected]5d9cace72012-06-21 16:07:1213
thestigc91176f42014-10-28 20:16:3514#if !defined(OS_ANDROID) && !defined(OS_IOS)
15#include "chrome/browser/signin/signin_promo.h"
16#endif
17
[email protected]5d9cace72012-06-21 16:07:1218class Browser;
19
20namespace content {
21class WebContents;
22}
23
24namespace chrome {
25
26// Sources of requests to show the help tab.
27enum HelpSource {
28 // Keyboard accelerators.
29 HELP_SOURCE_KEYBOARD,
30
31 // Menus (e.g. wrench menu or Chrome OS system menu).
32 HELP_SOURCE_MENU,
33
34 // WebUI (the "About" page).
35 HELP_SOURCE_WEBUI,
36};
37
38
39void ShowBookmarkManager(Browser* browser);
40void ShowBookmarkManagerForNode(Browser* browser, int64 node_id);
41void ShowHistory(Browser* browser);
42void ShowDownloads(Browser* browser);
[email protected]bc9833c32013-02-28 04:05:0843void ShowExtensions(Browser* browser,
44 const std::string& extension_to_highlight);
[email protected]5d9cace72012-06-21 16:07:1245void ShowConflicts(Browser* browser);
[email protected]cc1569b2013-10-28 21:29:1046
47// ShowFeedbackPage() uses |browser| to determine the URL of the current tab.
48// |browser| should be NULL if there are no currently open browser windows.
[email protected]7a19ea22012-08-02 14:39:3949void ShowFeedbackPage(Browser* browser,
50 const std::string& description_template,
51 const std::string& category_tag);
[email protected]5d9cace72012-06-21 16:07:1252
53void ShowHelp(Browser* browser, HelpSource source);
[email protected]cc1569b2013-10-28 21:29:1054void ShowHelpForProfile(Profile* profile,
55 HostDesktopType host_desktop_type,
56 HelpSource source);
[email protected]32d162b2012-12-03 20:31:0857void ShowPolicy(Browser* browser);
[email protected]061f89e2013-08-12 04:50:0058void ShowSlow(Browser* browser);
mlermane6e040a2014-10-31 00:53:2159void ShowMemory(Browser* browser);
[email protected]5d9cace72012-06-21 16:07:1260
[email protected]8a585cb2014-03-21 17:13:5261// Constructs a settings GURL for the specified |sub_page|.
62GURL GetSettingsUrl(const std::string& sub_page);
63
rfrappierc54c6ea2015-07-06 22:52:1164// Returns true if |url| is the URL for the settings subpage |sub_page|.
65bool IsSettingsSubPage(const GURL& url, const std::string& sub_page);
66
[email protected]5f3be2b6a2014-04-18 22:27:3967// Returns true if |browser| is a trusted popup window containing a page with
68// matching |scheme| (or any trusted popup if |scheme| is empty).
69bool IsTrustedPopupWindowWithScheme(const Browser* browser,
70 const std::string& scheme);
71
rfrappierc54c6ea2015-07-06 22:52:1172
[email protected]5d9cace72012-06-21 16:07:1273// Various things that open in a settings UI.
74void ShowSettings(Browser* browser);
75void ShowSettingsSubPage(Browser* browser, const std::string& sub_page);
[email protected]8a585cb2014-03-21 17:13:5276void ShowSettingsSubPageForProfile(Profile* profile,
77 const std::string& sub_page);
msramekb5e676b92015-08-03 11:11:4478void ShowContentSettingsExceptions(Browser* browser,
79 ContentSettingsType content_settings_type);
[email protected]5d9cace72012-06-21 16:07:1280void ShowContentSettings(Browser* browser,
81 ContentSettingsType content_settings_type);
[email protected]8a585cb2014-03-21 17:13:5282void ShowSettingsSubPageInTabbedBrowser(Browser* browser,
83 const std::string& sub_page);
[email protected]5d9cace72012-06-21 16:07:1284void ShowClearBrowsingDataDialog(Browser* browser);
85void ShowPasswordManager(Browser* browser);
86void ShowImportDialog(Browser* browser);
[email protected]5d9cace72012-06-21 16:07:1287void ShowAboutChrome(Browser* browser);
88void ShowSearchEngineSettings(Browser* browser);
thestigc91176f42014-10-28 20:16:3589
90#if !defined(OS_ANDROID) && !defined(OS_IOS)
rockotb2fdf0b2015-01-23 03:42:3591// Initiates signin in a new browser tab.
noms5fb66fe2014-12-17 23:01:1092void ShowBrowserSignin(Browser* browser, signin_metrics::Source source);
rockotb2fdf0b2015-01-23 03:42:3593
94// If the user is already signed in, shows the "Signin" portion of Settings,
95// otherwise initiates signin in a new browser tab.
96void ShowBrowserSigninOrSettings(Browser* browser,
97 signin_metrics::Source source);
thestigc91176f42014-10-28 20:16:3598#endif
[email protected]5d9cace72012-06-21 16:07:1299
[email protected]5d9cace72012-06-21 16:07:12100} // namespace chrome
101
102#endif // CHROME_BROWSER_UI_CHROME_PAGES_H_