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