| OLD | NEW |
| 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" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 struct ContextMenuParams; | 11 struct ContextMenuParams; |
| 12 struct OpenURLParams; | 12 struct OpenURLParams; |
| 13 class WebContents; | 13 class WebContents; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 class ExtensionOptionsGuest; | 18 class ExtensionOptionsGuest; |
| 19 | 19 |
| 20 // Interface to handle communication between ExtensionOptionsGuest (in | 20 // Interface to handle communication between ExtensionOptionsGuest (in |
| 21 // extensions) with the browser. | 21 // extensions) with the browser. |
| 22 class ExtensionOptionsGuestDelegate { | 22 class ExtensionOptionsGuestDelegate { |
| 23 public: | 23 public: |
| 24 explicit ExtensionOptionsGuestDelegate(ExtensionOptionsGuest* guest); | 24 explicit ExtensionOptionsGuestDelegate(ExtensionOptionsGuest* guest); |
| 25 virtual ~ExtensionOptionsGuestDelegate(); | 25 virtual ~ExtensionOptionsGuestDelegate(); |
| 26 | 26 |
| 27 // Called from ExtensionOptionsGuest::DidInitialize(). | |
| 28 virtual void DidInitialize() = 0; | |
| 29 | |
| 30 // Shows the context menu for the guest. | 27 // Shows the context menu for the guest. |
| 31 // Returns true if the context menu was handled. | 28 // Returns true if the context menu was handled. |
| 32 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; | 29 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; |
| 33 | 30 |
| 34 virtual content::WebContents* OpenURLInNewTab( | 31 virtual content::WebContents* OpenURLInNewTab( |
| 35 const content::OpenURLParams& params) = 0; | 32 const content::OpenURLParams& params) = 0; |
| 36 | 33 |
| 37 ExtensionOptionsGuest* extension_options_guest() const { return guest_; } | 34 ExtensionOptionsGuest* extension_options_guest() const { return guest_; } |
| 38 | 35 |
| 39 private: | 36 private: |
| 40 ExtensionOptionsGuest* const guest_; | 37 ExtensionOptionsGuest* const guest_; |
| 41 | 38 |
| 42 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuestDelegate); | 39 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuestDelegate); |
| 43 }; | 40 }; |
| 44 | 41 |
| 45 } // namespace extensions | 42 } // namespace extensions |
| 46 | 43 |
| 47 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE
ST_DELEGATE_H_ | 44 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE
ST_DELEGATE_H_ |
| OLD | NEW |