OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 | 1041 |
1042 // Create a preference dictionary for the provided application name, in the | 1042 // Create a preference dictionary for the provided application name, in the |
1043 // given user profile. This is done only once per application name / per | 1043 // given user profile. This is done only once per application name / per |
1044 // session / per user profile. | 1044 // session / per user profile. |
1045 static void RegisterAppPrefs(const std::string& app_name, Profile* profile); | 1045 static void RegisterAppPrefs(const std::string& app_name, Profile* profile); |
1046 | 1046 |
1047 // Shared code between Reload() and ReloadIgnoringCache(). | 1047 // Shared code between Reload() and ReloadIgnoringCache(). |
1048 void ReloadInternal(WindowOpenDisposition disposition, bool ignore_cache); | 1048 void ReloadInternal(WindowOpenDisposition disposition, bool ignore_cache); |
1049 | 1049 |
1050 // Return true if the window dispositions means opening a new tab. | 1050 // Return true if the window dispositions means opening a new tab. |
1051 bool ShouldOpenNewTabForWindowDisposition(WindowOpenDisposition disposition); | 1051 // |
| 1052 bool ShouldOpenNewTabForDisposition(WindowOpenDisposition disposition); |
1052 | 1053 |
1053 // Depending on the disposition, return the current tab or a clone of the | 1054 // Depending on the disposition, return the current tab or a clone of the |
1054 // current tab. | 1055 // current tab. |
1055 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition); | 1056 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition); |
1056 | 1057 |
| 1058 // Depending on the disposition, return the wrapper containing the current |
| 1059 // tab or a clone of the current tab. |
| 1060 TabContentsWrapper* GetOrCloneTabWrapperForDisposition( |
| 1061 WindowOpenDisposition disposition); |
| 1062 |
| 1063 // Depending on the disposition, create a new browser. |
| 1064 // When disposition is NEW_WINDOW, |tab_contents| will be added to |
| 1065 // a new browser which is created in this method. |
| 1066 void CreateNewBrowserForDisposition(TabContentsWrapper* tab_contents, |
| 1067 WindowOpenDisposition disposition); |
| 1068 |
1057 // Sets the insertion policy of the tabstrip based on whether vertical tabs | 1069 // Sets the insertion policy of the tabstrip based on whether vertical tabs |
1058 // are enabled. | 1070 // are enabled. |
1059 void UpdateTabStripModelInsertionPolicy(); | 1071 void UpdateTabStripModelInsertionPolicy(); |
1060 | 1072 |
1061 // Invoked when the use vertical tabs preference changes. Resets the insertion | 1073 // Invoked when the use vertical tabs preference changes. Resets the insertion |
1062 // policy of the tab strip model and notifies the window. | 1074 // policy of the tab strip model and notifies the window. |
1063 void UseVerticalTabsChanged(); | 1075 void UseVerticalTabsChanged(); |
1064 | 1076 |
1065 // Invoked when the use of the compact navigation bar preference changes. | 1077 // Invoked when the use of the compact navigation bar preference changes. |
1066 // Notifies the window. | 1078 // Notifies the window. |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 // Helper which implements the TabRestoreServiceDelegate interface. | 1251 // Helper which implements the TabRestoreServiceDelegate interface. |
1240 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; | 1252 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; |
1241 | 1253 |
1242 scoped_ptr<InstantController> instant_; | 1254 scoped_ptr<InstantController> instant_; |
1243 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1255 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
1244 | 1256 |
1245 DISALLOW_COPY_AND_ASSIGN(Browser); | 1257 DISALLOW_COPY_AND_ASSIGN(Browser); |
1246 }; | 1258 }; |
1247 | 1259 |
1248 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1260 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |