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_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 class UnloadController; | 74 class UnloadController; |
75 } | 75 } |
76 | 76 |
77 namespace content { | 77 namespace content { |
78 class NavigationController; | 78 class NavigationController; |
79 class PageState; | 79 class PageState; |
80 class SessionStorageNamespace; | 80 class SessionStorageNamespace; |
81 } | 81 } |
82 | 82 |
83 namespace extensions { | 83 namespace extensions { |
| 84 class BookmarkAppBrowserController; |
84 class Extension; | 85 class Extension; |
85 class ExtensionRegistry; | 86 class ExtensionRegistry; |
86 class WindowController; | 87 class WindowController; |
87 } | 88 } |
88 | 89 |
89 namespace gfx { | 90 namespace gfx { |
90 class Image; | 91 class Image; |
91 class Point; | 92 class Point; |
92 } | 93 } |
93 | 94 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 } | 276 } |
276 BrowserTabRestoreServiceDelegate* tab_restore_service_delegate() { | 277 BrowserTabRestoreServiceDelegate* tab_restore_service_delegate() { |
277 return tab_restore_service_delegate_.get(); | 278 return tab_restore_service_delegate_.get(); |
278 } | 279 } |
279 BrowserSyncedWindowDelegate* synced_window_delegate() { | 280 BrowserSyncedWindowDelegate* synced_window_delegate() { |
280 return synced_window_delegate_.get(); | 281 return synced_window_delegate_.get(); |
281 } | 282 } |
282 BrowserInstantController* instant_controller() { | 283 BrowserInstantController* instant_controller() { |
283 return instant_controller_.get(); | 284 return instant_controller_.get(); |
284 } | 285 } |
| 286 extensions::BookmarkAppBrowserController* bookmark_app_controller() { |
| 287 return bookmark_app_controller_.get(); |
| 288 } |
285 | 289 |
286 // Get the FindBarController for this browser, creating it if it does not | 290 // Get the FindBarController for this browser, creating it if it does not |
287 // yet exist. | 291 // yet exist. |
288 FindBarController* GetFindBarController(); | 292 FindBarController* GetFindBarController(); |
289 | 293 |
290 // Returns true if a FindBarController exists for this browser. | 294 // Returns true if a FindBarController exists for this browser. |
291 bool HasFindBarController() const; | 295 bool HasFindBarController() const; |
292 | 296 |
293 // Returns the state of the bookmark bar. | 297 // Returns the state of the bookmark bar. |
294 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } | 298 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 // after a return to the message loop. | 796 // after a return to the message loop. |
793 void CloseFrame(); | 797 void CloseFrame(); |
794 | 798 |
795 void TabDetachedAtImpl(content::WebContents* contents, | 799 void TabDetachedAtImpl(content::WebContents* contents, |
796 int index, | 800 int index, |
797 DetachType type); | 801 DetachType type); |
798 | 802 |
799 // Shared code between Reload() and ReloadIgnoringCache(). | 803 // Shared code between Reload() and ReloadIgnoringCache(). |
800 void ReloadInternal(WindowOpenDisposition disposition, bool ignore_cache); | 804 void ReloadInternal(WindowOpenDisposition disposition, bool ignore_cache); |
801 | 805 |
| 806 // Returns true if the Browser window supports a location bar. Having support |
| 807 // for the location bar does not mean it will be visible. |
| 808 bool SupportsLocationBar() const; |
| 809 |
802 // Returns true if the Browser window should show the location bar. | 810 // Returns true if the Browser window should show the location bar. |
803 bool ShouldShowLocationBar() const; | 811 bool ShouldShowLocationBar() const; |
804 | 812 |
805 // Returns true if the Browser window should use a web app style frame. | 813 // Returns true if the Browser window should use a web app style frame. |
806 bool ShouldUseWebAppFrame() const; | 814 bool ShouldUseWebAppFrame() const; |
807 | 815 |
808 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If | 816 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If |
809 // |check_fullscreen| is true, the set of features reflect the actual state of | 817 // |check_fullscreen| is true, the set of features reflect the actual state of |
810 // the browser, otherwise the set of features reflect the possible state of | 818 // the browser, otherwise the set of features reflect the possible state of |
811 // the browser. | 819 // the browser. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 scoped_ptr<SearchDelegate> search_delegate_; | 957 scoped_ptr<SearchDelegate> search_delegate_; |
950 | 958 |
951 // Helper which implements the TabRestoreServiceDelegate interface. | 959 // Helper which implements the TabRestoreServiceDelegate interface. |
952 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; | 960 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; |
953 | 961 |
954 // Helper which implements the SyncedWindowDelegate interface. | 962 // Helper which implements the SyncedWindowDelegate interface. |
955 scoped_ptr<BrowserSyncedWindowDelegate> synced_window_delegate_; | 963 scoped_ptr<BrowserSyncedWindowDelegate> synced_window_delegate_; |
956 | 964 |
957 scoped_ptr<BrowserInstantController> instant_controller_; | 965 scoped_ptr<BrowserInstantController> instant_controller_; |
958 | 966 |
| 967 // Helper which handles bookmark app specific browser configuration. |
| 968 scoped_ptr<extensions::BookmarkAppBrowserController> bookmark_app_controller_; |
| 969 |
959 BookmarkBar::State bookmark_bar_state_; | 970 BookmarkBar::State bookmark_bar_state_; |
960 | 971 |
961 scoped_ptr<ExclusiveAccessManager> exclusive_access_manager_; | 972 scoped_ptr<ExclusiveAccessManager> exclusive_access_manager_; |
962 | 973 |
963 scoped_ptr<extensions::WindowController> extension_window_controller_; | 974 scoped_ptr<extensions::WindowController> extension_window_controller_; |
964 | 975 |
965 scoped_ptr<chrome::BrowserCommandController> command_controller_; | 976 scoped_ptr<chrome::BrowserCommandController> command_controller_; |
966 | 977 |
967 // True if the browser window has been shown at least once. | 978 // True if the browser window has been shown at least once. |
968 bool window_has_shown_; | 979 bool window_has_shown_; |
969 | 980 |
970 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; | 981 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; |
971 | 982 |
972 // The following factory is used for chrome update coalescing. | 983 // The following factory is used for chrome update coalescing. |
973 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 984 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
974 | 985 |
975 // The following factory is used to close the frame at a later time. | 986 // The following factory is used to close the frame at a later time. |
976 base::WeakPtrFactory<Browser> weak_factory_; | 987 base::WeakPtrFactory<Browser> weak_factory_; |
977 | 988 |
978 DISALLOW_COPY_AND_ASSIGN(Browser); | 989 DISALLOW_COPY_AND_ASSIGN(Browser); |
979 }; | 990 }; |
980 | 991 |
981 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 992 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |