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/prefs/pref_change_registrar.h" | 24 #include "chrome/browser/prefs/pref_change_registrar.h" |
25 #include "chrome/browser/sessions/session_id.h" | 25 #include "chrome/browser/sessions/session_id.h" |
26 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 26 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
27 #include "chrome/browser/sync/profile_sync_service_observer.h" | 27 #include "chrome/browser/sync/profile_sync_service_observer.h" |
28 #include "chrome/browser/tabs/tab_handler.h" | 28 #include "chrome/browser/tabs/tab_handler.h" |
29 #include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove | 29 #include "chrome/browser/tabs/tab_strip_model_delegate.h" // TODO(beng): remove |
30 #include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove | 30 #include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove |
31 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" | 31 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
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" |
34 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 35 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
35 #include "chrome/browser/ui/shell_dialogs.h" | 36 #include "chrome/browser/ui/shell_dialogs.h" |
36 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" | 37 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" |
37 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 38 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
38 #include "chrome/common/extensions/extension_constants.h" | 39 #include "chrome/common/extensions/extension_constants.h" |
39 #include "content/browser/tab_contents/page_navigator.h" | 40 #include "content/browser/tab_contents/page_navigator.h" |
40 #include "content/browser/tab_contents/tab_contents_delegate.h" | 41 #include "content/browser/tab_contents/tab_contents_delegate.h" |
41 #include "content/common/notification_registrar.h" | 42 #include "content/common/notification_registrar.h" |
42 #include "content/common/page_transition_types.h" | 43 #include "content/common/page_transition_types.h" |
43 #include "content/common/page_zoom.h" | 44 #include "content/common/page_zoom.h" |
(...skipping 16 matching lines...) Expand all Loading... |
60 namespace gfx { | 61 namespace gfx { |
61 class Point; | 62 class Point; |
62 } | 63 } |
63 | 64 |
64 class Browser : public TabHandlerDelegate, | 65 class Browser : public TabHandlerDelegate, |
65 public TabContentsDelegate, | 66 public TabContentsDelegate, |
66 public TabContentsWrapperDelegate, | 67 public TabContentsWrapperDelegate, |
67 public SearchEngineTabHelperDelegate, | 68 public SearchEngineTabHelperDelegate, |
68 public BlockedContentTabHelperDelegate, | 69 public BlockedContentTabHelperDelegate, |
69 public BookmarkTabHelperDelegate, | 70 public BookmarkTabHelperDelegate, |
| 71 public DownloadTabHelperDelegate, |
70 public PageNavigator, | 72 public PageNavigator, |
71 public CommandUpdater::CommandUpdaterDelegate, | 73 public CommandUpdater::CommandUpdaterDelegate, |
72 public NotificationObserver, | 74 public NotificationObserver, |
73 public SelectFileDialog::Listener, | 75 public SelectFileDialog::Listener, |
74 public TabRestoreServiceObserver, | 76 public TabRestoreServiceObserver, |
75 public ProfileSyncServiceObserver, | 77 public ProfileSyncServiceObserver, |
76 public InstantDelegate { | 78 public InstantDelegate { |
77 public: | 79 public: |
78 // SessionService::WindowType mirrors these values. If you add to this | 80 // SessionService::WindowType mirrors these values. If you add to this |
79 // 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 virtual bool TakeFocus(bool reverse); | 804 virtual bool TakeFocus(bool reverse); |
803 virtual bool IsApplication() const; | 805 virtual bool IsApplication() const; |
804 virtual void ConvertContentsToApplication(TabContents* source); | 806 virtual void ConvertContentsToApplication(TabContents* source); |
805 virtual bool ShouldDisplayURLField(); | 807 virtual bool ShouldDisplayURLField(); |
806 virtual void BeforeUnloadFired(TabContents* source, | 808 virtual void BeforeUnloadFired(TabContents* source, |
807 bool proceed, | 809 bool proceed, |
808 bool* proceed_to_fire_unload); | 810 bool* proceed_to_fire_unload); |
809 virtual void SetFocusToLocationBar(bool select_all); | 811 virtual void SetFocusToLocationBar(bool select_all); |
810 virtual void RenderWidgetShowing(); | 812 virtual void RenderWidgetShowing(); |
811 virtual int GetExtraRenderViewHeight() const; | 813 virtual int GetExtraRenderViewHeight() const; |
812 virtual void OnStartDownload(DownloadItem* download, TabContents* tab); | |
813 virtual void ShowPageInfo(Profile* profile, | 814 virtual void ShowPageInfo(Profile* profile, |
814 const GURL& url, | 815 const GURL& url, |
815 const NavigationEntry::SSLStatus& ssl, | 816 const NavigationEntry::SSLStatus& ssl, |
816 bool show_history); | 817 bool show_history); |
817 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url); | 818 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url); |
818 virtual void ViewSourceForFrame(TabContents* source, | 819 virtual void ViewSourceForFrame(TabContents* source, |
819 const GURL& frame_url, | 820 const GURL& frame_url, |
820 const std::string& frame_content_state); | 821 const std::string& frame_content_state); |
821 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 822 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
822 bool* is_keyboard_shortcut); | 823 bool* is_keyboard_shortcut); |
(...skipping 27 matching lines...) Expand all Loading... |
850 Profile* profile) OVERRIDE; | 851 Profile* profile) OVERRIDE; |
851 | 852 |
852 // Overridden from BlockedContentTabHelperDelegate: | 853 // Overridden from BlockedContentTabHelperDelegate: |
853 virtual TabContentsWrapper* GetConstrainingContentsWrapper( | 854 virtual TabContentsWrapper* GetConstrainingContentsWrapper( |
854 TabContentsWrapper* source) OVERRIDE; | 855 TabContentsWrapper* source) OVERRIDE; |
855 | 856 |
856 // Overridden from BookmarkTabHelperDelegate: | 857 // Overridden from BookmarkTabHelperDelegate: |
857 virtual void URLStarredChanged(TabContentsWrapper* source, | 858 virtual void URLStarredChanged(TabContentsWrapper* source, |
858 bool starred) OVERRIDE; | 859 bool starred) OVERRIDE; |
859 | 860 |
| 861 // Overridden from DownloadTabHelperDelegate: |
| 862 virtual bool CanDownload(int request_id) OVERRIDE; |
| 863 virtual void OnStartDownload(DownloadItem* download, |
| 864 TabContentsWrapper* tab) OVERRIDE; |
| 865 |
| 866 |
860 // Overridden from SelectFileDialog::Listener: | 867 // Overridden from SelectFileDialog::Listener: |
861 virtual void FileSelected(const FilePath& path, int index, void* params); | 868 virtual void FileSelected(const FilePath& path, int index, void* params); |
862 | 869 |
863 // Overridden from NotificationObserver: | 870 // Overridden from NotificationObserver: |
864 virtual void Observe(NotificationType type, | 871 virtual void Observe(NotificationType type, |
865 const NotificationSource& source, | 872 const NotificationSource& source, |
866 const NotificationDetails& details); | 873 const NotificationDetails& details); |
867 | 874 |
868 // Overridden from ProfileSyncServiceObserver: | 875 // Overridden from ProfileSyncServiceObserver: |
869 virtual void OnStateChanged(); | 876 virtual void OnStateChanged(); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 // Helper which implements the TabRestoreServiceDelegate interface. | 1214 // Helper which implements the TabRestoreServiceDelegate interface. |
1208 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; | 1215 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; |
1209 | 1216 |
1210 scoped_ptr<InstantController> instant_; | 1217 scoped_ptr<InstantController> instant_; |
1211 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1218 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
1212 | 1219 |
1213 DISALLOW_COPY_AND_ASSIGN(Browser); | 1220 DISALLOW_COPY_AND_ASSIGN(Browser); |
1214 }; | 1221 }; |
1215 | 1222 |
1216 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1223 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |