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