Chromium Code Reviews| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/prefs/pref_change_registrar.h" | 18 #include "base/prefs/pref_change_registrar.h" |
| 19 #include "base/prefs/pref_member.h" | 19 #include "base/prefs/pref_member.h" |
| 20 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 21 #include "chrome/browser/devtools/devtools_toggle_action.h" | 21 #include "chrome/browser/devtools/devtools_toggle_action.h" |
| 22 #include "chrome/browser/sessions/session_id.h" | 22 #include "chrome/browser/sessions/session_id.h" |
| 23 #include "chrome/browser/tab_contents/language_state.h" | |
| 23 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 24 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
| 24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 25 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
| 25 #include "chrome/browser/ui/browser_navigator.h" | 26 #include "chrome/browser/ui/browser_navigator.h" |
| 26 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 27 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
| 27 #include "chrome/browser/ui/host_desktop.h" | 28 #include "chrome/browser/ui/host_desktop.h" |
| 28 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 29 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
| 29 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" | 30 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" |
| 30 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 31 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 31 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 32 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 32 #include "chrome/browser/ui/zoom/zoom_observer.h" | 33 #include "chrome/browser/ui/zoom/zoom_observer.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 class WebContentsModalDialogHost; | 93 class WebContentsModalDialogHost; |
| 93 } | 94 } |
| 94 | 95 |
| 95 class Browser : public TabStripModelObserver, | 96 class Browser : public TabStripModelObserver, |
| 96 public content::WebContentsDelegate, | 97 public content::WebContentsDelegate, |
| 97 public CoreTabHelperDelegate, | 98 public CoreTabHelperDelegate, |
| 98 public SearchEngineTabHelperDelegate, | 99 public SearchEngineTabHelperDelegate, |
| 99 public ChromeWebModalDialogManagerDelegate, | 100 public ChromeWebModalDialogManagerDelegate, |
| 100 public BookmarkTabHelperDelegate, | 101 public BookmarkTabHelperDelegate, |
| 101 public ZoomObserver, | 102 public ZoomObserver, |
| 103 public LanguageState::Observer, | |
|
sky
2013/10/18 14:31:10
Having Browser implement tons of observers doesn't
hajimehoshi
2013/10/21 10:29:12
Done.
| |
| 102 public content::PageNavigator, | 104 public content::PageNavigator, |
| 103 public content::NotificationObserver, | 105 public content::NotificationObserver, |
| 104 public ui::SelectFileDialog::Listener { | 106 public ui::SelectFileDialog::Listener { |
| 105 public: | 107 public: |
| 106 // SessionService::WindowType mirrors these values. If you add to this | 108 // SessionService::WindowType mirrors these values. If you add to this |
| 107 // enum, look at SessionService::WindowType to see if it needs to be | 109 // enum, look at SessionService::WindowType to see if it needs to be |
| 108 // updated. | 110 // updated. |
| 109 enum Type { | 111 enum Type { |
| 110 // If you add a new type, consider updating the test | 112 // If you add a new type, consider updating the test |
| 111 // BrowserTest.StartMaximized. | 113 // BrowserTest.StartMaximized. |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 675 GetWebContentsModalDialogHost() OVERRIDE; | 677 GetWebContentsModalDialogHost() OVERRIDE; |
| 676 | 678 |
| 677 // Overridden from BookmarkTabHelperDelegate: | 679 // Overridden from BookmarkTabHelperDelegate: |
| 678 virtual void URLStarredChanged(content::WebContents* web_contents, | 680 virtual void URLStarredChanged(content::WebContents* web_contents, |
| 679 bool starred) OVERRIDE; | 681 bool starred) OVERRIDE; |
| 680 | 682 |
| 681 // Overridden from ZoomObserver: | 683 // Overridden from ZoomObserver: |
| 682 virtual void OnZoomChanged(content::WebContents* source, | 684 virtual void OnZoomChanged(content::WebContents* source, |
| 683 bool can_show_bubble) OVERRIDE; | 685 bool can_show_bubble) OVERRIDE; |
| 684 | 686 |
| 687 // Overridden from LanguageState::Observer | |
| 688 virtual void OnTranslateEnabledChanged(content::WebContents* source) | |
| 689 OVERRIDE; | |
| 690 | |
| 685 // Overridden from SelectFileDialog::Listener: | 691 // Overridden from SelectFileDialog::Listener: |
| 686 virtual void FileSelected(const base::FilePath& path, | 692 virtual void FileSelected(const base::FilePath& path, |
| 687 int index, | 693 int index, |
| 688 void* params) OVERRIDE; | 694 void* params) OVERRIDE; |
| 689 virtual void FileSelectedWithExtraInfo( | 695 virtual void FileSelectedWithExtraInfo( |
| 690 const ui::SelectedFileInfo& file_info, | 696 const ui::SelectedFileInfo& file_info, |
| 691 int index, | 697 int index, |
| 692 void* params) OVERRIDE; | 698 void* params) OVERRIDE; |
| 693 | 699 |
| 694 // Overridden from content::NotificationObserver: | 700 // Overridden from content::NotificationObserver: |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 935 // The following factory is used for chrome update coalescing. | 941 // The following factory is used for chrome update coalescing. |
| 936 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 942 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
| 937 | 943 |
| 938 // The following factory is used to close the frame at a later time. | 944 // The following factory is used to close the frame at a later time. |
| 939 base::WeakPtrFactory<Browser> weak_factory_; | 945 base::WeakPtrFactory<Browser> weak_factory_; |
| 940 | 946 |
| 941 DISALLOW_COPY_AND_ASSIGN(Browser); | 947 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 942 }; | 948 }; |
| 943 | 949 |
| 944 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 950 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |