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

Side by Side Diff: content/browser/renderer_host/java/java_bridge_dispatcher_host.h

Issue 11359143: Make sure Java Bridge cleans up all stub object it creates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix crash from bad rebase Created 8 years 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
« no previous file with comments | « no previous file | content/browser/renderer_host/java/java_bridge_dispatcher_host.cc » ('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_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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
63 scoped_refptr<NPChannelBase> channel_; 66 scoped_refptr<NPChannelBase> channel_;
64 bool is_renderer_initialized_; 67 bool is_renderer_initialized_;
68 std::vector<base::WeakPtr<NPObjectStub> > stubs_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(JavaBridgeDispatcherHost); 70 DISALLOW_COPY_AND_ASSIGN(JavaBridgeDispatcherHost);
67 }; 71 };
68 72
69 } // namespace content 73 } // namespace content
70 74
71 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_ 75 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/java/java_bridge_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698