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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 factories_[tabs::kCreateTabFunction] = | 94 factories_[tabs::kCreateTabFunction] = |
95 &NewExtensionFunction<CreateTabFunction>; | 95 &NewExtensionFunction<CreateTabFunction>; |
96 factories_[tabs::kUpdateTabFunction] = | 96 factories_[tabs::kUpdateTabFunction] = |
97 &NewExtensionFunction<UpdateTabFunction>; | 97 &NewExtensionFunction<UpdateTabFunction>; |
98 factories_[tabs::kMoveTabFunction] = | 98 factories_[tabs::kMoveTabFunction] = |
99 &NewExtensionFunction<MoveTabFunction>; | 99 &NewExtensionFunction<MoveTabFunction>; |
100 factories_[tabs::kRemoveTabFunction] = | 100 factories_[tabs::kRemoveTabFunction] = |
101 &NewExtensionFunction<RemoveTabFunction>; | 101 &NewExtensionFunction<RemoveTabFunction>; |
102 factories_[tabs::kGetTabLanguageFunction] = | 102 factories_[tabs::kGetTabLanguageFunction] = |
103 &NewExtensionFunction<GetTabLanguageFunction>; | 103 &NewExtensionFunction<GetTabLanguageFunction>; |
| 104 factories_[tabs::kGetVisibleTabCaptureFunction] = |
| 105 &NewExtensionFunction<GetVisibleTabCaptureFunction>; |
104 | 106 |
105 // Page Actions. | 107 // Page Actions. |
106 factories_[page_actions::kEnablePageActionFunction] = | 108 factories_[page_actions::kEnablePageActionFunction] = |
107 &NewExtensionFunction<EnablePageActionFunction>; | 109 &NewExtensionFunction<EnablePageActionFunction>; |
108 factories_[page_actions::kDisablePageActionFunction] = | 110 factories_[page_actions::kDisablePageActionFunction] = |
109 &NewExtensionFunction<DisablePageActionFunction>; | 111 &NewExtensionFunction<DisablePageActionFunction>; |
110 | 112 |
111 // Bookmarks. | 113 // Bookmarks. |
112 factories_[bookmarks::kGetBookmarksFunction] = | 114 factories_[bookmarks::kGetBookmarksFunction] = |
113 &NewExtensionFunction<GetBookmarksFunction>; | 115 &NewExtensionFunction<GetBookmarksFunction>; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } else { | 238 } else { |
237 NOTREACHED(); | 239 NOTREACHED(); |
238 base::KillProcess(render_view_host_->process()->process().handle(), | 240 base::KillProcess(render_view_host_->process()->process().handle(), |
239 ResultCodes::KILLED_BAD_MESSAGE, false); | 241 ResultCodes::KILLED_BAD_MESSAGE, false); |
240 } | 242 } |
241 } | 243 } |
242 | 244 |
243 Profile* ExtensionFunctionDispatcher::profile() { | 245 Profile* ExtensionFunctionDispatcher::profile() { |
244 return render_view_host_->process()->profile(); | 246 return render_view_host_->process()->profile(); |
245 } | 247 } |
OLD | NEW |