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 13 matching lines...) Expand all Loading... |
24 #include "chrome/browser/sessions/session_id.h" | 24 #include "chrome/browser/sessions/session_id.h" |
25 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 25 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
26 #include "chrome/browser/sync/profile_sync_service_observer.h" | 26 #include "chrome/browser/sync/profile_sync_service_observer.h" |
27 #include "chrome/browser/tabs/tab_handler.h" | 27 #include "chrome/browser/tabs/tab_handler.h" |
28 #include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove | 28 #include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove |
29 #include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove | 29 #include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove |
30 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" | 30 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" |
31 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 31 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
32 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 32 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
33 #include "chrome/browser/ui/browser_navigator.h" | 33 #include "chrome/browser/ui/browser_navigator.h" |
34 #include "chrome/browser/ui/download/download_tab_helper_delegate.h" | |
35 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 34 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
36 #include "chrome/browser/ui/shell_dialogs.h" | 35 #include "chrome/browser/ui/shell_dialogs.h" |
37 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" | 36 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" |
38 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 37 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
39 #include "chrome/common/content_settings_types.h" | 38 #include "chrome/common/content_settings_types.h" |
40 #include "chrome/common/extensions/extension_constants.h" | 39 #include "chrome/common/extensions/extension_constants.h" |
41 #include "content/browser/debugger/devtools_toggle_action.h" | 40 #include "content/browser/debugger/devtools_toggle_action.h" |
42 #include "content/browser/tab_contents/page_navigator.h" | 41 #include "content/browser/tab_contents/page_navigator.h" |
43 #include "content/browser/tab_contents/tab_contents_delegate.h" | 42 #include "content/browser/tab_contents/tab_contents_delegate.h" |
44 #include "content/common/notification_registrar.h" | 43 #include "content/common/notification_registrar.h" |
(...skipping 18 matching lines...) Expand all Loading... |
63 namespace gfx { | 62 namespace gfx { |
64 class Point; | 63 class Point; |
65 } | 64 } |
66 | 65 |
67 class Browser : public TabHandlerDelegate, | 66 class Browser : public TabHandlerDelegate, |
68 public TabContentsDelegate, | 67 public TabContentsDelegate, |
69 public TabContentsWrapperDelegate, | 68 public TabContentsWrapperDelegate, |
70 public SearchEngineTabHelperDelegate, | 69 public SearchEngineTabHelperDelegate, |
71 public BlockedContentTabHelperDelegate, | 70 public BlockedContentTabHelperDelegate, |
72 public BookmarkTabHelperDelegate, | 71 public BookmarkTabHelperDelegate, |
73 public DownloadTabHelperDelegate, | |
74 public PageNavigator, | 72 public PageNavigator, |
75 public CommandUpdater::CommandUpdaterDelegate, | 73 public CommandUpdater::CommandUpdaterDelegate, |
76 public NotificationObserver, | 74 public NotificationObserver, |
77 public SelectFileDialog::Listener, | 75 public SelectFileDialog::Listener, |
78 public TabRestoreServiceObserver, | 76 public TabRestoreServiceObserver, |
79 public ProfileSyncServiceObserver, | 77 public ProfileSyncServiceObserver, |
80 public InstantDelegate { | 78 public InstantDelegate { |
81 public: | 79 public: |
82 // SessionService::WindowType mirrors these values. If you add to this | 80 // SessionService::WindowType mirrors these values. If you add to this |
83 // enum, look at SessionService::WindowType to see if it needs to be | 81 // enum, look at SessionService::WindowType to see if it needs to be |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 virtual void TabContentsFocused(TabContents* tab_content) OVERRIDE; | 843 virtual void TabContentsFocused(TabContents* tab_content) OVERRIDE; |
846 virtual bool TakeFocus(bool reverse) OVERRIDE; | 844 virtual bool TakeFocus(bool reverse) OVERRIDE; |
847 virtual bool IsApplication() const OVERRIDE; | 845 virtual bool IsApplication() const OVERRIDE; |
848 virtual void ConvertContentsToApplication(TabContents* source) OVERRIDE; | 846 virtual void ConvertContentsToApplication(TabContents* source) OVERRIDE; |
849 virtual void BeforeUnloadFired(TabContents* source, | 847 virtual void BeforeUnloadFired(TabContents* source, |
850 bool proceed, | 848 bool proceed, |
851 bool* proceed_to_fire_unload) OVERRIDE; | 849 bool* proceed_to_fire_unload) OVERRIDE; |
852 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; | 850 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; |
853 virtual void RenderWidgetShowing() OVERRIDE; | 851 virtual void RenderWidgetShowing() OVERRIDE; |
854 virtual int GetExtraRenderViewHeight() const OVERRIDE; | 852 virtual int GetExtraRenderViewHeight() const OVERRIDE; |
| 853 virtual void OnStartDownload(DownloadItem* download, |
| 854 TabContents* tab) OVERRIDE; |
855 virtual void ShowPageInfo(Profile* profile, | 855 virtual void ShowPageInfo(Profile* profile, |
856 const GURL& url, | 856 const GURL& url, |
857 const NavigationEntry::SSLStatus& ssl, | 857 const NavigationEntry::SSLStatus& ssl, |
858 bool show_history) OVERRIDE; | 858 bool show_history) OVERRIDE; |
859 virtual void ViewSourceForTab(TabContents* source, | 859 virtual void ViewSourceForTab(TabContents* source, |
860 const GURL& page_url) OVERRIDE; | 860 const GURL& page_url) OVERRIDE; |
861 virtual void ViewSourceForFrame( | 861 virtual void ViewSourceForFrame( |
862 TabContents* source, | 862 TabContents* source, |
863 const GURL& frame_url, | 863 const GURL& frame_url, |
864 const std::string& frame_content_state) OVERRIDE; | 864 const std::string& frame_content_state) OVERRIDE; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 Profile* profile) OVERRIDE; | 899 Profile* profile) OVERRIDE; |
900 | 900 |
901 // Overridden from BlockedContentTabHelperDelegate: | 901 // Overridden from BlockedContentTabHelperDelegate: |
902 virtual TabContentsWrapper* GetConstrainingContentsWrapper( | 902 virtual TabContentsWrapper* GetConstrainingContentsWrapper( |
903 TabContentsWrapper* source) OVERRIDE; | 903 TabContentsWrapper* source) OVERRIDE; |
904 | 904 |
905 // Overridden from BookmarkTabHelperDelegate: | 905 // Overridden from BookmarkTabHelperDelegate: |
906 virtual void URLStarredChanged(TabContentsWrapper* source, | 906 virtual void URLStarredChanged(TabContentsWrapper* source, |
907 bool starred) OVERRIDE; | 907 bool starred) OVERRIDE; |
908 | 908 |
909 // Overridden from DownloadTabHelperDelegate: | |
910 virtual bool CanDownload(int request_id) OVERRIDE; | |
911 virtual void OnStartDownload(DownloadItem* download, | |
912 TabContentsWrapper* tab) OVERRIDE; | |
913 | |
914 | |
915 // Overridden from SelectFileDialog::Listener: | 909 // Overridden from SelectFileDialog::Listener: |
916 virtual void FileSelected(const FilePath& path, int index, void* params); | 910 virtual void FileSelected(const FilePath& path, int index, void* params); |
917 | 911 |
918 // Overridden from NotificationObserver: | 912 // Overridden from NotificationObserver: |
919 virtual void Observe(int type, | 913 virtual void Observe(int type, |
920 const NotificationSource& source, | 914 const NotificationSource& source, |
921 const NotificationDetails& details); | 915 const NotificationDetails& details); |
922 | 916 |
923 // Overridden from ProfileSyncServiceObserver: | 917 // Overridden from ProfileSyncServiceObserver: |
924 virtual void OnStateChanged(); | 918 virtual void OnStateChanged(); |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 | 1260 |
1267 scoped_ptr<InstantController> instant_; | 1261 scoped_ptr<InstantController> instant_; |
1268 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1262 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
1269 | 1263 |
1270 BookmarkBar::State bookmark_bar_state_; | 1264 BookmarkBar::State bookmark_bar_state_; |
1271 | 1265 |
1272 DISALLOW_COPY_AND_ASSIGN(Browser); | 1266 DISALLOW_COPY_AND_ASSIGN(Browser); |
1273 }; | 1267 }; |
1274 | 1268 |
1275 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1269 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |