| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "content/browser/renderer_host/render_process_host.h" | 58 #include "content/browser/renderer_host/render_process_host.h" |
| 59 #include "content/browser/renderer_host/render_view_host.h" | 59 #include "content/browser/renderer_host/render_view_host.h" |
| 60 #include "content/common/notification_service.h" | 60 #include "content/common/notification_service.h" |
| 61 #include "content/common/result_codes.h" | 61 #include "content/common/result_codes.h" |
| 62 #include "third_party/skia/include/core/SkBitmap.h" | 62 #include "third_party/skia/include/core/SkBitmap.h" |
| 63 | 63 |
| 64 #if defined(TOOLKIT_VIEWS) | 64 #if defined(TOOLKIT_VIEWS) |
| 65 #include "chrome/browser/extensions/extension_input_api.h" | 65 #include "chrome/browser/extensions/extension_input_api.h" |
| 66 #endif | 66 #endif |
| 67 | 67 |
| 68 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 69 #include "chrome/browser/extensions/extension_ime_ui_api.h" |
| 70 #endif |
| 71 |
| 68 #if defined(OS_CHROMEOS) | 72 #if defined(OS_CHROMEOS) |
| 69 #include "chrome/browser/extensions/extension_info_private_api_chromeos.h" | 73 #include "chrome/browser/extensions/extension_info_private_api_chromeos.h" |
| 70 #endif | 74 #endif |
| 71 | 75 |
| 72 // FactoryRegistry ------------------------------------------------------------- | 76 // FactoryRegistry ------------------------------------------------------------- |
| 73 | 77 |
| 74 namespace { | 78 namespace { |
| 75 | 79 |
| 76 // Template for defining ExtensionFunctionFactory. | 80 // Template for defining ExtensionFunctionFactory. |
| 77 template<class T> | 81 template<class T> |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 RegisterFunction<SetBadgeTextSidebarFunction>(); | 279 RegisterFunction<SetBadgeTextSidebarFunction>(); |
| 276 RegisterFunction<SetIconSidebarFunction>(); | 280 RegisterFunction<SetIconSidebarFunction>(); |
| 277 RegisterFunction<SetTitleSidebarFunction>(); | 281 RegisterFunction<SetTitleSidebarFunction>(); |
| 278 RegisterFunction<ShowSidebarFunction>(); | 282 RegisterFunction<ShowSidebarFunction>(); |
| 279 | 283 |
| 280 #if defined(TOOLKIT_VIEWS) | 284 #if defined(TOOLKIT_VIEWS) |
| 281 // Input. | 285 // Input. |
| 282 RegisterFunction<SendKeyboardEventInputFunction>(); | 286 RegisterFunction<SendKeyboardEventInputFunction>(); |
| 283 #endif | 287 #endif |
| 284 | 288 |
| 289 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 290 // IME |
| 291 RegisterFunction<CandidateClickedImeUiFunction>(); |
| 292 RegisterFunction<CursorUpImeUiFunction>(); |
| 293 RegisterFunction<CursorDownImeUiFunction>(); |
| 294 RegisterFunction<PageUpImeUiFunction>(); |
| 295 RegisterFunction<PageDownImeUiFunction>(); |
| 296 RegisterFunction<RegisterImeUiFunction>(); |
| 297 RegisterFunction<PageUpImeUiFunction>(); |
| 298 RegisterFunction<PageDownImeUiFunction>(); |
| 299 #endif |
| 300 |
| 285 // Management. | 301 // Management. |
| 286 RegisterFunction<GetAllExtensionsFunction>(); | 302 RegisterFunction<GetAllExtensionsFunction>(); |
| 287 RegisterFunction<GetExtensionByIdFunction>(); | 303 RegisterFunction<GetExtensionByIdFunction>(); |
| 288 RegisterFunction<LaunchAppFunction>(); | 304 RegisterFunction<LaunchAppFunction>(); |
| 289 RegisterFunction<SetEnabledFunction>(); | 305 RegisterFunction<SetEnabledFunction>(); |
| 290 RegisterFunction<UninstallFunction>(); | 306 RegisterFunction<UninstallFunction>(); |
| 291 | 307 |
| 292 // Extension module. | 308 // Extension module. |
| 293 RegisterFunction<SetUpdateUrlDataFunction>(); | 309 RegisterFunction<SetUpdateUrlDataFunction>(); |
| 294 RegisterFunction<IsAllowedIncognitoAccessFunction>(); | 310 RegisterFunction<IsAllowedIncognitoAccessFunction>(); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 NOTREACHED(); | 547 NOTREACHED(); |
| 532 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_EFD")); | 548 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_EFD")); |
| 533 base::KillProcess(render_view_host_->process()->GetHandle(), | 549 base::KillProcess(render_view_host_->process()->GetHandle(), |
| 534 ResultCodes::KILLED_BAD_MESSAGE, false); | 550 ResultCodes::KILLED_BAD_MESSAGE, false); |
| 535 } | 551 } |
| 536 } | 552 } |
| 537 | 553 |
| 538 Profile* ExtensionFunctionDispatcher::profile() { | 554 Profile* ExtensionFunctionDispatcher::profile() { |
| 539 return profile_; | 555 return profile_; |
| 540 } | 556 } |
| OLD | NEW |