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

Unified Diff: extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h

Issue 562353002: Refactor ExtensionOptionsGuestDelegate to have an ExtensionOptionsGuest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h b/extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h
index fd5641f0673359b27fb7b946ed9ef8ab132e65e1..bbeed9075ee3d2b98d4d069fbdf915b5268296f9 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest_delegate.h
@@ -5,6 +5,8 @@
#ifndef EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_DELEGATE_H_
#define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_DELEGATE_H_
+#include "base/macros.h"
+
namespace content {
struct ContextMenuParams;
struct OpenURLParams;
@@ -12,23 +14,32 @@ class WebContents;
}
namespace extensions {
+
+class ExtensionOptionsGuest;
+
// Interface to handle communication between ExtensionOptionsGuest (in
// extensions) with the browser.
class ExtensionOptionsGuestDelegate {
public:
+ explicit ExtensionOptionsGuestDelegate(ExtensionOptionsGuest* guest);
virtual ~ExtensionOptionsGuestDelegate();
- virtual void CreateChromeExtensionWebContentsObserver(
- content::WebContents* web_contents) = 0;
+ // Called from ExtensionOptionsGuest::DidInitialize().
+ virtual void DidInitialize() = 0;
// Shows the context menu for the guest.
// Returns true if the context menu was handled.
- virtual bool HandleContextMenu(content::WebContents* web_contents,
- const content::ContextMenuParams& params) = 0;
+ virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0;
virtual content::WebContents* OpenURLInNewTab(
- content::WebContents* embedder_web_contents,
const content::OpenURLParams& params) = 0;
+
+ ExtensionOptionsGuest* extension_options_guest() const { return guest_; }
+
+ private:
+ ExtensionOptionsGuest* const guest_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuestDelegate);
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698