Chromium Code Reviews| 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_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | |
| 8 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | |
| 9 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "content/common/npobject_stub.h" | |
| 10 #include "content/public/browser/render_view_host_observer.h" | 13 #include "content/public/browser/render_view_host_observer.h" |
| 11 | 14 |
| 12 class RouteIDGenerator; | 15 class RouteIDGenerator; |
| 13 struct NPObject; | 16 struct NPObject; |
| 14 | 17 |
| 15 namespace content { | 18 namespace content { |
| 16 class NPChannelBase; | 19 class NPChannelBase; |
| 17 class RenderViewHost; | 20 class RenderViewHost; |
| 18 struct NPVariant_Param; | 21 struct NPVariant_Param; |
| 19 | 22 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // RenderViewHostObserver override: | 56 // RenderViewHostObserver override: |
| 54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 57 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 55 | 58 |
| 56 // Message handlers | 59 // Message handlers |
| 57 void OnGetChannelHandle(IPC::Message* reply_msg); | 60 void OnGetChannelHandle(IPC::Message* reply_msg); |
| 58 | 61 |
| 59 void GetChannelHandle(IPC::Message* reply_msg); | 62 void GetChannelHandle(IPC::Message* reply_msg); |
| 60 void CreateNPVariantParam(NPObject* object, NPVariant_Param* param); | 63 void CreateNPVariantParam(NPObject* object, NPVariant_Param* param); |
| 61 void CreateObjectStub(NPObject* object, int route_id); | 64 void CreateObjectStub(NPObject* object, int route_id); |
| 62 | 65 |
| 66 static void CleanUpStubs(std::vector<base::WeakPtr<NPObjectStub> > stubs_); | |
|
joth
2012/11/14 00:51:27
as this is a helper for the d'tor, no need for it
acleung
2012/11/15 22:39:40
Great idea.
| |
| 67 | |
| 63 scoped_refptr<NPChannelBase> channel_; | 68 scoped_refptr<NPChannelBase> channel_; |
| 64 bool is_renderer_initialized_; | 69 bool is_renderer_initialized_; |
| 70 std::vector<base::WeakPtr<NPObjectStub> > stubs_; | |
| 65 | 71 |
| 66 DISALLOW_COPY_AND_ASSIGN(JavaBridgeDispatcherHost); | 72 DISALLOW_COPY_AND_ASSIGN(JavaBridgeDispatcherHost); |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 } // namespace content | 75 } // namespace content |
| 70 | 76 |
| 71 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ |
| OLD | NEW |