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_
10 #include "chrome/browser/ui/host_desktop.h"
11 #include "components/content_settings/core/common/content_settings_types.h"
14 #if !defined(OS_ANDROID) && !defined(OS_IOS)
15 #include "chrome/browser/signin/signin_promo.h"
26 // Sources of requests to show the help tab.
28 // Keyboard accelerators.
31 // Menus (e.g. wrench menu or Chrome OS system menu).
34 // WebUI (the "About" page).
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
,
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 |browser| is a trusted popup window containing a page with
65 // matching |scheme| (or any trusted popup if |scheme| is empty).
66 bool IsTrustedPopupWindowWithScheme(const Browser
* browser
,
67 const std::string
& scheme
);
69 // Various things that open in a settings UI.
70 void ShowSettings(Browser
* browser
);
71 void ShowSettingsSubPage(Browser
* browser
, const std::string
& sub_page
);
72 void ShowSettingsSubPageForProfile(Profile
* profile
,
73 const std::string
& sub_page
);
74 void ShowContentSettings(Browser
* browser
,
75 ContentSettingsType content_settings_type
);
76 void ShowSettingsSubPageInTabbedBrowser(Browser
* browser
,
77 const std::string
& sub_page
);
78 void ShowClearBrowsingDataDialog(Browser
* browser
);
79 void ShowPasswordManager(Browser
* browser
);
80 void ShowImportDialog(Browser
* browser
);
81 void ShowAboutChrome(Browser
* browser
);
82 void ShowSearchEngineSettings(Browser
* browser
);
84 #if !defined(OS_ANDROID) && !defined(OS_IOS)
85 // Initiates signin in a new browser tab.
86 void ShowBrowserSignin(Browser
* browser
, signin_metrics::Source source
);
88 // If the user is already signed in, shows the "Signin" portion of Settings,
89 // otherwise initiates signin in a new browser tab.
90 void ShowBrowserSigninOrSettings(Browser
* browser
,
91 signin_metrics::Source source
);
96 #endif // CHROME_BROWSER_UI_CHROME_PAGES_H_