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 "chrome/common/extensions/extension_action.h" | 9 #include "chrome/common/extensions/extension_action.h" |
10 #include "chrome/common/extensions/extension_messages.h" | 10 #include "chrome/common/extensions/extension_messages.h" |
11 #include "chrome/renderer/extensions/extension_dispatcher.h" | |
12 #include "content/public/renderer/render_view.h" | 11 #include "content/public/renderer/render_view.h" |
13 #include "grit/renderer_resources.h" | 12 #include "grit/renderer_resources.h" |
14 #include "v8/include/v8.h" | 13 #include "v8/include/v8.h" |
15 | 14 |
16 namespace extensions { | 15 namespace extensions { |
17 | 16 |
18 TabsCustomBindings::TabsCustomBindings() | 17 TabsCustomBindings::TabsCustomBindings() |
19 : ChromeV8Extension(NULL) { | 18 : ChromeV8Extension(NULL) { |
20 RouteStaticFunction("OpenChannelToTab", &OpenChannelToTab); | 19 RouteStaticFunction("OpenChannelToTab", &OpenChannelToTab); |
21 } | 20 } |
(...skipping 15 matching lines...) Expand all Loading... |
37 int port_id = -1; | 36 int port_id = -1; |
38 renderview->Send(new ExtensionHostMsg_OpenChannelToTab( | 37 renderview->Send(new ExtensionHostMsg_OpenChannelToTab( |
39 renderview->GetRoutingID(), tab_id, extension_id, channel_name, | 38 renderview->GetRoutingID(), tab_id, extension_id, channel_name, |
40 &port_id)); | 39 &port_id)); |
41 return v8::Integer::New(port_id); | 40 return v8::Integer::New(port_id); |
42 } | 41 } |
43 return v8::Undefined(); | 42 return v8::Undefined(); |
44 } | 43 } |
45 | 44 |
46 } // extensions | 45 } // extensions |
OLD | NEW |