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

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

Issue 287009: Move WebDevToolsAgent{Delegate} into the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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 | « chrome/renderer/devtools_agent_filter.cc ('k') | chrome/renderer/notification_provider.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/values.h" 7 #include "base/values.h"
8 #include "chrome/common/render_messages.h" 8 #include "chrome/common/render_messages.h"
9 #include "webkit/api/public/WebBindings.h" 9 #include "webkit/api/public/WebBindings.h"
10 #include "webkit/api/public/WebFrame.h"
10 11
11 using WebKit::WebBindings; 12 using WebKit::WebBindings;
12 13
13 ExternalHostBindings::ExternalHostBindings() : frame_(NULL) { 14 ExternalHostBindings::ExternalHostBindings() : frame_(NULL) {
14 BindMethod("postMessage", &ExternalHostBindings::postMessage); 15 BindMethod("postMessage", &ExternalHostBindings::postMessage);
15 BindProperty("onmessage", &on_message_handler_); 16 BindProperty("onmessage", &on_message_handler_);
16 } 17 }
17 18
18 void ExternalHostBindings::postMessage( 19 void ExternalHostBindings::postMessage(
19 const CppArgumentList& args, CppVariant* result) { 20 const CppArgumentList& args, CppVariant* result) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 DCHECK(success == false); 172 DCHECK(success == false);
172 } else { 173 } else {
173 DCHECK(success != false); 174 DCHECK(success != false);
174 // Pass the ownership to the caller (don't call ReleaseVariantValue). 175 // Pass the ownership to the caller (don't call ReleaseVariantValue).
175 *message_event = result.value.objectValue; 176 *message_event = result.value.objectValue;
176 } 177 }
177 } 178 }
178 179
179 return success; 180 return success;
180 } 181 }
OLDNEW
« no previous file with comments | « chrome/renderer/devtools_agent_filter.cc ('k') | chrome/renderer/notification_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698