OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ |
| 6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ |
| 7 |
| 8 #include "chrome/browser/guest_view/guest_view.h" |
| 9 #include "extensions/browser/extension_function_dispatcher.h" |
| 10 |
| 11 class ExtensionOptionsGuest |
| 12 : public GuestView<ExtensionOptionsGuest>, |
| 13 public extensions::ExtensionFunctionDispatcher::Delegate { |
| 14 public: |
| 15 static const char Type[]; |
| 16 |
| 17 ExtensionOptionsGuest(content::BrowserContext* browser_context, |
| 18 int guest_instance_id); |
| 19 |
| 20 // GuestViewBase implementation |
| 21 virtual bool CanEmbedderUseGuestView( |
| 22 const std::string& embedder_extension_id) OVERRIDE; |
| 23 virtual void CreateWebContents( |
| 24 const std::string& embedder_extension_id, |
| 25 int embedder_render_process_id, |
| 26 const base::DictionaryValue& create_params, |
| 27 const WebContentsCreatedCallback& callback) OVERRIDE; |
| 28 virtual void DidAttachToEmbedder() OVERRIDE; |
| 29 virtual void DidInitialize() OVERRIDE; |
| 30 |
| 31 // ExtensionFunctionDispatcher::Delegate implementation |
| 32 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; |
| 33 |
| 34 // content::WebContentsObserver implementation. |
| 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 36 |
| 37 private: |
| 38 virtual ~ExtensionOptionsGuest(); |
| 39 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
| 40 |
| 41 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
| 42 extension_function_dispatcher_; |
| 43 GURL options_page_; |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H
_ |
OLD | NEW |