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

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: Clean up BrowserPluginHostTest, remove unused var, use constants for str. 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 //
32 // A lot of messages coming from guests need to know the guest's RenderViewHost.
33 // BrowserPluginEmbedderHelper handles BrowserPluginHostMsg messages and
34 // relays them with their associated RenderViewHosts to its delegate where they
35 // will be handled.
awong 2012/09/09 18:08:09 Please describe ownership, lifetime, and thread as
lazyboy 2012/09/10 16:30:17 Done.
36 class BrowserPluginEmbedderHelper : public RenderViewHostObserver {
37 public:
38 BrowserPluginEmbedderHelper(BrowserPluginEmbedder* embedder,
39 RenderViewHost* render_view_host);
40 virtual ~BrowserPluginEmbedderHelper();
41
42 // Make it public for sync IPCs.
43 virtual bool Send(IPC::Message* message) OVERRIDE;
44
45 private:
46 // Message handlers.
47 void OnNavigateGuest(int instance_id,
48 int64 frame_id,
49 const std::string& src,
50 const gfx::Size& size);
51 void OnResizeGuest(int instance_id,
52 const BrowserPluginHostMsg_ResizeGuest_Params& params);
53 void OnUpdateRectACK(int instance_id, int message_id, const gfx::Size& size);
54 void OnHandleInputEvent(const IPC::SyncMessage& message, bool* handled);
55 void OnSetFocus(int instance_id, bool focused);
56 void OnPluginDestroyed(int instance_id);
57
58 // RenderViewHostObserver implementation.
59 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
60
61 BrowserPluginEmbedder* embedder_;
62
63 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedderHelper);
64 };
65
66 } // namespace content
67
68 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698