Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/ui/browser.h

Issue 562533002: Remove deprecated extension notification from Browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified the comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | chrome/browser/ui/browser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/scoped_observer.h"
20 #include "base/strings/string16.h" 21 #include "base/strings/string16.h"
21 #include "chrome/browser/devtools/devtools_toggle_action.h" 22 #include "chrome/browser/devtools/devtools_toggle_action.h"
22 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" 23 #include "chrome/browser/ui/bookmarks/bookmark_bar.h"
23 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" 24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h"
24 #include "chrome/browser/ui/browser_navigator.h" 25 #include "chrome/browser/ui/browser_navigator.h"
25 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" 26 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h"
26 #include "chrome/browser/ui/host_desktop.h" 27 #include "chrome/browser/ui/host_desktop.h"
27 #include "chrome/browser/ui/search/search_tab_helper_delegate.h" 28 #include "chrome/browser/ui/search/search_tab_helper_delegate.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"
33 #include "chrome/common/content_settings.h" 34 #include "chrome/common/content_settings.h"
34 #include "components/content_settings/core/common/content_settings_types.h" 35 #include "components/content_settings/core/common/content_settings_types.h"
35 #include "components/sessions/session_id.h" 36 #include "components/sessions/session_id.h"
36 #include "content/public/browser/notification_observer.h" 37 #include "content/public/browser/notification_observer.h"
37 #include "content/public/browser/notification_registrar.h" 38 #include "content/public/browser/notification_registrar.h"
38 #include "content/public/browser/page_navigator.h" 39 #include "content/public/browser/page_navigator.h"
39 #include "content/public/browser/web_contents_delegate.h" 40 #include "content/public/browser/web_contents_delegate.h"
40 #include "content/public/common/page_transition_types.h" 41 #include "content/public/common/page_transition_types.h"
41 #include "content/public/common/page_zoom.h" 42 #include "content/public/common/page_zoom.h"
43 #include "extensions/browser/extension_registry_observer.h"
42 #include "ui/base/ui_base_types.h" 44 #include "ui/base/ui_base_types.h"
43 #include "ui/base/window_open_disposition.h" 45 #include "ui/base/window_open_disposition.h"
44 #include "ui/gfx/rect.h" 46 #include "ui/gfx/rect.h"
45 #include "ui/shell_dialogs/select_file_dialog.h" 47 #include "ui/shell_dialogs/select_file_dialog.h"
46 48
47 class BrowserContentSettingBubbleModelDelegate; 49 class BrowserContentSettingBubbleModelDelegate;
48 class BrowserContentTranslateDriverObserver; 50 class BrowserContentTranslateDriverObserver;
49 class BrowserInstantController; 51 class BrowserInstantController;
50 class BrowserSyncedWindowDelegate; 52 class BrowserSyncedWindowDelegate;
51 class BrowserToolbarModelDelegate; 53 class BrowserToolbarModelDelegate;
(...skipping 18 matching lines...) Expand all
70 } 72 }
71 73
72 namespace content { 74 namespace content {
73 class NavigationController; 75 class NavigationController;
74 class PageState; 76 class PageState;
75 class SessionStorageNamespace; 77 class SessionStorageNamespace;
76 } 78 }
77 79
78 namespace extensions { 80 namespace extensions {
79 class Extension; 81 class Extension;
82 class ExtensionRegistry;
80 class WindowController; 83 class WindowController;
81 } 84 }
82 85
83 namespace gfx { 86 namespace gfx {
84 class Image; 87 class Image;
85 class Point; 88 class Point;
86 } 89 }
87 90
88 namespace ui { 91 namespace ui {
89 struct SelectedFileInfo; 92 struct SelectedFileInfo;
90 class WebDialogDelegate; 93 class WebDialogDelegate;
91 } 94 }
92 95
93 namespace web_modal { 96 namespace web_modal {
94 class PopupManager; 97 class PopupManager;
95 class WebContentsModalDialogHost; 98 class WebContentsModalDialogHost;
96 } 99 }
97 100
98 class Browser : public TabStripModelObserver, 101 class Browser : public TabStripModelObserver,
99 public content::WebContentsDelegate, 102 public content::WebContentsDelegate,
100 public CoreTabHelperDelegate, 103 public CoreTabHelperDelegate,
101 public SearchEngineTabHelperDelegate, 104 public SearchEngineTabHelperDelegate,
102 public SearchTabHelperDelegate, 105 public SearchTabHelperDelegate,
103 public ChromeWebModalDialogManagerDelegate, 106 public ChromeWebModalDialogManagerDelegate,
104 public BookmarkTabHelperDelegate, 107 public BookmarkTabHelperDelegate,
105 public ZoomObserver, 108 public ZoomObserver,
106 public content::PageNavigator, 109 public content::PageNavigator,
107 public content::NotificationObserver, 110 public content::NotificationObserver,
111 public extensions::ExtensionRegistryObserver,
108 public ui::SelectFileDialog::Listener { 112 public ui::SelectFileDialog::Listener {
109 public: 113 public:
110 // SessionService::WindowType mirrors these values. If you add to this 114 // SessionService::WindowType mirrors these values. If you add to this
111 // enum, look at SessionService::WindowType to see if it needs to be 115 // enum, look at SessionService::WindowType to see if it needs to be
112 // updated. 116 // updated.
113 enum Type { 117 enum Type {
114 // If you add a new type, consider updating the test 118 // If you add a new type, consider updating the test
115 // BrowserTest.StartMaximized. 119 // BrowserTest.StartMaximized.
116 TYPE_TABBED = 1, 120 TYPE_TABBED = 1,
117 TYPE_POPUP = 2 121 TYPE_POPUP = 2
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 700
697 // Overridden from SelectFileDialog::Listener: 701 // Overridden from SelectFileDialog::Listener:
698 virtual void FileSelected(const base::FilePath& path, 702 virtual void FileSelected(const base::FilePath& path,
699 int index, 703 int index,
700 void* params) OVERRIDE; 704 void* params) OVERRIDE;
701 virtual void FileSelectedWithExtraInfo( 705 virtual void FileSelectedWithExtraInfo(
702 const ui::SelectedFileInfo& file_info, 706 const ui::SelectedFileInfo& file_info,
703 int index, 707 int index,
704 void* params) OVERRIDE; 708 void* params) OVERRIDE;
705 709
710 // Overridden from extensions::ExtensionRegistryObserver:
Peter Kasting 2014/09/10 18:40:21 Nit: Put these after the NotificationObserver over
Jitu( very slow this week) 2014/09/11 06:08:16 Done.
711 virtual void OnExtensionUninstalled(
712 content::BrowserContext* browser_context,
713 const extensions::Extension* extension,
714 extensions::UninstallReason reason) OVERRIDE;
715
716 virtual void OnExtensionUnloaded(
717 content::BrowserContext* browser_context,
718 const extensions::Extension* extension,
719 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
720
721 virtual void OnExtensionLoaded(
722 content::BrowserContext* browser_context,
723 const extensions::Extension* extension) OVERRIDE;
724
706 // Overridden from content::NotificationObserver: 725 // Overridden from content::NotificationObserver:
707 virtual void Observe(int type, 726 virtual void Observe(int type,
708 const content::NotificationSource& source, 727 const content::NotificationSource& source,
709 const content::NotificationDetails& details) OVERRIDE; 728 const content::NotificationDetails& details) OVERRIDE;
710 729
711 // Command and state updating /////////////////////////////////////////////// 730 // Command and state updating ///////////////////////////////////////////////
712 731
713 // Handle changes to kDevTools preference. 732 // Handle changes to kDevTools preference.
714 void OnDevToolsDisabledChanged(); 733 void OnDevToolsDisabledChanged();
715 734
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 const GURL& target_url, 833 const GURL& target_url,
815 const std::string& partition_id, 834 const std::string& partition_id,
816 content::SessionStorageNamespace* session_storage_namespace); 835 content::SessionStorageNamespace* session_storage_namespace);
817 836
818 // Data members ///////////////////////////////////////////////////////////// 837 // Data members /////////////////////////////////////////////////////////////
819 838
820 std::vector<InterstitialObserver*> interstitial_observers_; 839 std::vector<InterstitialObserver*> interstitial_observers_;
821 840
822 content::NotificationRegistrar registrar_; 841 content::NotificationRegistrar registrar_;
823 842
843 ScopedObserver<extensions::ExtensionRegistry,
844 extensions::ExtensionRegistryObserver>
845 extension_registry_observer_;
846
824 PrefChangeRegistrar profile_pref_registrar_; 847 PrefChangeRegistrar profile_pref_registrar_;
825 848
826 // This Browser's type. 849 // This Browser's type.
827 const Type type_; 850 const Type type_;
828 851
829 // This Browser's profile. 852 // This Browser's profile.
830 Profile* const profile_; 853 Profile* const profile_;
831 854
832 // This Browser's window. 855 // This Browser's window.
833 BrowserWindow* window_; 856 BrowserWindow* window_;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 base::WeakPtrFactory<Browser> weak_factory_; 977 base::WeakPtrFactory<Browser> weak_factory_;
955 978
956 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; 979 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_;
957 980
958 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; 981 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_;
959 982
960 DISALLOW_COPY_AND_ASSIGN(Browser); 983 DISALLOW_COPY_AND_ASSIGN(Browser);
961 }; 984 };
962 985
963 #endif // CHROME_BROWSER_UI_BROWSER_H_ 986 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | chrome/browser/ui/browser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698