Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 #include "content/browser/renderer_host/render_process_host.h" | 53 #include "content/browser/renderer_host/render_process_host.h" |
| 54 #include "content/browser/renderer_host/render_view_host.h" | 54 #include "content/browser/renderer_host/render_view_host.h" |
| 55 #include "ipc/ipc_message.h" | 55 #include "ipc/ipc_message.h" |
| 56 #include "ipc/ipc_message_macros.h" | 56 #include "ipc/ipc_message_macros.h" |
| 57 #include "third_party/skia/include/core/SkBitmap.h" | 57 #include "third_party/skia/include/core/SkBitmap.h" |
| 58 | 58 |
| 59 #if defined(TOOLKIT_VIEWS) | 59 #if defined(TOOLKIT_VIEWS) |
| 60 #include "chrome/browser/extensions/extension_input_api.h" | 60 #include "chrome/browser/extensions/extension_input_api.h" |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) | 63 #if defined(TOUCH_UI) |
| 64 #include "chrome/browser/extensions/extension_input_ui_api.h" | 64 #include "chrome/browser/extensions/extension_input_ui_api.h" |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 #if defined(OS_CHROMEOS) | 67 #if defined(OS_CHROMEOS) |
| 68 #include "chrome/browser/extensions/extension_file_browser_private_api.h" | 68 #include "chrome/browser/extensions/extension_file_browser_private_api.h" |
| 69 #include "chrome/browser/extensions/extension_info_private_api_chromeos.h" | 69 #include "chrome/browser/extensions/extension_info_private_api_chromeos.h" |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 // FactoryRegistry ------------------------------------------------------------- | 72 // FactoryRegistry ------------------------------------------------------------- |
| 73 | 73 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 RegisterFunction<SetBadgeTextSidebarFunction>(); | 267 RegisterFunction<SetBadgeTextSidebarFunction>(); |
| 268 RegisterFunction<SetIconSidebarFunction>(); | 268 RegisterFunction<SetIconSidebarFunction>(); |
| 269 RegisterFunction<SetTitleSidebarFunction>(); | 269 RegisterFunction<SetTitleSidebarFunction>(); |
| 270 RegisterFunction<ShowSidebarFunction>(); | 270 RegisterFunction<ShowSidebarFunction>(); |
| 271 | 271 |
| 272 #if defined(TOOLKIT_VIEWS) | 272 #if defined(TOOLKIT_VIEWS) |
| 273 // Input. | 273 // Input. |
| 274 RegisterFunction<SendKeyboardEventInputFunction>(); | 274 RegisterFunction<SendKeyboardEventInputFunction>(); |
| 275 #endif | 275 #endif |
| 276 | 276 |
| 277 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) | 277 #if defined(TOUCH_UI) |
| 278 #if defined(OS_CHROMEOS) | |
|
bryeung
2011/05/19 22:23:42
Is this suggested style?
I'd prefer we did not ne
mazda
2011/05/20 12:16:05
I moved the code to extension_input_api.* and reve
| |
| 278 // IME | 279 // IME |
| 279 RegisterFunction<CandidateClickedInputUiFunction>(); | 280 RegisterFunction<CandidateClickedInputUiFunction>(); |
| 280 RegisterFunction<CursorUpInputUiFunction>(); | 281 RegisterFunction<CursorUpInputUiFunction>(); |
| 281 RegisterFunction<CursorDownInputUiFunction>(); | 282 RegisterFunction<CursorDownInputUiFunction>(); |
| 282 RegisterFunction<PageUpInputUiFunction>(); | 283 RegisterFunction<PageUpInputUiFunction>(); |
| 283 RegisterFunction<PageDownInputUiFunction>(); | 284 RegisterFunction<PageDownInputUiFunction>(); |
| 284 RegisterFunction<RegisterInputUiFunction>(); | 285 RegisterFunction<RegisterInputUiFunction>(); |
| 285 RegisterFunction<PageUpInputUiFunction>(); | 286 RegisterFunction<PageUpInputUiFunction>(); |
| 286 RegisterFunction<PageDownInputUiFunction>(); | 287 RegisterFunction<PageDownInputUiFunction>(); |
| 287 #endif | 288 #endif // OS_CHROMEOS |
| 289 RegisterFunction<HideKeyboardInputUiFunction>(); | |
| 290 #endif // TOUCH_UI | |
| 288 | 291 |
| 289 // Management. | 292 // Management. |
| 290 RegisterFunction<GetAllExtensionsFunction>(); | 293 RegisterFunction<GetAllExtensionsFunction>(); |
| 291 RegisterFunction<GetExtensionByIdFunction>(); | 294 RegisterFunction<GetExtensionByIdFunction>(); |
| 292 RegisterFunction<LaunchAppFunction>(); | 295 RegisterFunction<LaunchAppFunction>(); |
| 293 RegisterFunction<SetEnabledFunction>(); | 296 RegisterFunction<SetEnabledFunction>(); |
| 294 RegisterFunction<UninstallFunction>(); | 297 RegisterFunction<UninstallFunction>(); |
| 295 | 298 |
| 296 // Extension module. | 299 // Extension module. |
| 297 RegisterFunction<SetUpdateUrlDataFunction>(); | 300 RegisterFunction<SetUpdateUrlDataFunction>(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 std::string(), QuotaLimitHeuristic::kGenericOverQuotaError)); | 504 std::string(), QuotaLimitHeuristic::kGenericOverQuotaError)); |
| 502 } | 505 } |
| 503 } | 506 } |
| 504 | 507 |
| 505 void ExtensionFunctionDispatcher::SendAccessDenied( | 508 void ExtensionFunctionDispatcher::SendAccessDenied( |
| 506 RenderViewHost* render_view_host, int request_id) { | 509 RenderViewHost* render_view_host, int request_id) { |
| 507 render_view_host->Send(new ExtensionMsg_Response( | 510 render_view_host->Send(new ExtensionMsg_Response( |
| 508 render_view_host->routing_id(), request_id, false, std::string(), | 511 render_view_host->routing_id(), request_id, false, std::string(), |
| 509 "Access to extension API denied.")); | 512 "Access to extension API denied.")); |
| 510 } | 513 } |
| OLD | NEW |