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

Side by Side Diff: chrome/renderer/extensions/extension_custom_bindings.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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
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/extensions/extension_custom_bindings.h" 5 #include "chrome/renderer/extensions/extension_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/common/chrome_view_type.h" 10 #include "chrome/common/chrome_view_type.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 CHECK(args.Length() >= 3 && 197 CHECK(args.Length() >= 3 &&
198 args[0]->IsString() && 198 args[0]->IsString() &&
199 args[1]->IsString() && 199 args[1]->IsString() &&
200 args[2]->IsString()); 200 args[2]->IsString());
201 201
202 std::string source_id = *v8::String::Utf8Value(args[0]->ToString()); 202 std::string source_id = *v8::String::Utf8Value(args[0]->ToString());
203 std::string target_id = *v8::String::Utf8Value(args[1]->ToString()); 203 std::string target_id = *v8::String::Utf8Value(args[1]->ToString());
204 std::string channel_name = *v8::String::Utf8Value(args[2]->ToString()); 204 std::string channel_name = *v8::String::Utf8Value(args[2]->ToString());
205 int port_id = -1; 205 int port_id = -1;
206 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( 206 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension(
207 renderview->GetRoutingId(), 207 renderview->GetRoutingID(),
208 source_id, 208 source_id,
209 target_id, 209 target_id,
210 channel_name, 210 channel_name,
211 &port_id)); 211 &port_id));
212 return v8::Integer::New(port_id); 212 return v8::Integer::New(port_id);
213 } 213 }
214 214
215 } // namespace extensions 215 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_extension_handler.cc ('k') | chrome/renderer/extensions/miscellaneous_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698