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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(OS_CHROMEOS) && 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 #include "chrome/browser/extensions/extension_mediaplayer_private_api.h" |
70 #endif | 71 #endif |
71 | 72 |
72 // FactoryRegistry ------------------------------------------------------------- | 73 // FactoryRegistry ------------------------------------------------------------- |
73 | 74 |
74 namespace { | 75 namespace { |
75 | 76 |
76 // Template for defining ExtensionFunctionFactory. | 77 // Template for defining ExtensionFunctionFactory. |
77 template<class T> | 78 template<class T> |
78 ExtensionFunction* NewExtensionFunction() { | 79 ExtensionFunction* NewExtensionFunction() { |
79 return new T(); | 80 return new T(); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // FileBrowserPrivate functions. | 329 // FileBrowserPrivate functions. |
329 RegisterFunction<CancelFileDialogFunction>(); | 330 RegisterFunction<CancelFileDialogFunction>(); |
330 RegisterFunction<ExecuteTasksFileBrowserFunction>(); | 331 RegisterFunction<ExecuteTasksFileBrowserFunction>(); |
331 RegisterFunction<FileDialogStringsFunction>(); | 332 RegisterFunction<FileDialogStringsFunction>(); |
332 RegisterFunction<GetFileTasksFileBrowserFunction>(); | 333 RegisterFunction<GetFileTasksFileBrowserFunction>(); |
333 RegisterFunction<RequestLocalFileSystemFunction>(); | 334 RegisterFunction<RequestLocalFileSystemFunction>(); |
334 RegisterFunction<SelectFileFunction>(); | 335 RegisterFunction<SelectFileFunction>(); |
335 RegisterFunction<SelectFilesFunction>(); | 336 RegisterFunction<SelectFilesFunction>(); |
336 RegisterFunction<ViewFilesFunction>(); | 337 RegisterFunction<ViewFilesFunction>(); |
337 | 338 |
| 339 // Mediaplayer |
| 340 RegisterFunction<PlayAtMediaplayerFunction>(); |
| 341 RegisterFunction<SetPlaybackErrorMediaplayerFunction>(); |
| 342 RegisterFunction<GetPlaylistMediaplayerFunction>(); |
| 343 RegisterFunction<TogglePlaylistPanelMediaplayerFunction>(); |
| 344 RegisterFunction<ToggleFullscreenMediaplayerFunction>(); |
338 #if defined(TOUCH_UI) | 345 #if defined(TOUCH_UI) |
339 // Input | 346 // Input |
340 RegisterFunction<SendHandwritingStrokeFunction>(); | 347 RegisterFunction<SendHandwritingStrokeFunction>(); |
341 RegisterFunction<CancelHandwritingStrokesFunction>(); | 348 RegisterFunction<CancelHandwritingStrokesFunction>(); |
342 #endif | 349 #endif |
343 #endif | 350 #endif |
344 | 351 |
345 // Websocket to TCP proxy. Currently noop on anything other than ChromeOS. | 352 // Websocket to TCP proxy. Currently noop on anything other than ChromeOS. |
346 RegisterFunction<WebSocketProxyPrivateGetPassportForTCPFunction>(); | 353 RegisterFunction<WebSocketProxyPrivateGetPassportForTCPFunction>(); |
347 | 354 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 std::string(), QuotaLimitHeuristic::kGenericOverQuotaError)); | 518 std::string(), QuotaLimitHeuristic::kGenericOverQuotaError)); |
512 } | 519 } |
513 } | 520 } |
514 | 521 |
515 void ExtensionFunctionDispatcher::SendAccessDenied( | 522 void ExtensionFunctionDispatcher::SendAccessDenied( |
516 RenderViewHost* render_view_host, int request_id) { | 523 RenderViewHost* render_view_host, int request_id) { |
517 render_view_host->Send(new ExtensionMsg_Response( | 524 render_view_host->Send(new ExtensionMsg_Response( |
518 render_view_host->routing_id(), request_id, false, std::string(), | 525 render_view_host->routing_id(), request_id, false, std::string(), |
519 "Access to extension API denied.")); | 526 "Access to extension API denied.")); |
520 } | 527 } |
OLD | NEW |