| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |