Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder_helper.h

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: Address 3 issues: Cleaning up embedder on RVH swap, empty src handling fix, subframe's guest cleanu… Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_EMBEDDER_HELPER_H_
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
12 #include "content/public/browser/render_view_host_observer.h"
13 #include "ipc/ipc_channel_handle.h"
14 #include "ipc/ipc_sync_message.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
16 #include "ui/surface/transport_dib.h"
17 #include "webkit/glue/webcursor.h"
18
19 namespace gfx {
20 class Size;
21 }
22
23 struct BrowserPluginHostMsg_ResizeGuest_Params;
24 struct ViewHostMsg_UpdateRect_Params;
25
26 namespace content {
27
28 class RenderViewHost;
29
30 // Helper for browser plugin embedder.
31 // A lot of messages coming from guests need to know the guest's RenderViewHost.
32 // BrowserPluginEmbedderHelper handles BrowserPluginHostMsg messages and
33 // relays them with their associated RenderViewHosts to its delegate where they
34 // will be handled.
35 class BrowserPluginEmbedderHelper : public RenderViewHostObserver {
36 public:
37 BrowserPluginEmbedderHelper(BrowserPluginEmbedder* embedder,
38 RenderViewHost* render_view_host);
39 virtual ~BrowserPluginEmbedderHelper();
40
41 // Make it public for sync IPCs.
42 virtual bool Send(IPC::Message* message) OVERRIDE;
43
44 private:
45 // Message handlers.
46 void OnNavigateGuest(int instance_id,
47 int64 frame_id,
48 const std::string& src,
49 const gfx::Size& size);
50 void OnResizeGuest(int instance_id,
51 const BrowserPluginHostMsg_ResizeGuest_Params& params);
52 void OnUpdateRectACK(int instance_id, int message_id, const gfx::Size& size);
53 void OnHandleInputEvent(const IPC::SyncMessage& message, bool* handled);
54 void OnSetFocus(int instance_id, bool focused);
55 void OnPluginDestroyed(int instance_id);
56
57 // RenderViewHostObserver implementation.
58 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
59
60 BrowserPluginEmbedder* embedder_;
61
62 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedderHelper);
63 };
64
65 } // namespace content
66
67 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698