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

Side by Side Diff: chrome/renderer/external_host_bindings.cc

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 #include "chrome/renderer/external_host_bindings.h" 5 #include "chrome/renderer/external_host_bindings.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
11 #include "third_party/WebKit/public/web/WebBindings.h" 11 #include "third_party/WebKit/public/web/WebBindings.h"
12 #include "third_party/WebKit/public/web/WebDocument.h" 12 #include "third_party/WebKit/public/web/WebDocument.h"
13 #include "third_party/WebKit/public/web/WebFrame.h" 13 #include "third_party/WebKit/public/web/WebFrame.h"
14 14
15 using WebKit::WebBindings; 15 using blink::WebBindings;
16 using webkit_glue::CppArgumentList; 16 using webkit_glue::CppArgumentList;
17 using webkit_glue::CppVariant; 17 using webkit_glue::CppVariant;
18 18
19 ExternalHostBindings::ExternalHostBindings(IPC::Sender* sender, int routing_id) 19 ExternalHostBindings::ExternalHostBindings(IPC::Sender* sender, int routing_id)
20 : frame_(NULL), sender_(sender), routing_id_(routing_id) { 20 : frame_(NULL), sender_(sender), routing_id_(routing_id) {
21 BindCallback("postMessage", base::Bind(&ExternalHostBindings::PostMessage, 21 BindCallback("postMessage", base::Bind(&ExternalHostBindings::PostMessage,
22 base::Unretained(this))); 22 base::Unretained(this)));
23 BindProperty("onmessage", &on_message_handler_); 23 BindProperty("onmessage", &on_message_handler_);
24 } 24 }
25 25
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 DLOG_IF(ERROR, !status) << "NPN_InvokeDefault failed"; 136 DLOG_IF(ERROR, !status) << "NPN_InvokeDefault failed";
137 WebBindings::releaseVariantValue(&result); 137 WebBindings::releaseVariantValue(&result);
138 } 138 }
139 139
140 WebBindings::releaseObject(event_obj); 140 WebBindings::releaseObject(event_obj);
141 } 141 }
142 142
143 return status; 143 return status;
144 } 144 }
145 145
146 void ExternalHostBindings::BindToJavascript(WebKit::WebFrame* frame, 146 void ExternalHostBindings::BindToJavascript(blink::WebFrame* frame,
147 const std::string& classname) { 147 const std::string& classname) {
148 frame_ = frame; 148 frame_ = frame;
149 CppBoundClass::BindToJavascript(frame, classname); 149 CppBoundClass::BindToJavascript(frame, classname);
150 } 150 }
151 151
152 bool ExternalHostBindings::CreateMessageEvent(NPObject** message_event) { 152 bool ExternalHostBindings::CreateMessageEvent(NPObject** message_event) {
153 DCHECK(message_event != NULL); 153 DCHECK(message_event != NULL);
154 DCHECK(frame_ != NULL); 154 DCHECK(frame_ != NULL);
155 155
156 NPObject* window = frame_->windowObject(); 156 NPObject* window = frame_->windowObject();
(...skipping 27 matching lines...) Expand all
184 DCHECK(success == false); 184 DCHECK(success == false);
185 } else { 185 } else {
186 DCHECK(success != false); 186 DCHECK(success != false);
187 // Pass the ownership to the caller (don't call ReleaseVariantValue). 187 // Pass the ownership to the caller (don't call ReleaseVariantValue).
188 *message_event = result.value.objectValue; 188 *message_event = result.value.objectValue;
189 } 189 }
190 } 190 }
191 191
192 return success; 192 return success;
193 } 193 }
OLDNEW
« no previous file with comments | « chrome/renderer/external_host_bindings.h ('k') | chrome/renderer/loadtimes_extension_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698