Chromium Code Reviews| 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/page_actions_custom_bindings.h" | 5 #include "chrome/renderer/extensions/page_actions_custom_bindings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/common/extensions/api/extension_action/action_info.h" | |
|
Yoyo Zhou
2012/12/28 05:19:59
ditto
Devlin
2012/12/28 20:25:36
ditto :) (line 35)
| |
| 9 #include "chrome/renderer/extensions/dispatcher.h" | 10 #include "chrome/renderer/extensions/dispatcher.h" |
| 10 #include "grit/renderer_resources.h" | 11 #include "grit/renderer_resources.h" |
| 11 #include "v8/include/v8.h" | 12 #include "v8/include/v8.h" |
| 12 | 13 |
| 13 namespace extensions { | 14 namespace extensions { |
| 14 | 15 |
| 15 PageActionsCustomBindings::PageActionsCustomBindings( | 16 PageActionsCustomBindings::PageActionsCustomBindings( |
| 16 Dispatcher* dispatcher) | 17 Dispatcher* dispatcher) |
| 17 : ChromeV8Extension(dispatcher) { | 18 : ChromeV8Extension(dispatcher) { |
| 18 RouteStaticFunction("GetCurrentPageActions", &GetCurrentPageActions); | 19 RouteStaticFunction("GetCurrentPageActions", &GetCurrentPageActions); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 33 if (extension->page_action_info()) { | 34 if (extension->page_action_info()) { |
| 34 std::string id = extension->page_action_info()->id; | 35 std::string id = extension->page_action_info()->id; |
| 35 page_action_vector->Set(v8::Integer::New(0), | 36 page_action_vector->Set(v8::Integer::New(0), |
| 36 v8::String::New(id.c_str(), id.size())); | 37 v8::String::New(id.c_str(), id.size())); |
| 37 } | 38 } |
| 38 | 39 |
| 39 return page_action_vector; | 40 return page_action_vector; |
| 40 } | 41 } |
| 41 | 42 |
| 42 } // extensions | 43 } // extensions |
| OLD | NEW |