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" | |
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/tab_contents/page_navigator.h" | 40 #include "content/browser/tab_contents/page_navigator.h" |
42 #include "content/browser/tab_contents/tab_contents_delegate.h" | 41 #include "content/browser/tab_contents/tab_contents_delegate.h" |
43 #include "content/common/notification_registrar.h" | 42 #include "content/common/notification_registrar.h" |
44 #include "content/common/page_transition_types.h" | 43 #include "content/common/page_transition_types.h" |
(...skipping 17 matching lines...) Expand all Loading... |
62 namespace gfx { | 61 namespace gfx { |
63 class Point; | 62 class Point; |
64 } | 63 } |
65 | 64 |
66 class Browser : public TabHandlerDelegate, | 65 class Browser : public TabHandlerDelegate, |
67 public TabContentsDelegate, | 66 public TabContentsDelegate, |
68 public TabContentsWrapperDelegate, | 67 public TabContentsWrapperDelegate, |
69 public SearchEngineTabHelperDelegate, | 68 public SearchEngineTabHelperDelegate, |
70 public BlockedContentTabHelperDelegate, | 69 public BlockedContentTabHelperDelegate, |
71 public BookmarkTabHelperDelegate, | 70 public BookmarkTabHelperDelegate, |
72 public DownloadTabHelperDelegate, | |
73 public PageNavigator, | 71 public PageNavigator, |
74 public CommandUpdater::CommandUpdaterDelegate, | 72 public CommandUpdater::CommandUpdaterDelegate, |
75 public NotificationObserver, | 73 public NotificationObserver, |
76 public SelectFileDialog::Listener, | 74 public SelectFileDialog::Listener, |
77 public TabRestoreServiceObserver, | 75 public TabRestoreServiceObserver, |
78 public ProfileSyncServiceObserver, | 76 public ProfileSyncServiceObserver, |
79 public InstantDelegate { | 77 public InstantDelegate { |
80 public: | 78 public: |
81 // SessionService::WindowType mirrors these values. If you add to this | 79 // SessionService::WindowType mirrors these values. If you add to this |
82 // enum, look at SessionService::WindowType to see if it needs to be | 80 // enum, look at SessionService::WindowType to see if it needs to be |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 virtual bool TakeFocus(bool reverse); | 804 virtual bool TakeFocus(bool reverse); |
807 virtual bool IsApplication() const; | 805 virtual bool IsApplication() const; |
808 virtual void ConvertContentsToApplication(TabContents* source); | 806 virtual void ConvertContentsToApplication(TabContents* source); |
809 virtual bool ShouldDisplayURLField(); | 807 virtual bool ShouldDisplayURLField(); |
810 virtual void BeforeUnloadFired(TabContents* source, | 808 virtual void BeforeUnloadFired(TabContents* source, |
811 bool proceed, | 809 bool proceed, |
812 bool* proceed_to_fire_unload); | 810 bool* proceed_to_fire_unload); |
813 virtual void SetFocusToLocationBar(bool select_all); | 811 virtual void SetFocusToLocationBar(bool select_all); |
814 virtual void RenderWidgetShowing(); | 812 virtual void RenderWidgetShowing(); |
815 virtual int GetExtraRenderViewHeight() const; | 813 virtual int GetExtraRenderViewHeight() const; |
| 814 virtual void OnStartDownload(DownloadItem* download, TabContents* tab); |
816 virtual void ShowPageInfo(Profile* profile, | 815 virtual void ShowPageInfo(Profile* profile, |
817 const GURL& url, | 816 const GURL& url, |
818 const NavigationEntry::SSLStatus& ssl, | 817 const NavigationEntry::SSLStatus& ssl, |
819 bool show_history); | 818 bool show_history); |
820 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url); | 819 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url); |
821 virtual void ViewSourceForFrame(TabContents* source, | 820 virtual void ViewSourceForFrame(TabContents* source, |
822 const GURL& frame_url, | 821 const GURL& frame_url, |
823 const std::string& frame_content_state); | 822 const std::string& frame_content_state); |
824 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 823 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
825 bool* is_keyboard_shortcut); | 824 bool* is_keyboard_shortcut); |
(...skipping 26 matching lines...) Expand all Loading... |
852 Profile* profile) OVERRIDE; | 851 Profile* profile) OVERRIDE; |
853 | 852 |
854 // Overridden from BlockedContentTabHelperDelegate: | 853 // Overridden from BlockedContentTabHelperDelegate: |
855 virtual TabContentsWrapper* GetConstrainingContentsWrapper( | 854 virtual TabContentsWrapper* GetConstrainingContentsWrapper( |
856 TabContentsWrapper* source) OVERRIDE; | 855 TabContentsWrapper* source) OVERRIDE; |
857 | 856 |
858 // Overridden from BookmarkTabHelperDelegate: | 857 // Overridden from BookmarkTabHelperDelegate: |
859 virtual void URLStarredChanged(TabContentsWrapper* source, | 858 virtual void URLStarredChanged(TabContentsWrapper* source, |
860 bool starred) OVERRIDE; | 859 bool starred) OVERRIDE; |
861 | 860 |
862 // Overridden from DownloadTabHelperDelegate: | |
863 virtual bool CanDownload(int request_id) OVERRIDE; | |
864 virtual void OnStartDownload(DownloadItem* download, | |
865 TabContentsWrapper* tab) OVERRIDE; | |
866 | |
867 | |
868 // Overridden from SelectFileDialog::Listener: | 861 // Overridden from SelectFileDialog::Listener: |
869 virtual void FileSelected(const FilePath& path, int index, void* params); | 862 virtual void FileSelected(const FilePath& path, int index, void* params); |
870 | 863 |
871 // Overridden from NotificationObserver: | 864 // Overridden from NotificationObserver: |
872 virtual void Observe(NotificationType type, | 865 virtual void Observe(NotificationType type, |
873 const NotificationSource& source, | 866 const NotificationSource& source, |
874 const NotificationDetails& details); | 867 const NotificationDetails& details); |
875 | 868 |
876 // Overridden from ProfileSyncServiceObserver: | 869 // Overridden from ProfileSyncServiceObserver: |
877 virtual void OnStateChanged(); | 870 virtual void OnStateChanged(); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 // Helper which implements the TabRestoreServiceDelegate interface. | 1208 // Helper which implements the TabRestoreServiceDelegate interface. |
1216 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; | 1209 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; |
1217 | 1210 |
1218 scoped_ptr<InstantController> instant_; | 1211 scoped_ptr<InstantController> instant_; |
1219 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1212 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
1220 | 1213 |
1221 DISALLOW_COPY_AND_ASSIGN(Browser); | 1214 DISALLOW_COPY_AND_ASSIGN(Browser); |
1222 }; | 1215 }; |
1223 | 1216 |
1224 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1217 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |