Chromium Code Reviews| Index: extensions/renderer/guest_view/guest_view_container.h |
| diff --git a/extensions/renderer/guest_view/guest_view_container.h b/extensions/renderer/guest_view/guest_view_container.h |
| index 68db47fe21cd5639e52cca531fee57270dabef71..1cb9eb0912d46eee1a68782a75dbbb9846795eb5 100644 |
| --- a/extensions/renderer/guest_view/guest_view_container.h |
| +++ b/extensions/renderer/guest_view/guest_view_container.h |
| @@ -5,14 +5,14 @@ |
| #ifndef CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
| #define CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/values.h" |
| #include "content/public/renderer/browser_plugin_delegate.h" |
| - |
| #include "content/public/renderer/render_frame_observer.h" |
| -#include "ipc/ipc_listener.h" |
| +#include "extensions/renderer/scoped_persistent.h" |
| namespace extensions { |
| -// TODO(lazyboy): This should live under /extensions. |
| class GuestViewContainer : public content::BrowserPluginDelegate, |
| public content::RenderFrameObserver { |
| public: |
| @@ -20,6 +20,15 @@ class GuestViewContainer : public content::BrowserPluginDelegate, |
| const std::string& mime_type); |
| virtual ~GuestViewContainer(); |
| + static GuestViewContainer* FromID(int render_view_routing_id, |
| + int element_instance_id); |
| + |
| + void AttachGuest(int element_instance_id, |
| + int guest_instance_id, |
| + scoped_ptr<base::DictionaryValue> params, |
| + v8::Handle<v8::Function> callback, |
| + v8::Isolate* isolate); |
| + |
| // BrowserPluginDelegate implementation. |
| virtual void SetElementInstanceID(int element_instance_id) OVERRIDE; |
| virtual void DidFinishLoading() OVERRIDE; |
| @@ -31,11 +40,20 @@ class GuestViewContainer : public content::BrowserPluginDelegate, |
| private: |
| void OnCreateMimeHandlerViewGuestACK(int element_instance_id); |
| + void OnGuestAttached(int element_instance_id, int guest_routing_id); |
| + |
| + static bool ShouldHandleMessage(const IPC::Message& mesage); |
| const std::string mime_type_; |
| int element_instance_id_; |
| std::string html_string_; |
| + bool attached_; |
| + bool attach_pending_; |
| + |
| + ScopedPersistent<v8::Function> callback_; |
| + v8::Isolate* isolate_; |
|
lazyboy
2014/09/17 18:24:00
What about the lifetime of this?
I don't know much
Fady Samuel
2014/09/17 20:25:46
Acknowledged.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); |
| }; |