| 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 CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ |
| 6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ | 6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "extensions/browser/extension_function_dispatcher.h" | 9 #include "extensions/browser/extension_function_dispatcher.h" |
| 10 #include "extensions/browser/guest_view/guest_view.h" | 10 #include "extensions/browser/guest_view/guest_view.h" |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 class BrowserContext; | 14 class BrowserContext; |
| 15 } | 15 } |
| 16 | 16 |
| 17 class ExtensionOptionsGuest | 17 class ExtensionOptionsGuest |
| 18 : public extensions::GuestView<ExtensionOptionsGuest>, | 18 : public extensions::GuestView<ExtensionOptionsGuest>, |
| 19 public extensions::ExtensionFunctionDispatcher::Delegate { | 19 public extensions::ExtensionFunctionDispatcher::Delegate { |
| 20 public: | 20 public: |
| 21 static const char Type[]; | 21 static const char Type[]; |
| 22 static extensions::GuestViewBase* Create( | 22 static extensions::GuestViewBase* Create( |
| 23 content::BrowserContext* browser_context, int guest_instance_id); | 23 content::BrowserContext* browser_context, int guest_instance_id); |
| 24 | 24 |
| 25 // GuestViewBase implementation. | 25 // GuestViewBase implementation. |
| 26 virtual const char* GetAPINamespace() OVERRIDE; | |
| 27 virtual void CreateWebContents( | 26 virtual void CreateWebContents( |
| 28 const std::string& embedder_extension_id, | 27 const std::string& embedder_extension_id, |
| 29 int embedder_render_process_id, | 28 int embedder_render_process_id, |
| 30 const base::DictionaryValue& create_params, | 29 const base::DictionaryValue& create_params, |
| 31 const WebContentsCreatedCallback& callback) OVERRIDE; | 30 const WebContentsCreatedCallback& callback) OVERRIDE; |
| 32 virtual void DidAttachToEmbedder() OVERRIDE; | 31 virtual void DidAttachToEmbedder() OVERRIDE; |
| 33 virtual void DidInitialize() OVERRIDE; | 32 virtual void DidInitialize() OVERRIDE; |
| 34 virtual void DidStopLoading() OVERRIDE; | 33 virtual void DidStopLoading() OVERRIDE; |
| 34 virtual const char* GetAPINamespace() const OVERRIDE; |
| 35 virtual base::string16 GetTaskName() const OVERRIDE; |
| 35 virtual void GuestSizeChangedDueToAutoSize( | 36 virtual void GuestSizeChangedDueToAutoSize( |
| 36 const gfx::Size& old_size, | 37 const gfx::Size& old_size, |
| 37 const gfx::Size& new_size) OVERRIDE; | 38 const gfx::Size& new_size) OVERRIDE; |
| 38 virtual bool IsAutoSizeSupported() const OVERRIDE; | 39 virtual bool IsAutoSizeSupported() const OVERRIDE; |
| 39 | 40 |
| 40 // ExtensionFunctionDispatcher::Delegate implementation. | 41 // ExtensionFunctionDispatcher::Delegate implementation. |
| 41 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; | 42 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; |
| 42 | 43 |
| 43 // content::WebContentsDelegate implementation. | 44 // content::WebContentsDelegate implementation. |
| 44 virtual bool ShouldCreateWebContents( | 45 virtual bool ShouldCreateWebContents( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 61 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 62 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
| 62 | 63 |
| 63 scoped_ptr<extensions::ExtensionFunctionDispatcher> | 64 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
| 64 extension_function_dispatcher_; | 65 extension_function_dispatcher_; |
| 65 GURL options_page_; | 66 GURL options_page_; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest); | 68 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H
_ | 71 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H
_ |
| OLD | NEW |