| 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/public/pref_change_registrar.h" | 18 #include "base/prefs/public/pref_change_registrar.h" |
| 19 #include "base/prefs/public/pref_observer.h" |
| 19 #include "base/string16.h" | 20 #include "base/string16.h" |
| 20 #include "chrome/browser/api/prefs/pref_member.h" | 21 #include "chrome/browser/api/prefs/pref_member.h" |
| 21 #include "chrome/browser/debugger/devtools_toggle_action.h" | 22 #include "chrome/browser/debugger/devtools_toggle_action.h" |
| 22 #include "chrome/browser/event_disposition.h" | 23 #include "chrome/browser/event_disposition.h" |
| 23 #include "chrome/browser/sessions/session_id.h" | 24 #include "chrome/browser/sessions/session_id.h" |
| 24 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" | 25 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" |
| 25 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 26 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
| 26 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 27 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
| 27 #include "chrome/browser/ui/browser_navigator.h" | 28 #include "chrome/browser/ui/browser_navigator.h" |
| 28 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" | 29 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" |
| 29 #include "chrome/browser/ui/host_desktop.h" | 30 #include "chrome/browser/ui/host_desktop.h" |
| 30 #include "chrome/browser/ui/search/search_model_observer.h" | 31 #include "chrome/browser/ui/search/search_model_observer.h" |
| 31 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 32 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
| 32 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" | 33 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" |
| 33 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 34 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 35 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 35 #include "chrome/browser/ui/zoom/zoom_observer.h" | 36 #include "chrome/browser/ui/zoom/zoom_observer.h" |
| 36 #include "chrome/common/content_settings.h" | 37 #include "chrome/common/content_settings.h" |
| 37 #include "chrome/common/content_settings_types.h" | 38 #include "chrome/common/content_settings_types.h" |
| 38 #include "chrome/common/extensions/extension_constants.h" | 39 #include "chrome/common/extensions/extension_constants.h" |
| 40 #include "content/public/browser/notification_observer.h" |
| 39 #include "content/public/browser/notification_registrar.h" | 41 #include "content/public/browser/notification_registrar.h" |
| 40 #include "content/public/browser/page_navigator.h" | 42 #include "content/public/browser/page_navigator.h" |
| 41 #include "content/public/browser/web_contents_delegate.h" | 43 #include "content/public/browser/web_contents_delegate.h" |
| 42 #include "content/public/common/page_transition_types.h" | 44 #include "content/public/common/page_transition_types.h" |
| 43 #include "content/public/common/page_zoom.h" | 45 #include "content/public/common/page_zoom.h" |
| 44 #include "ui/base/dialogs/select_file_dialog.h" | 46 #include "ui/base/dialogs/select_file_dialog.h" |
| 45 #include "ui/base/ui_base_types.h" | 47 #include "ui/base/ui_base_types.h" |
| 46 #include "ui/gfx/rect.h" | 48 #include "ui/gfx/rect.h" |
| 47 | 49 |
| 48 class BrowserContentSettingBubbleModelDelegate; | 50 class BrowserContentSettingBubbleModelDelegate; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 class Browser : public TabStripModelObserver, | 101 class Browser : public TabStripModelObserver, |
| 100 public content::WebContentsDelegate, | 102 public content::WebContentsDelegate, |
| 101 public CoreTabHelperDelegate, | 103 public CoreTabHelperDelegate, |
| 102 public SearchEngineTabHelperDelegate, | 104 public SearchEngineTabHelperDelegate, |
| 103 public ConstrainedWindowTabHelperDelegate, | 105 public ConstrainedWindowTabHelperDelegate, |
| 104 public BlockedContentTabHelperDelegate, | 106 public BlockedContentTabHelperDelegate, |
| 105 public BookmarkTabHelperDelegate, | 107 public BookmarkTabHelperDelegate, |
| 106 public ZoomObserver, | 108 public ZoomObserver, |
| 107 public content::PageNavigator, | 109 public content::PageNavigator, |
| 108 public content::NotificationObserver, | 110 public content::NotificationObserver, |
| 111 public PrefObserver, |
| 109 public ui::SelectFileDialog::Listener, | 112 public ui::SelectFileDialog::Listener, |
| 110 public chrome::search::SearchModelObserver { | 113 public chrome::search::SearchModelObserver { |
| 111 public: | 114 public: |
| 112 // SessionService::WindowType mirrors these values. If you add to this | 115 // SessionService::WindowType mirrors these values. If you add to this |
| 113 // enum, look at SessionService::WindowType to see if it needs to be | 116 // enum, look at SessionService::WindowType to see if it needs to be |
| 114 // updated. | 117 // updated. |
| 115 enum Type { | 118 enum Type { |
| 116 // If you add a new type, consider updating the test | 119 // If you add a new type, consider updating the test |
| 117 // BrowserTest.StartMaximized. | 120 // BrowserTest.StartMaximized. |
| 118 TYPE_TABBED = 1, | 121 TYPE_TABBED = 1, |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 virtual void FileSelectedWithExtraInfo( | 685 virtual void FileSelectedWithExtraInfo( |
| 683 const ui::SelectedFileInfo& file_info, | 686 const ui::SelectedFileInfo& file_info, |
| 684 int index, | 687 int index, |
| 685 void* params) OVERRIDE; | 688 void* params) OVERRIDE; |
| 686 | 689 |
| 687 // Overridden from content::NotificationObserver: | 690 // Overridden from content::NotificationObserver: |
| 688 virtual void Observe(int type, | 691 virtual void Observe(int type, |
| 689 const content::NotificationSource& source, | 692 const content::NotificationSource& source, |
| 690 const content::NotificationDetails& details) OVERRIDE; | 693 const content::NotificationDetails& details) OVERRIDE; |
| 691 | 694 |
| 695 // Overridden from PrefObserver: |
| 696 virtual void OnPreferenceChanged(PrefServiceBase* service, |
| 697 const std::string& pref_name) OVERRIDE; |
| 698 |
| 692 // Overridden from chrome::search::SearchModelObserver: | 699 // Overridden from chrome::search::SearchModelObserver: |
| 693 virtual void ModeChanged(const chrome::search::Mode& old_mode, | 700 virtual void ModeChanged(const chrome::search::Mode& old_mode, |
| 694 const chrome::search::Mode& new_mode) OVERRIDE; | 701 const chrome::search::Mode& new_mode) OVERRIDE; |
| 695 | 702 |
| 696 // Command and state updating /////////////////////////////////////////////// | 703 // Command and state updating /////////////////////////////////////////////// |
| 697 | 704 |
| 698 // Set the preference that indicates that the home page has been changed. | 705 // Set the preference that indicates that the home page has been changed. |
| 699 void MarkHomePageAsChanged(PrefService* pref_service); | 706 void MarkHomePageAsChanged(PrefService* pref_service); |
| 700 | 707 |
| 701 // UI update coalescing and handling //////////////////////////////////////// | 708 // UI update coalescing and handling //////////////////////////////////////// |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 bool window_has_shown_; | 946 bool window_has_shown_; |
| 940 | 947 |
| 941 // Currently open color chooser. Non-NULL after OpenColorChooser is called and | 948 // Currently open color chooser. Non-NULL after OpenColorChooser is called and |
| 942 // before DidEndColorChooser is called. | 949 // before DidEndColorChooser is called. |
| 943 scoped_ptr<content::ColorChooser> color_chooser_; | 950 scoped_ptr<content::ColorChooser> color_chooser_; |
| 944 | 951 |
| 945 DISALLOW_COPY_AND_ASSIGN(Browser); | 952 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 946 }; | 953 }; |
| 947 | 954 |
| 948 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 955 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |