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