| 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/json_reader.h" | 7 #include "base/json_reader.h" |
| 8 #include "base/json_writer.h" | 8 #include "base/json_writer.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Register all functions here. | 54 // Register all functions here. |
| 55 | 55 |
| 56 // Windows | 56 // Windows |
| 57 factories_["GetWindow"] = &NewExtensionFunction<GetWindowFunction>; | 57 factories_["GetWindow"] = &NewExtensionFunction<GetWindowFunction>; |
| 58 factories_["GetCurrentWindow"] = | 58 factories_["GetCurrentWindow"] = |
| 59 &NewExtensionFunction<GetCurrentWindowFunction>; | 59 &NewExtensionFunction<GetCurrentWindowFunction>; |
| 60 factories_["GetLastFocusedWindow"] = | 60 factories_["GetLastFocusedWindow"] = |
| 61 &NewExtensionFunction<GetLastFocusedWindowFunction>; | 61 &NewExtensionFunction<GetLastFocusedWindowFunction>; |
| 62 factories_["GetAllWindows"] = &NewExtensionFunction<GetAllWindowsFunction>; | 62 factories_["GetAllWindows"] = &NewExtensionFunction<GetAllWindowsFunction>; |
| 63 factories_["CreateWindow"] = &NewExtensionFunction<CreateWindowFunction>; | 63 factories_["CreateWindow"] = &NewExtensionFunction<CreateWindowFunction>; |
| 64 factories_["UpdateWindow"] = &NewExtensionFunction<UpdateWindowFunction>; |
| 64 factories_["RemoveWindow"] = &NewExtensionFunction<RemoveWindowFunction>; | 65 factories_["RemoveWindow"] = &NewExtensionFunction<RemoveWindowFunction>; |
| 65 | 66 |
| 66 // Tabs | 67 // Tabs |
| 67 factories_["GetTab"] = &NewExtensionFunction<GetTabFunction>; | 68 factories_["GetTab"] = &NewExtensionFunction<GetTabFunction>; |
| 68 factories_["GetSelectedTab"] = &NewExtensionFunction<GetSelectedTabFunction>; | 69 factories_["GetSelectedTab"] = &NewExtensionFunction<GetSelectedTabFunction>; |
| 69 factories_["GetAllTabsInWindow"] = | 70 factories_["GetAllTabsInWindow"] = |
| 70 &NewExtensionFunction<GetAllTabsInWindowFunction>; | 71 &NewExtensionFunction<GetAllTabsInWindowFunction>; |
| 71 factories_["CreateTab"] = &NewExtensionFunction<CreateTabFunction>; | 72 factories_["CreateTab"] = &NewExtensionFunction<CreateTabFunction>; |
| 72 factories_["UpdateTab"] = &NewExtensionFunction<UpdateTabFunction>; | 73 factories_["UpdateTab"] = &NewExtensionFunction<UpdateTabFunction>; |
| 73 factories_["MoveTab"] = &NewExtensionFunction<MoveTabFunction>; | 74 factories_["MoveTab"] = &NewExtensionFunction<MoveTabFunction>; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } else { | 188 } else { |
| 188 NOTREACHED(); | 189 NOTREACHED(); |
| 189 base::KillProcess(render_view_host_->process()->process().handle(), | 190 base::KillProcess(render_view_host_->process()->process().handle(), |
| 190 ResultCodes::KILLED_BAD_MESSAGE, false); | 191 ResultCodes::KILLED_BAD_MESSAGE, false); |
| 191 } | 192 } |
| 192 } | 193 } |
| 193 | 194 |
| 194 Profile* ExtensionFunctionDispatcher::profile() { | 195 Profile* ExtensionFunctionDispatcher::profile() { |
| 195 return render_view_host_->process()->profile(); | 196 return render_view_host_->process()->profile(); |
| 196 } | 197 } |
| OLD | NEW |