Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / chrome_pages.h
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.
4
5 #ifndef CHROME_BROWSER_UI_CHROME_PAGES_H_
6 #define CHROME_BROWSER_UI_CHROME_PAGES_H_
7
8 #include <string>
9
10 #include "chrome/browser/ui/host_desktop.h"
11 #include "components/content_settings/core/common/content_settings_types.h"
12 #include "url/gurl.h"
13
14 #if !defined(OS_ANDROID) && !defined(OS_IOS)
15 #include "chrome/browser/signin/signin_promo.h"
16 #endif
17
18 class Browser;
19
20 namespace content {
21 class WebContents;
22 }
23
24 namespace chrome {
25
26 // Sources of requests to show the help tab.
27 enum 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
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);
46
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);
52
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);
60
61 // Constructs a settings GURL for the specified |sub_page|.
62 GURL GetSettingsUrl(const std::string& sub_page);
63
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);
68
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);
83
84 #if !defined(OS_ANDROID) && !defined(OS_IOS)
85 // If the user is already signed in, shows the "Signin" portion of Settings,
86 // otherwise initiates signin.
87 void ShowBrowserSignin(Browser* browser, signin::Source source);
88 #endif
89
90 }  // namespace chrome
91
92 #endif  // CHROME_BROWSER_UI_CHROME_PAGES_H_