| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 bool OpenAppsPanelAsNewTab(); | 424 bool OpenAppsPanelAsNewTab(); |
| 425 | 425 |
| 426 // Assorted browser commands //////////////////////////////////////////////// | 426 // Assorted browser commands //////////////////////////////////////////////// |
| 427 | 427 |
| 428 // NOTE: Within each of the following sections, the IDs are ordered roughly by | 428 // NOTE: Within each of the following sections, the IDs are ordered roughly by |
| 429 // how they appear in the GUI/menus (left to right, top to bottom, etc.). | 429 // how they appear in the GUI/menus (left to right, top to bottom, etc.). |
| 430 | 430 |
| 431 // Navigation commands | 431 // Navigation commands |
| 432 void GoBack(WindowOpenDisposition disposition); | 432 void GoBack(WindowOpenDisposition disposition); |
| 433 void GoForward(WindowOpenDisposition disposition); | 433 void GoForward(WindowOpenDisposition disposition); |
| 434 void Reload(); | 434 void Reload(WindowOpenDisposition disposition); |
| 435 void ReloadIgnoringCache(); // AKA shift-reload. | 435 void ReloadIgnoringCache(WindowOpenDisposition disposition); // Shift-reload. |
| 436 void Home(WindowOpenDisposition disposition); | 436 void Home(WindowOpenDisposition disposition); |
| 437 void OpenCurrentURL(); | 437 void OpenCurrentURL(); |
| 438 void Go(WindowOpenDisposition disposition); | 438 void Go(WindowOpenDisposition disposition); |
| 439 void Stop(); | 439 void Stop(); |
| 440 // Window management commands | 440 // Window management commands |
| 441 void NewWindow(); | 441 void NewWindow(); |
| 442 void NewIncognitoWindow(); | 442 void NewIncognitoWindow(); |
| 443 void NewProfileWindowByIndex(int index); | 443 void NewProfileWindowByIndex(int index); |
| 444 void CloseWindow(); | 444 void CloseWindow(); |
| 445 void NewTab(); | 445 void NewTab(); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 // after a return to the message loop. | 887 // after a return to the message loop. |
| 888 void CloseFrame(); | 888 void CloseFrame(); |
| 889 | 889 |
| 890 void TabDetachedAtImpl(TabContents* contents, int index, DetachType type); | 890 void TabDetachedAtImpl(TabContents* contents, int index, DetachType type); |
| 891 | 891 |
| 892 // Create a preference dictionary for the provided application name. This is | 892 // Create a preference dictionary for the provided application name. This is |
| 893 // done only once per application name / per session. | 893 // done only once per application name / per session. |
| 894 static void RegisterAppPrefs(const std::wstring& app_name); | 894 static void RegisterAppPrefs(const std::wstring& app_name); |
| 895 | 895 |
| 896 // Shared code between Reload() and ReloadAll(). | 896 // Shared code between Reload() and ReloadAll(). |
| 897 void ReloadInternal(bool ignore_cache); | 897 void ReloadInternal(WindowOpenDisposition disposition, bool ignore_cache); |
| 898 | 898 |
| 899 // Return true if the window dispositions means opening a new tab. | 899 // Return true if the window dispositions means opening a new tab. |
| 900 bool ShouldOpenNewTabForWindowDisposition(WindowOpenDisposition disposition); | 900 bool ShouldOpenNewTabForWindowDisposition(WindowOpenDisposition disposition); |
| 901 | 901 |
| 902 // Depending on the disposition, return the |NavigationController| for the | 902 // Depending on the disposition, return the current tab or a clone of the |
| 903 // current tab or clone the current tab and return its |NavigationController|. | 903 // current tab. |
| 904 NavigationController& GetOrCloneNavigationControllerForDisposition( | 904 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition); |
| 905 WindowOpenDisposition disp); | |
| 906 | 905 |
| 907 // Sets the insertion policy of the tabstrip based on whether vertical tabs | 906 // Sets the insertion policy of the tabstrip based on whether vertical tabs |
| 908 // are enabled. | 907 // are enabled. |
| 909 void UpdateTabStripModelInsertionPolicy(); | 908 void UpdateTabStripModelInsertionPolicy(); |
| 910 | 909 |
| 911 // Invoked when the use vertical tabs preference changes. Resets the insertion | 910 // Invoked when the use vertical tabs preference changes. Resets the insertion |
| 912 // policy of the tab strip model and notifies the window. | 911 // policy of the tab strip model and notifies the window. |
| 913 void UseVerticalTabsChanged(); | 912 void UseVerticalTabsChanged(); |
| 914 | 913 |
| 915 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If | 914 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 mutable BooleanPrefMember use_vertical_tabs_; | 1043 mutable BooleanPrefMember use_vertical_tabs_; |
| 1045 | 1044 |
| 1046 // The profile's tab restore service. The service is owned by the profile, | 1045 // The profile's tab restore service. The service is owned by the profile, |
| 1047 // and we install ourselves as an observer. | 1046 // and we install ourselves as an observer. |
| 1048 TabRestoreService* tab_restore_service_; | 1047 TabRestoreService* tab_restore_service_; |
| 1049 | 1048 |
| 1050 DISALLOW_COPY_AND_ASSIGN(Browser); | 1049 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1051 }; | 1050 }; |
| 1052 | 1051 |
| 1053 #endif // CHROME_BROWSER_BROWSER_H_ | 1052 #endif // CHROME_BROWSER_BROWSER_H_ |
| OLD | NEW |