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

Side by Side Diff: chrome/browser/extensions/extension_view_host.h

Issue 964193002: Cleanup/ Remove deprecated extension notification from ExtensionHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/extensions/extension_view_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "components/web_modal/popup_manager.h" 9 #include "components/web_modal/popup_manager.h"
10 #include "components/web_modal/web_contents_modal_dialog_host.h" 10 #include "components/web_modal/web_contents_modal_dialog_host.h"
11 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 11 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h"
12 #include "extensions/browser/extension_host.h" 14 #include "extensions/browser/extension_host.h"
13 15
14 class Browser; 16 class Browser;
15 17
16 namespace content { 18 namespace content {
17 class SiteInstance; 19 class SiteInstance;
18 class WebContents; 20 class WebContents;
19 } 21 }
20 22
21 namespace extensions { 23 namespace extensions {
22 24
23 class ExtensionView; 25 class ExtensionView;
24 26
25 // The ExtensionHost for an extension that backs a view in the browser UI. For 27 // The ExtensionHost for an extension that backs a view in the browser UI. For
26 // example, this could be an extension popup or dialog, but not a background 28 // example, this could be an extension popup or dialog, but not a background
27 // page. 29 // page.
28 // TODO(gbillock): See if we can remove WebContentsModalDialogManager here. 30 // TODO(gbillock): See if we can remove WebContentsModalDialogManager here.
29 class ExtensionViewHost 31 class ExtensionViewHost
30 : public ExtensionHost, 32 : public ExtensionHost,
31 public web_modal::WebContentsModalDialogManagerDelegate, 33 public web_modal::WebContentsModalDialogManagerDelegate,
32 public web_modal::WebContentsModalDialogHost { 34 public web_modal::WebContentsModalDialogHost,
35 public content::NotificationObserver {
33 public: 36 public:
34 ExtensionViewHost(const Extension* extension, 37 ExtensionViewHost(const Extension* extension,
35 content::SiteInstance* site_instance, 38 content::SiteInstance* site_instance,
36 const GURL& url, 39 const GURL& url,
37 ViewType host_type); 40 ViewType host_type);
38 ~ExtensionViewHost() override; 41 ~ExtensionViewHost() override;
39 42
40 ExtensionView* view() { return view_.get(); } 43 ExtensionView* view() { return view_.get(); }
41 const ExtensionView* view() const { return view_.get(); } 44 const ExtensionView* view() const { return view_.get(); }
42 45
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Observer to detect when the associated web contents is destroyed. 123 // Observer to detect when the associated web contents is destroyed.
121 class AssociatedWebContentsObserver; 124 class AssociatedWebContentsObserver;
122 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; 125 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_;
123 126
124 // Manage popups overlaying the WebContents in this EVH. 127 // Manage popups overlaying the WebContents in this EVH.
125 // TODO(gbillock): should usually not be used -- instead use the parent 128 // TODO(gbillock): should usually not be used -- instead use the parent
126 // window's popup manager. Should only be used when the EVH is created without 129 // window's popup manager. Should only be used when the EVH is created without
127 // a parent window. 130 // a parent window.
128 scoped_ptr<web_modal::PopupManager> popup_manager_; 131 scoped_ptr<web_modal::PopupManager> popup_manager_;
129 132
133 content::NotificationRegistrar registrar_;
134
130 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); 135 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost);
131 }; 136 };
132 137
133 } // namespace extensions 138 } // namespace extensions
134 139
135 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 140 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698