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

Side by Side 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: Change CreateChromeExtensionWebContentsObserver to DidInitialize 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ DELEGATE_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ DELEGATE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ DELEGATE_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ DELEGATE_H_
7 7
8 #include "base/macros.h"
9
8 namespace content { 10 namespace content {
9 struct ContextMenuParams; 11 struct ContextMenuParams;
10 struct OpenURLParams; 12 struct OpenURLParams;
11 class WebContents; 13 class WebContents;
12 } 14 }
13 15
14 namespace extensions { 16 namespace extensions {
17
18 class ExtensionOptionsGuest;
19
15 // Interface to handle communication between ExtensionOptionsGuest (in 20 // Interface to handle communication between ExtensionOptionsGuest (in
16 // extensions) with the browser. 21 // extensions) with the browser.
17 class ExtensionOptionsGuestDelegate { 22 class ExtensionOptionsGuestDelegate {
18 public: 23 public:
24 explicit ExtensionOptionsGuestDelegate(ExtensionOptionsGuest* guest);
19 virtual ~ExtensionOptionsGuestDelegate(); 25 virtual ~ExtensionOptionsGuestDelegate();
20 26
21 virtual void CreateChromeExtensionWebContentsObserver( 27 virtual void DidInitialize() = 0;
Yoyo Zhou 2014/09/11 20:17:26 Comment that this is called from ExtensionOptionsG
22 content::WebContents* web_contents) = 0;
23 28
24 // Shows the context menu for the guest. 29 // Shows the context menu for the guest.
25 // Returns true if the context menu was handled. 30 // Returns true if the context menu was handled.
26 virtual bool HandleContextMenu(content::WebContents* web_contents, 31 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0;
27 const content::ContextMenuParams& params) = 0;
28 32
29 virtual content::WebContents* OpenURLInNewTab( 33 virtual content::WebContents* OpenURLInNewTab(
30 content::WebContents* embedder_web_contents,
31 const content::OpenURLParams& params) = 0; 34 const content::OpenURLParams& params) = 0;
35
36 ExtensionOptionsGuest* extension_options_guest() const { return guest_; }
37
38 private:
39 ExtensionOptionsGuest* const guest_;
40
41 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuestDelegate);
32 }; 42 };
33 43
34 } // namespace extensions 44 } // namespace extensions
35 45
36 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE ST_DELEGATE_H_ 46 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE ST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698