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

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

Issue 8525016: Move Java Bridge files to new java/ subdirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 9 years, 1 month 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/renderer/java/java_bridge_dispatcher.h ('k') | content/renderer/java_bridge_channel.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) 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/renderer/java_bridge_dispatcher.h" 5 #include "content/renderer/java/java_bridge_dispatcher.h"
6 6
7 #include "content/common/child_process.h" 7 #include "content/common/child_process.h"
8 #include "content/common/java_bridge_messages.h" 8 #include "content/common/java_bridge_messages.h"
9 #include "content/common/npobject_util.h" // For CreateNPVariant() 9 #include "content/common/npobject_util.h" // For CreateNPVariant()
10 #include "content/public/renderer/render_thread.h" 10 #include "content/public/renderer/render_thread.h"
11 #include "content/public/renderer/render_view.h" 11 #include "content/public/renderer/render_view.h"
12 #include "content/renderer/java_bridge_channel.h" 12 #include "content/renderer/java/java_bridge_channel.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
17 17
18 JavaBridgeDispatcher::JavaBridgeDispatcher( 18 JavaBridgeDispatcher::JavaBridgeDispatcher(
19 content::RenderView* render_view, 19 content::RenderView* render_view,
20 const IPC::ChannelHandle& channel_handle) 20 const IPC::ChannelHandle& channel_handle)
21 : RenderViewObserver(render_view) { 21 : RenderViewObserver(render_view) {
22 channel_.reset(JavaBridgeChannel::GetJavaBridgeChannel( 22 channel_.reset(JavaBridgeChannel::GetJavaBridgeChannel(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void JavaBridgeDispatcher::OnRemoveNamedObject(const string16& name) { 82 void JavaBridgeDispatcher::OnRemoveNamedObject(const string16& name) {
83 // Removing an object does not unbind it from JavaScript until the window 83 // Removing an object does not unbind it from JavaScript until the window
84 // object is next cleared. Note that the browser checks that the named object 84 // object is next cleared. Note that the browser checks that the named object
85 // is present. 85 // is present.
86 ObjectMap::iterator iter = objects_.find(name); 86 ObjectMap::iterator iter = objects_.find(name);
87 DCHECK(iter != objects_.end()); 87 DCHECK(iter != objects_.end());
88 WebKit::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); 88 WebKit::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second));
89 objects_.erase(iter); 89 objects_.erase(iter);
90 } 90 }
OLDNEW
« no previous file with comments | « content/renderer/java/java_bridge_dispatcher.h ('k') | content/renderer/java_bridge_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698