| 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 EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_
H_ |
| 6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ | 6 #define EXTENSIONS_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/extension_options/extension_options_gues
t_delegate.h" |
| 10 #include "extensions/browser/guest_view/guest_view.h" | 11 #include "extensions/browser/guest_view/guest_view.h" |
| 11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 class BrowserContext; | 15 class BrowserContext; |
| 15 } | 16 } |
| 16 | 17 |
| 17 class ExtensionOptionsGuest | 18 class ExtensionOptionsGuest |
| 18 : public extensions::GuestView<ExtensionOptionsGuest>, | 19 : public extensions::GuestView<ExtensionOptionsGuest>, |
| 19 public extensions::ExtensionFunctionDispatcher::Delegate { | 20 public extensions::ExtensionFunctionDispatcher::Delegate { |
| 20 public: | 21 public: |
| 21 static const char Type[]; | 22 static const char Type[]; |
| 22 static extensions::GuestViewBase* Create( | 23 static extensions::GuestViewBase* Create( |
| 23 content::BrowserContext* browser_context, int guest_instance_id); | 24 content::BrowserContext* browser_context, |
| 25 int guest_instance_id); |
| 24 | 26 |
| 25 // GuestViewBase implementation. | 27 // GuestViewBase implementation. |
| 26 virtual void CreateWebContents( | 28 virtual void CreateWebContents( |
| 27 const std::string& embedder_extension_id, | 29 const std::string& embedder_extension_id, |
| 28 int embedder_render_process_id, | 30 int embedder_render_process_id, |
| 29 const base::DictionaryValue& create_params, | 31 const base::DictionaryValue& create_params, |
| 30 const WebContentsCreatedCallback& callback) OVERRIDE; | 32 const WebContentsCreatedCallback& callback) OVERRIDE; |
| 31 virtual void DidAttachToEmbedder() OVERRIDE; | 33 virtual void DidAttachToEmbedder() OVERRIDE; |
| 32 virtual void DidInitialize() OVERRIDE; | 34 virtual void DidInitialize() OVERRIDE; |
| 33 virtual void DidStopLoading() OVERRIDE; | 35 virtual void DidStopLoading() OVERRIDE; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 62 | 64 |
| 63 private: | 65 private: |
| 64 ExtensionOptionsGuest(content::BrowserContext* browser_context, | 66 ExtensionOptionsGuest(content::BrowserContext* browser_context, |
| 65 int guest_instance_id); | 67 int guest_instance_id); |
| 66 virtual ~ExtensionOptionsGuest(); | 68 virtual ~ExtensionOptionsGuest(); |
| 67 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 69 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
| 68 void SetUpAutoSize(); | 70 void SetUpAutoSize(); |
| 69 | 71 |
| 70 scoped_ptr<extensions::ExtensionFunctionDispatcher> | 72 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
| 71 extension_function_dispatcher_; | 73 extension_function_dispatcher_; |
| 74 scoped_ptr<extensions::ExtensionOptionsGuestDelegate> |
| 75 extension_options_guest_delegate_; |
| 72 GURL options_page_; | 76 GURL options_page_; |
| 73 | 77 |
| 74 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest); | 78 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest); |
| 75 }; | 79 }; |
| 76 | 80 |
| 77 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H
_ | 81 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE
ST_H_ |
| OLD | NEW |