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

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

Issue 586933002: Re-Revert "[WebModals] New API for browser-scoped popup management." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: 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
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"
10 #include "components/web_modal/web_contents_modal_dialog_host.h" 9 #include "components/web_modal/web_contents_modal_dialog_host.h"
11 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
12 #include "extensions/browser/extension_host.h" 11 #include "extensions/browser/extension_host.h"
13 12
14 class Browser; 13 class Browser;
15 14
16 namespace content { 15 namespace content {
17 class SiteInstance; 16 class SiteInstance;
18 class WebContents; 17 class WebContents;
19 } 18 }
20 19
21 namespace extensions { 20 namespace extensions {
22 21
23 class ExtensionView; 22 class ExtensionView;
24 23
25 // The ExtensionHost for an extension that backs a view in the browser UI. For 24 // The ExtensionHost for an extension that backs a view in the browser UI. For
26 // example, this could be an extension popup, infobar or dialog, but not a 25 // example, this could be an extension popup, infobar or dialog, but not a
27 // background page. 26 // background page.
28 // TODO(gbillock): See if we can remove WebContentsModalDialogManager here.
29 class ExtensionViewHost 27 class ExtensionViewHost
30 : public ExtensionHost, 28 : public ExtensionHost,
31 public web_modal::WebContentsModalDialogManagerDelegate, 29 public web_modal::WebContentsModalDialogManagerDelegate,
32 public web_modal::WebContentsModalDialogHost { 30 public web_modal::WebContentsModalDialogHost {
33 public: 31 public:
34 ExtensionViewHost(const Extension* extension, 32 ExtensionViewHost(const Extension* extension,
35 content::SiteInstance* site_instance, 33 content::SiteInstance* site_instance,
36 const GURL& url, 34 const GURL& url,
37 ViewType host_type); 35 ViewType host_type);
38 virtual ~ExtensionViewHost(); 36 virtual ~ExtensionViewHost();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Optional view that shows the rendered content in the UI. 123 // Optional view that shows the rendered content in the UI.
126 scoped_ptr<ExtensionView> view_; 124 scoped_ptr<ExtensionView> view_;
127 125
128 // The relevant WebContents associated with this ExtensionViewHost, if any. 126 // The relevant WebContents associated with this ExtensionViewHost, if any.
129 content::WebContents* associated_web_contents_; 127 content::WebContents* associated_web_contents_;
130 128
131 // Observer to detect when the associated web contents is destroyed. 129 // Observer to detect when the associated web contents is destroyed.
132 class AssociatedWebContentsObserver; 130 class AssociatedWebContentsObserver;
133 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; 131 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_;
134 132
135 // Manage popups overlaying the WebContents in this EVH.
136 // TODO(gbillock): should usually not be used -- instead use the parent
137 // window's popup manager. Should only be used when the EVH is created without
138 // a parent window.
139 scoped_ptr<web_modal::PopupManager> popup_manager_;
140
141 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); 133 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost);
142 }; 134 };
143 135
144 } // namespace extensions 136 } // namespace extensions
145 137
146 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 138 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698