OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/browser/renderer_host/java_bridge_dispatcher_host.h" | 5 #include "content/browser/renderer_host/java_bridge_dispatcher_host.h" |
6 | 6 |
7 #include "content/browser/renderer_host/browser_render_process_host.h" | 7 #include "content/browser/renderer_host/browser_render_process_host.h" |
8 #include "content/browser/renderer_host/java_bridge_channel_host.h" | 8 #include "content/browser/renderer_host/java_bridge_channel_host.h" |
9 #include "content/browser/renderer_host/render_view_host.h" | 9 #include "content/browser/renderer_host/render_view_host.h" |
10 #include "content/common/child_process.h" | 10 #include "content/common/child_process.h" |
11 #include "content/common/java_bridge_messages.h" | 11 #include "content/common/java_bridge_messages.h" |
12 #include "content/common/npobject_stub.h" | 12 #include "content/common/npobject_stub.h" |
13 #include "content/common/npobject_util.h" // For CreateNPVariantParam() | 13 #include "content/common/npobject_util.h" // For CreateNPVariantParam() |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
16 | 16 |
| 17 using content::BrowserThread; |
| 18 |
17 JavaBridgeDispatcherHost::JavaBridgeDispatcherHost( | 19 JavaBridgeDispatcherHost::JavaBridgeDispatcherHost( |
18 RenderViewHost* render_view_host) | 20 RenderViewHost* render_view_host) |
19 : render_view_host_(render_view_host) { | 21 : render_view_host_(render_view_host) { |
20 DCHECK(render_view_host_); | 22 DCHECK(render_view_host_); |
21 } | 23 } |
22 | 24 |
23 JavaBridgeDispatcherHost::~JavaBridgeDispatcherHost() { | 25 JavaBridgeDispatcherHost::~JavaBridgeDispatcherHost() { |
24 } | 26 } |
25 | 27 |
26 void JavaBridgeDispatcherHost::AddNamedObject(const string16& name, | 28 void JavaBridgeDispatcherHost::AddNamedObject(const string16& name, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 82 |
81 // The channel creates the channel handle based on the renderer ID we passed | 83 // The channel creates the channel handle based on the renderer ID we passed |
82 // to GetJavaBridgeChannelHost() and, on POSIX, the file descriptor used by | 84 // to GetJavaBridgeChannelHost() and, on POSIX, the file descriptor used by |
83 // the underlying channel. | 85 // the underlying channel. |
84 IPC::ChannelHandle channel_handle = channel_->channel_handle(); | 86 IPC::ChannelHandle channel_handle = channel_->channel_handle(); |
85 | 87 |
86 bool sent = render_view_host_->Send(new JavaBridgeMsg_Init( | 88 bool sent = render_view_host_->Send(new JavaBridgeMsg_Init( |
87 render_view_host_->routing_id(), channel_handle)); | 89 render_view_host_->routing_id(), channel_handle)); |
88 DCHECK(sent); | 90 DCHECK(sent); |
89 } | 91 } |
OLD | NEW |