OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_BROWSER_COMMANDS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_COMMANDS_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_COMMANDS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_COMMANDS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 bool ExecuteCommandWithDisposition(Browser* browser, | 35 bool ExecuteCommandWithDisposition(Browser* browser, |
36 int command, | 36 int command, |
37 WindowOpenDisposition disposition); | 37 WindowOpenDisposition disposition); |
38 void UpdateCommandEnabled(Browser* browser, int command, bool enabled); | 38 void UpdateCommandEnabled(Browser* browser, int command, bool enabled); |
39 void AddCommandObserver(Browser*, int command, CommandObserver* observer); | 39 void AddCommandObserver(Browser*, int command, CommandObserver* observer); |
40 void RemoveCommandObserver(Browser*, int command, CommandObserver* observer); | 40 void RemoveCommandObserver(Browser*, int command, CommandObserver* observer); |
41 | 41 |
42 int GetContentRestrictions(const Browser* browser); | 42 int GetContentRestrictions(const Browser* browser); |
43 | 43 |
44 // Opens a new window with the default blank tab. | 44 // Opens a new window with the default blank tab. |
45 void NewEmptyWindow(Profile* profile, HostDesktopType desktop_type); | 45 void NewEmptyWindow(Profile* profile); |
46 | 46 |
47 // Opens a new window with the default blank tab. This bypasses metrics and | 47 // Opens a new window with the default blank tab. This bypasses metrics and |
48 // various internal bookkeeping; NewEmptyWindow (above) is preferred. | 48 // various internal bookkeeping; NewEmptyWindow (above) is preferred. |
49 Browser* OpenEmptyWindow(Profile* profile, HostDesktopType desktop_type); | 49 Browser* OpenEmptyWindow(Profile* profile); |
50 | 50 |
51 // Opens a new window with the tabs from |profile|'s TabRestoreService. | 51 // Opens a new window with the tabs from |profile|'s TabRestoreService. |
52 void OpenWindowWithRestoredTabs(Profile* profile, | 52 void OpenWindowWithRestoredTabs(Profile* profile, |
53 HostDesktopType host_desktop_type); | 53 HostDesktopType host_desktop_type); |
54 | 54 |
55 // Opens the specified URL in a new browser window in an incognito session on | 55 // Opens the specified URL in a new browser window in an incognito session. If |
56 // the desktop specified by |desktop_type|. If there is already an existing | 56 // there is already an existing active incognito session for the specified |
57 // active incognito session for the specified |profile|, that session is re- | 57 // |profile|, that session is re- used. |
58 // used. | 58 void OpenURLOffTheRecord(Profile* profile, const GURL& url); |
59 void OpenURLOffTheRecord(Profile* profile, const GURL& url, | |
60 chrome::HostDesktopType desktop_type); | |
61 | 59 |
62 bool CanGoBack(const Browser* browser); | 60 bool CanGoBack(const Browser* browser); |
63 void GoBack(Browser* browser, WindowOpenDisposition disposition); | 61 void GoBack(Browser* browser, WindowOpenDisposition disposition); |
64 bool CanGoForward(const Browser* browser); | 62 bool CanGoForward(const Browser* browser); |
65 void GoForward(Browser* browser, WindowOpenDisposition disposition); | 63 void GoForward(Browser* browser, WindowOpenDisposition disposition); |
66 bool NavigateToIndexWithDisposition(Browser* browser, | 64 bool NavigateToIndexWithDisposition(Browser* browser, |
67 int index, | 65 int index, |
68 WindowOpenDisposition disposition); | 66 WindowOpenDisposition disposition); |
69 void Reload(Browser* browser, WindowOpenDisposition disposition); | 67 void Reload(Browser* browser, WindowOpenDisposition disposition); |
70 void ReloadIgnoringCache(Browser* browser, WindowOpenDisposition disposition); | 68 void ReloadIgnoringCache(Browser* browser, WindowOpenDisposition disposition); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 void CreateApplicationShortcuts(Browser* browser); | 165 void CreateApplicationShortcuts(Browser* browser); |
168 void CreateBookmarkAppFromCurrentWebContents(Browser* browser); | 166 void CreateBookmarkAppFromCurrentWebContents(Browser* browser); |
169 bool CanCreateApplicationShortcuts(const Browser* browser); | 167 bool CanCreateApplicationShortcuts(const Browser* browser); |
170 bool CanCreateBookmarkApp(const Browser* browser); | 168 bool CanCreateBookmarkApp(const Browser* browser); |
171 | 169 |
172 void ConvertTabToAppWindow(Browser* browser, content::WebContents* contents); | 170 void ConvertTabToAppWindow(Browser* browser, content::WebContents* contents); |
173 | 171 |
174 } // namespace chrome | 172 } // namespace chrome |
175 | 173 |
176 #endif // CHROME_BROWSER_UI_BROWSER_COMMANDS_H_ | 174 #endif // CHROME_BROWSER_UI_BROWSER_COMMANDS_H_ |
OLD | NEW |