OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser/extensions/extension_function_dispatcher.h" | 5 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
6 | 6 |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "base/singleton.h" | 8 #include "base/singleton.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/extensions/extension_bookmarks_module.h" | 10 #include "chrome/browser/extensions/extension_bookmarks_module.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 &NewExtensionFunction<UpdateTabFunction>; | 103 &NewExtensionFunction<UpdateTabFunction>; |
104 factories_[tabs::kMoveTabFunction] = | 104 factories_[tabs::kMoveTabFunction] = |
105 &NewExtensionFunction<MoveTabFunction>; | 105 &NewExtensionFunction<MoveTabFunction>; |
106 factories_[tabs::kRemoveTabFunction] = | 106 factories_[tabs::kRemoveTabFunction] = |
107 &NewExtensionFunction<RemoveTabFunction>; | 107 &NewExtensionFunction<RemoveTabFunction>; |
108 factories_[tabs::kDetectTabLanguageFunction] = | 108 factories_[tabs::kDetectTabLanguageFunction] = |
109 &NewExtensionFunction<DetectTabLanguageFunction>; | 109 &NewExtensionFunction<DetectTabLanguageFunction>; |
110 factories_[tabs::kCaptureVisibleTabFunction] = | 110 factories_[tabs::kCaptureVisibleTabFunction] = |
111 &NewExtensionFunction<CaptureVisibleTabFunction>; | 111 &NewExtensionFunction<CaptureVisibleTabFunction>; |
112 | 112 |
| 113 // Extension. |
| 114 factories_[tabs::kExecuteScriptWithUrlFunction] = |
| 115 &NewExtensionFunction<ExecuteScriptWithUrlFunction>; |
| 116 |
113 // Page Actions. | 117 // Page Actions. |
114 factories_[page_actions::kEnablePageActionFunction] = | 118 factories_[page_actions::kEnablePageActionFunction] = |
115 &NewExtensionFunction<EnablePageActionFunction>; | 119 &NewExtensionFunction<EnablePageActionFunction>; |
116 factories_[page_actions::kDisablePageActionFunction] = | 120 factories_[page_actions::kDisablePageActionFunction] = |
117 &NewExtensionFunction<DisablePageActionFunction>; | 121 &NewExtensionFunction<DisablePageActionFunction>; |
118 | 122 |
119 // Bookmarks. | 123 // Bookmarks. |
120 factories_[bookmarks::kGetBookmarksFunction] = | 124 factories_[bookmarks::kGetBookmarksFunction] = |
121 &NewExtensionFunction<GetBookmarksFunction>; | 125 &NewExtensionFunction<GetBookmarksFunction>; |
122 factories_[bookmarks::kGetBookmarkChildrenFunction] = | 126 factories_[bookmarks::kGetBookmarkChildrenFunction] = |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } else { | 276 } else { |
273 NOTREACHED(); | 277 NOTREACHED(); |
274 base::KillProcess(render_view_host_->process()->process().handle(), | 278 base::KillProcess(render_view_host_->process()->process().handle(), |
275 ResultCodes::KILLED_BAD_MESSAGE, false); | 279 ResultCodes::KILLED_BAD_MESSAGE, false); |
276 } | 280 } |
277 } | 281 } |
278 | 282 |
279 Profile* ExtensionFunctionDispatcher::profile() { | 283 Profile* ExtensionFunctionDispatcher::profile() { |
280 return render_view_host_->process()->profile(); | 284 return render_view_host_->process()->profile(); |
281 } | 285 } |
OLD | NEW |