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/tabs_custom_bindings.h" | 5 #include "chrome/renderer/extensions/tabs_custom_bindings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "content/public/renderer/render_frame.h" | 10 #include "content/public/renderer/render_frame.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 args[2]->IsString() && | 40 args[2]->IsString() && |
41 args[3]->IsString()); | 41 args[3]->IsString()); |
42 | 42 |
43 ExtensionMsg_TabTargetConnectionInfo info; | 43 ExtensionMsg_TabTargetConnectionInfo info; |
44 info.tab_id = args[0]->Int32Value(); | 44 info.tab_id = args[0]->Int32Value(); |
45 info.frame_id = args[1]->Int32Value(); | 45 info.frame_id = args[1]->Int32Value(); |
46 std::string extension_id = *v8::String::Utf8Value(args[2]); | 46 std::string extension_id = *v8::String::Utf8Value(args[2]); |
47 std::string channel_name = *v8::String::Utf8Value(args[3]); | 47 std::string channel_name = *v8::String::Utf8Value(args[3]); |
48 int port_id = -1; | 48 int port_id = -1; |
49 render_frame->Send(new ExtensionHostMsg_OpenChannelToTab( | 49 render_frame->Send(new ExtensionHostMsg_OpenChannelToTab( |
50 info, extension_id, channel_name, &port_id)); | 50 render_frame->GetRoutingID(), info, extension_id, channel_name, |
| 51 &port_id)); |
51 args.GetReturnValue().Set(static_cast<int32_t>(port_id)); | 52 args.GetReturnValue().Set(static_cast<int32_t>(port_id)); |
52 } | 53 } |
53 | 54 |
54 } // namespace extensions | 55 } // namespace extensions |
OLD | NEW |