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

Side by Side Diff: content/renderer/java/java_bridge_dispatcher.h

Issue 10980010: Cleanup the IPC param traits structure (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix android Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/webkit_param_traits.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_RENDERER_JAVA_JAVA_BRIDGE_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_JAVA_JAVA_BRIDGE_DISPATCHER_H_
6 #define CONTENT_RENDERER_JAVA_JAVA_BRIDGE_DISPATCHER_H_ 6 #define CONTENT_RENDERER_JAVA_JAVA_BRIDGE_DISPATCHER_H_
7 7
8 #include "content/public/common/webkit_param_traits.h" 8 #include <map>
9
10 #include "base/memory/ref_counted.h"
9 #include "content/public/renderer/render_view_observer.h" 11 #include "content/public/renderer/render_view_observer.h"
10 #include "ipc/ipc_channel_handle.h" 12 #include "ipc/ipc_channel_handle.h"
13 #include "third_party/npapi/bindings/npruntime.h"
11 14
12 class JavaBridgeChannel; 15 class JavaBridgeChannel;
16 struct NPVariant_Param;
13 17
14 // This class handles injecting Java objects into the main frame of a 18 // This class handles injecting Java objects into the main frame of a
15 // RenderView. The 'add' and 'remove' messages received from the browser 19 // RenderView. The 'add' and 'remove' messages received from the browser
16 // process modify the entries in a map of 'pending' objects. These objects are 20 // process modify the entries in a map of 'pending' objects. These objects are
17 // bound to the window object of the main frame when that window object is next 21 // bound to the window object of the main frame when that window object is next
18 // cleared. These objects remain bound until the window object is cleared 22 // cleared. These objects remain bound until the window object is cleared
19 // again. 23 // again.
20 class JavaBridgeDispatcher : public content::RenderViewObserver { 24 class JavaBridgeDispatcher : public content::RenderViewObserver {
21 public: 25 public:
22 JavaBridgeDispatcher(content::RenderView* render_view); 26 JavaBridgeDispatcher(content::RenderView* render_view);
(...skipping 12 matching lines...) Expand all
35 void EnsureChannelIsSetUp(); 39 void EnsureChannelIsSetUp();
36 40
37 // Objects that will be bound to the window when the window object is next 41 // Objects that will be bound to the window when the window object is next
38 // cleared. We hold a ref to these. 42 // cleared. We hold a ref to these.
39 typedef std::map<string16, NPVariant> ObjectMap; 43 typedef std::map<string16, NPVariant> ObjectMap;
40 ObjectMap objects_; 44 ObjectMap objects_;
41 scoped_refptr<JavaBridgeChannel> channel_; 45 scoped_refptr<JavaBridgeChannel> channel_;
42 }; 46 };
43 47
44 #endif // CONTENT_RENDERER_JAVA_JAVA_BRIDGE_DISPATCHER_H_ 48 #endif // CONTENT_RENDERER_JAVA_JAVA_BRIDGE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/public/common/webkit_param_traits.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698