OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_HELPER_H__ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_HELPER_H__ |
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_HELPER_H__ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_HELPER_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "content/public/browser/render_view_host_observer.h" | 11 #include "content/public/browser/render_view_host_observer.h" |
12 #include "ipc/ipc_channel_handle.h" | 12 #include "ipc/ipc_channel_handle.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Size; | 15 class Size; |
16 } | 16 } |
17 | 17 |
18 namespace content { | 18 namespace content { |
| 19 namespace old { |
19 | 20 |
20 class BrowserPluginHost; | 21 class BrowserPluginHost; |
21 | 22 |
22 // This class acts as a plumber helper for BrowserPluginHost. A lot | 23 // This class acts as a plumber helper for BrowserPluginHost. A lot |
23 // of messages coming from guests need to know the guest's RenderViewHost. | 24 // of messages coming from guests need to know the guest's RenderViewHost. |
24 // BrowserPluginHostHelper handles BrowserPluginHost messages and relays | 25 // BrowserPluginHostHelper handles BrowserPluginHost messages and relays |
25 // them with their associated RenderViewHosts to BrowserPluginHost where they | 26 // them with their associated RenderViewHosts to BrowserPluginHost where they |
26 // will be handled. | 27 // will be handled. |
27 class BrowserPluginHostHelper : public RenderViewHostObserver { | 28 class BrowserPluginHostHelper : public RenderViewHostObserver { |
28 public: | 29 public: |
29 BrowserPluginHostHelper(BrowserPluginHost* browser_plugin_host, | 30 BrowserPluginHostHelper(BrowserPluginHost* browser_plugin_host, |
30 RenderViewHost* render_view_host); | 31 RenderViewHost* render_view_host); |
31 virtual ~BrowserPluginHostHelper(); | 32 virtual ~BrowserPluginHostHelper(); |
32 | 33 |
33 private: | 34 private: |
34 void OnConnectToChannel(const IPC::ChannelHandle& channel_handle); | 35 void OnConnectToChannel(const IPC::ChannelHandle& channel_handle); |
35 void OnNavigateGuestFromEmbedder(int container_instance_id, | 36 void OnNavigateGuestFromEmbedder(int container_instance_id, |
36 long long frame_id, | 37 long long frame_id, |
37 const std::string& src); | 38 const std::string& src); |
38 void OnResizeGuest(int width, int height); | 39 void OnResizeGuest(int width, int height); |
39 | 40 |
40 // RenderViewHostObserver implementation. | 41 // RenderViewHostObserver implementation. |
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 42 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
42 | 43 |
43 BrowserPluginHost* browser_plugin_host_; | 44 BrowserPluginHost* browser_plugin_host_; |
44 | 45 |
45 DISALLOW_COPY_AND_ASSIGN(BrowserPluginHostHelper); | 46 DISALLOW_COPY_AND_ASSIGN(BrowserPluginHostHelper); |
46 }; | 47 }; |
47 | 48 |
| 49 } // namespace old |
48 } // namespace content | 50 } // namespace content |
49 | 51 |
50 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_HELPER_H__ | 52 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_HELPER_H__ |
51 | 53 |
OLD | NEW |