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_RENDERER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_DELEGATE_H_ | 5 #ifndef CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
6 #define CHROME_RENDERER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_DELEGATE_H_ | 6 #define CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
7 | 7 |
8 #include "content/public/renderer/browser_plugin_delegate.h" | 8 #include "content/public/renderer/browser_plugin_delegate.h" |
9 | 9 |
10 #include "content/public/renderer/render_frame_observer.h" | 10 #include "content/public/renderer/render_frame_observer.h" |
11 #include "ipc/ipc_listener.h" | 11 #include "ipc/ipc_listener.h" |
12 | 12 |
| 13 namespace extensions { |
| 14 |
13 // TODO(lazyboy): This should live under /extensions. | 15 // TODO(lazyboy): This should live under /extensions. |
14 class ChromeBrowserPluginDelegate : public content::BrowserPluginDelegate, | 16 class GuestViewContainer : public content::BrowserPluginDelegate, |
15 public content::RenderFrameObserver { | 17 public content::RenderFrameObserver { |
16 public: | 18 public: |
17 ChromeBrowserPluginDelegate(content::RenderFrame* render_frame, | 19 GuestViewContainer(content::RenderFrame* render_frame, |
18 const std::string& mime_type); | 20 const std::string& mime_type); |
19 virtual ~ChromeBrowserPluginDelegate(); | 21 virtual ~GuestViewContainer(); |
20 | 22 |
21 // BrowserPluginDelegate implementation. | 23 // BrowserPluginDelegate implementation. |
22 virtual void SetElementInstanceID(int element_instance_id) OVERRIDE; | 24 virtual void SetElementInstanceID(int element_instance_id) OVERRIDE; |
23 virtual void DidFinishLoading() OVERRIDE; | 25 virtual void DidFinishLoading() OVERRIDE; |
24 virtual void DidReceiveData(const char* data, int data_length) OVERRIDE; | 26 virtual void DidReceiveData(const char* data, int data_length) OVERRIDE; |
25 | 27 |
26 // RenderFrameObserver override. | 28 // RenderFrameObserver override. |
27 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
28 | 30 |
29 private: | 31 private: |
30 void OnCreateMimeHandlerViewGuestACK(int browser_plugin_delegate); | 32 void OnCreateMimeHandlerViewGuestACK(int element_instance_id); |
31 | 33 |
32 const std::string mime_type_; | 34 const std::string mime_type_; |
33 int element_instance_id_; | 35 int element_instance_id_; |
34 std::string html_string_; | 36 std::string html_string_; |
35 | 37 |
36 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPluginDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); |
37 }; | 39 }; |
38 | 40 |
39 #endif // CHROME_RENDERER_BROWSER_PLUGIN_CHROME_BROWSER_PLUGIN_DELEGATE_H_ | 41 } // namespace extensions |
| 42 |
| 43 #endif // CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
OLD | NEW |