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 11 matching lines...) Expand all Loading... | |
22 #include "chrome/browser/sessions/session_id.h" | 22 #include "chrome/browser/sessions/session_id.h" |
23 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 23 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
25 #include "chrome/browser/ui/browser_navigator.h" | 25 #include "chrome/browser/ui/browser_navigator.h" |
26 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 26 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
27 #include "chrome/browser/ui/host_desktop.h" | 27 #include "chrome/browser/ui/host_desktop.h" |
28 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 28 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
29 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" | 29 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" |
30 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 30 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
31 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 31 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
32 #include "chrome/browser/ui/web_applications/hosted_app_tab_helper_delegate.h" | |
32 #include "chrome/browser/ui/zoom/zoom_observer.h" | 33 #include "chrome/browser/ui/zoom/zoom_observer.h" |
33 #include "chrome/common/content_settings.h" | 34 #include "chrome/common/content_settings.h" |
34 #include "chrome/common/content_settings_types.h" | 35 #include "chrome/common/content_settings_types.h" |
35 #include "chrome/common/extensions/extension_constants.h" | 36 #include "chrome/common/extensions/extension_constants.h" |
36 #include "content/public/browser/notification_observer.h" | 37 #include "content/public/browser/notification_observer.h" |
37 #include "content/public/browser/notification_registrar.h" | 38 #include "content/public/browser/notification_registrar.h" |
38 #include "content/public/browser/page_navigator.h" | 39 #include "content/public/browser/page_navigator.h" |
39 #include "content/public/browser/web_contents_delegate.h" | 40 #include "content/public/browser/web_contents_delegate.h" |
40 #include "content/public/common/page_transition_types.h" | 41 #include "content/public/common/page_transition_types.h" |
41 #include "content/public/common/page_zoom.h" | 42 #include "content/public/common/page_zoom.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 class PageState; | 74 class PageState; |
74 class SessionStorageNamespace; | 75 class SessionStorageNamespace; |
75 } | 76 } |
76 | 77 |
77 namespace extensions { | 78 namespace extensions { |
78 class Extension; | 79 class Extension; |
79 class WindowController; | 80 class WindowController; |
80 } | 81 } |
81 | 82 |
82 namespace gfx { | 83 namespace gfx { |
83 class Image; | 84 class Image; |
tapted
2013/11/17 23:28:50
nit: looks like this isn't needed any more here
| |
84 class Point; | 85 class Point; |
85 } | 86 } |
86 | 87 |
87 namespace ui { | 88 namespace ui { |
88 struct SelectedFileInfo; | 89 struct SelectedFileInfo; |
89 class WebDialogDelegate; | 90 class WebDialogDelegate; |
90 } | 91 } |
91 | 92 |
92 namespace web_modal { | 93 namespace web_modal { |
93 class WebContentsModalDialogHost; | 94 class WebContentsModalDialogHost; |
94 } | 95 } |
95 | 96 |
96 class Browser : public TabStripModelObserver, | 97 class Browser : public TabStripModelObserver, |
97 public content::WebContentsDelegate, | 98 public content::WebContentsDelegate, |
98 public CoreTabHelperDelegate, | 99 public CoreTabHelperDelegate, |
99 public SearchEngineTabHelperDelegate, | 100 public SearchEngineTabHelperDelegate, |
100 public ChromeWebModalDialogManagerDelegate, | 101 public ChromeWebModalDialogManagerDelegate, |
101 public BookmarkTabHelperDelegate, | 102 public BookmarkTabHelperDelegate, |
103 public HostedAppTabHelperDelegate, | |
102 public ZoomObserver, | 104 public ZoomObserver, |
103 public content::PageNavigator, | 105 public content::PageNavigator, |
104 public content::NotificationObserver, | 106 public content::NotificationObserver, |
105 public ui::SelectFileDialog::Listener { | 107 public ui::SelectFileDialog::Listener { |
106 public: | 108 public: |
107 // SessionService::WindowType mirrors these values. If you add to this | 109 // SessionService::WindowType mirrors these values. If you add to this |
108 // enum, look at SessionService::WindowType to see if it needs to be | 110 // enum, look at SessionService::WindowType to see if it needs to be |
109 // updated. | 111 // updated. |
110 enum Type { | 112 enum Type { |
111 // If you add a new type, consider updating the test | 113 // If you add a new type, consider updating the test |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 FindBarController* GetFindBarController(); | 276 FindBarController* GetFindBarController(); |
275 | 277 |
276 // Returns true if a FindBarController exists for this browser. | 278 // Returns true if a FindBarController exists for this browser. |
277 bool HasFindBarController() const; | 279 bool HasFindBarController() const; |
278 | 280 |
279 // Returns the state of the bookmark bar. | 281 // Returns the state of the bookmark bar. |
280 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } | 282 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } |
281 | 283 |
282 // State Storage and Retrieval for UI /////////////////////////////////////// | 284 // State Storage and Retrieval for UI /////////////////////////////////////// |
283 | 285 |
284 // Gets the Favicon of the page in the selected tab. | |
285 gfx::Image GetCurrentPageIcon() const; | |
286 | |
287 // Gets the title of the window based on the selected tab's title. | 286 // Gets the title of the window based on the selected tab's title. |
288 string16 GetWindowTitleForCurrentTab() const; | 287 string16 GetWindowTitleForCurrentTab() const; |
289 | 288 |
290 // Prepares a title string for display (removes embedded newlines, etc). | 289 // Prepares a title string for display (removes embedded newlines, etc). |
291 static void FormatTitleForDisplay(string16* title); | 290 static void FormatTitleForDisplay(string16* title); |
292 | 291 |
293 // OnBeforeUnload handling ////////////////////////////////////////////////// | 292 // OnBeforeUnload handling ////////////////////////////////////////////////// |
294 | 293 |
295 // Gives beforeunload handlers the chance to cancel the close. Returns whether | 294 // Gives beforeunload handlers the chance to cancel the close. Returns whether |
296 // to proceed with the close. If called while the process begun by | 295 // to proceed with the close. If called while the process begun by |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
672 // Overridden from WebContentsModalDialogManagerDelegate: | 671 // Overridden from WebContentsModalDialogManagerDelegate: |
673 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 672 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
674 bool blocked) OVERRIDE; | 673 bool blocked) OVERRIDE; |
675 virtual web_modal::WebContentsModalDialogHost* | 674 virtual web_modal::WebContentsModalDialogHost* |
676 GetWebContentsModalDialogHost() OVERRIDE; | 675 GetWebContentsModalDialogHost() OVERRIDE; |
677 | 676 |
678 // Overridden from BookmarkTabHelperDelegate: | 677 // Overridden from BookmarkTabHelperDelegate: |
679 virtual void URLStarredChanged(content::WebContents* web_contents, | 678 virtual void URLStarredChanged(content::WebContents* web_contents, |
680 bool starred) OVERRIDE; | 679 bool starred) OVERRIDE; |
681 | 680 |
681 // Overriden from HostedAppTabHelper: | |
682 virtual void OnWindowIconLoaded(content::WebContents* source) OVERRIDE; | |
683 | |
682 // Overridden from ZoomObserver: | 684 // Overridden from ZoomObserver: |
683 virtual void OnZoomChanged(content::WebContents* source, | 685 virtual void OnZoomChanged(content::WebContents* source, |
684 bool can_show_bubble) OVERRIDE; | 686 bool can_show_bubble) OVERRIDE; |
685 | 687 |
686 // Overridden from SelectFileDialog::Listener: | 688 // Overridden from SelectFileDialog::Listener: |
687 virtual void FileSelected(const base::FilePath& path, | 689 virtual void FileSelected(const base::FilePath& path, |
688 int index, | 690 int index, |
689 void* params) OVERRIDE; | 691 void* params) OVERRIDE; |
690 virtual void FileSelectedWithExtraInfo( | 692 virtual void FileSelectedWithExtraInfo( |
691 const ui::SelectedFileInfo& file_info, | 693 const ui::SelectedFileInfo& file_info, |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
935 | 937 |
936 // The following factory is used to close the frame at a later time. | 938 // The following factory is used to close the frame at a later time. |
937 base::WeakPtrFactory<Browser> weak_factory_; | 939 base::WeakPtrFactory<Browser> weak_factory_; |
938 | 940 |
939 scoped_ptr<BrowserLanguageStateObserver> language_state_observer_; | 941 scoped_ptr<BrowserLanguageStateObserver> language_state_observer_; |
940 | 942 |
941 DISALLOW_COPY_AND_ASSIGN(Browser); | 943 DISALLOW_COPY_AND_ASSIGN(Browser); |
942 }; | 944 }; |
943 | 945 |
944 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 946 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |