Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / ui / chrome_pages.h
blob070f1ab69d252dc2994909b2e8def98ac57e9560
1 // 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.
5 #ifndef CHROME_BROWSER_UI_CHROME_PAGES_H_
6 #define CHROME_BROWSER_UI_CHROME_PAGES_H_
8 #include <string>
10 #include "chrome/browser/ui/host_desktop.h"
11 #include "components/content_settings/core/common/content_settings_types.h"
12 #include "url/gurl.h"
14 #if !defined(OS_ANDROID) && !defined(OS_IOS)
15 #include "chrome/browser/signin/signin_promo.h"
16 #endif
18 class Browser;
20 namespace content {
21 class WebContents;
24 namespace chrome {
26 // Sources of requests to show the help tab.
27 enum HelpSource {
28 // Keyboard accelerators.
29 HELP_SOURCE_KEYBOARD,
31 // Menus (e.g. wrench menu or Chrome OS system menu).
32 HELP_SOURCE_MENU,
34 // WebUI (the "About" page).
35 HELP_SOURCE_WEBUI,
39 void ShowBookmarkManager(Browser* browser);
40 void ShowBookmarkManagerForNode(Browser* browser, int64 node_id);
41 void ShowHistory(Browser* browser);
42 void ShowDownloads(Browser* browser);
43 void ShowExtensions(Browser* browser,
44 const std::string& extension_to_highlight);
45 void ShowConflicts(Browser* browser);
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.
49 void ShowFeedbackPage(Browser* browser,
50 const std::string& description_template,
51 const std::string& category_tag);
53 void ShowHelp(Browser* browser, HelpSource source);
54 void ShowHelpForProfile(Profile* profile,
55 HostDesktopType host_desktop_type,
56 HelpSource source);
57 void ShowPolicy(Browser* browser);
58 void ShowSlow(Browser* browser);
59 void ShowMemory(Browser* browser);
61 // Constructs a settings GURL for the specified |sub_page|.
62 GURL GetSettingsUrl(const std::string& sub_page);
64 // Returns true if |url| is the URL for the settings subpage |sub_page|.
65 bool IsSettingsSubPage(const GURL& url, const std::string& sub_page);
67 // Returns true if |browser| is a trusted popup window containing a page with
68 // matching |scheme| (or any trusted popup if |scheme| is empty).
69 bool IsTrustedPopupWindowWithScheme(const Browser* browser,
70 const std::string& scheme);
73 // Various things that open in a settings UI.
74 void ShowSettings(Browser* browser);
75 void ShowSettingsSubPage(Browser* browser, const std::string& sub_page);
76 void ShowSettingsSubPageForProfile(Profile* profile,
77 const std::string& sub_page);
78 void ShowContentSettingsExceptions(Browser* browser,
79 ContentSettingsType content_settings_type);
80 void ShowContentSettings(Browser* browser,
81 ContentSettingsType content_settings_type);
82 void ShowSettingsSubPageInTabbedBrowser(Browser* browser,
83 const std::string& sub_page);
84 void ShowClearBrowsingDataDialog(Browser* browser);
85 void ShowPasswordManager(Browser* browser);
86 void ShowImportDialog(Browser* browser);
87 void ShowAboutChrome(Browser* browser);
88 void ShowSearchEngineSettings(Browser* browser);
90 #if !defined(OS_ANDROID) && !defined(OS_IOS)
91 // Initiates signin in a new browser tab.
92 void ShowBrowserSignin(Browser* browser, signin_metrics::Source source);
94 // If the user is already signed in, shows the "Signin" portion of Settings,
95 // otherwise initiates signin in a new browser tab.
96 void ShowBrowserSigninOrSettings(Browser* browser,
97 signin_metrics::Source source);
98 #endif
100 } // namespace chrome
102 #endif // CHROME_BROWSER_UI_CHROME_PAGES_H_