Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: chrome/renderer/extensions/dispatcher.cc

Issue 50703013: fileSystemProvider: First cut at implementing fileSystemProvider API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add trailing _. move files. WebKit->blink namespace change Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/extensions/dispatcher.h" 5 #include "chrome/renderer/extensions/dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 30 matching lines...) Expand all
41 #include "chrome/renderer/extensions/css_native_handler.h" 41 #include "chrome/renderer/extensions/css_native_handler.h"
42 #include "chrome/renderer/extensions/document_custom_bindings.h" 42 #include "chrome/renderer/extensions/document_custom_bindings.h"
43 #include "chrome/renderer/extensions/dom_activity_logger.h" 43 #include "chrome/renderer/extensions/dom_activity_logger.h"
44 #include "chrome/renderer/extensions/event_bindings.h" 44 #include "chrome/renderer/extensions/event_bindings.h"
45 #include "chrome/renderer/extensions/extension_custom_bindings.h" 45 #include "chrome/renderer/extensions/extension_custom_bindings.h"
46 #include "chrome/renderer/extensions/extension_groups.h" 46 #include "chrome/renderer/extensions/extension_groups.h"
47 #include "chrome/renderer/extensions/extension_helper.h" 47 #include "chrome/renderer/extensions/extension_helper.h"
48 #include "chrome/renderer/extensions/feedback_private_custom_bindings.h" 48 #include "chrome/renderer/extensions/feedback_private_custom_bindings.h"
49 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h" 49 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h"
50 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h" 50 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h"
51 #include "chrome/renderer/extensions/file_system_provider_natives.h"
51 #include "chrome/renderer/extensions/file_system_natives.h" 52 #include "chrome/renderer/extensions/file_system_natives.h"
52 #include "chrome/renderer/extensions/i18n_custom_bindings.h" 53 #include "chrome/renderer/extensions/i18n_custom_bindings.h"
53 #include "chrome/renderer/extensions/id_generator_custom_bindings.h" 54 #include "chrome/renderer/extensions/id_generator_custom_bindings.h"
54 #include "chrome/renderer/extensions/logging_native_handler.h" 55 #include "chrome/renderer/extensions/logging_native_handler.h"
55 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h" 56 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h"
56 #include "chrome/renderer/extensions/messaging_bindings.h" 57 #include "chrome/renderer/extensions/messaging_bindings.h"
57 #include "chrome/renderer/extensions/module_system.h" 58 #include "chrome/renderer/extensions/module_system.h"
58 #include "chrome/renderer/extensions/object_backed_native_handler.h" 59 #include "chrome/renderer/extensions/object_backed_native_handler.h"
59 #include "chrome/renderer/extensions/page_actions_custom_bindings.h" 60 #include "chrome/renderer/extensions/page_actions_custom_bindings.h"
60 #include "chrome/renderer/extensions/page_capture_custom_bindings.h" 61 #include "chrome/renderer/extensions/page_capture_custom_bindings.h"
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 module_system->RegisterNativeHandler("runtime", 939 module_system->RegisterNativeHandler("runtime",
939 scoped_ptr<NativeHandler>(new RuntimeCustomBindings(this, context))); 940 scoped_ptr<NativeHandler>(new RuntimeCustomBindings(this, context)));
940 module_system->RegisterNativeHandler("tabs", 941 module_system->RegisterNativeHandler("tabs",
941 scoped_ptr<NativeHandler>(new TabsCustomBindings(this, context))); 942 scoped_ptr<NativeHandler>(new TabsCustomBindings(this, context)));
942 module_system->RegisterNativeHandler("webstore", 943 module_system->RegisterNativeHandler("webstore",
943 scoped_ptr<NativeHandler>(new WebstoreBindings(this, context))); 944 scoped_ptr<NativeHandler>(new WebstoreBindings(this, context)));
944 #if defined(ENABLE_WEBRTC) 945 #if defined(ENABLE_WEBRTC)
945 module_system->RegisterNativeHandler("webrtc_natives", 946 module_system->RegisterNativeHandler("webrtc_natives",
946 scoped_ptr<NativeHandler>(new WebRtcNativeHandler(context))); 947 scoped_ptr<NativeHandler>(new WebRtcNativeHandler(context)));
947 #endif 948 #endif
949 module_system->RegisterNativeHandler("file_system_provider",
950 scoped_ptr<NativeHandler>(new fileSystemProviderNatives(
951 context)));
948 } 952 }
949 953
950 void Dispatcher::PopulateSourceMap() { 954 void Dispatcher::PopulateSourceMap() {
951 // Libraries. 955 // Libraries.
952 source_map_.RegisterSource("entryIdManager", IDR_ENTRY_ID_MANAGER); 956 source_map_.RegisterSource("entryIdManager", IDR_ENTRY_ID_MANAGER);
953 source_map_.RegisterSource(kEventBindings, IDR_EVENT_BINDINGS_JS); 957 source_map_.RegisterSource(kEventBindings, IDR_EVENT_BINDINGS_JS);
954 source_map_.RegisterSource("imageUtil", IDR_IMAGE_UTIL_JS); 958 source_map_.RegisterSource("imageUtil", IDR_IMAGE_UTIL_JS);
955 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS); 959 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS);
956 source_map_.RegisterSource("lastError", IDR_LAST_ERROR_JS); 960 source_map_.RegisterSource("lastError", IDR_LAST_ERROR_JS);
957 source_map_.RegisterSource("messaging", IDR_MESSAGING_JS); 961 source_map_.RegisterSource("messaging", IDR_MESSAGING_JS);
(...skipping 26 matching lines...) Expand all
984 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS); 988 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS);
985 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); 989 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS);
986 source_map_.RegisterSource("feedbackPrivate", 990 source_map_.RegisterSource("feedbackPrivate",
987 IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS); 991 IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS);
988 source_map_.RegisterSource("fileBrowserHandler", 992 source_map_.RegisterSource("fileBrowserHandler",
989 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); 993 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS);
990 source_map_.RegisterSource("fileBrowserPrivate", 994 source_map_.RegisterSource("fileBrowserPrivate",
991 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); 995 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS);
992 source_map_.RegisterSource("fileSystem", 996 source_map_.RegisterSource("fileSystem",
993 IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS); 997 IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS);
998 source_map_.RegisterSource("fileSystemProvider",
999 IDR_FILE_SYSTEM_PROVIDER_CUSTOM_BINDINGS_JS);
994 source_map_.RegisterSource("i18n", IDR_I18N_CUSTOM_BINDINGS_JS); 1000 source_map_.RegisterSource("i18n", IDR_I18N_CUSTOM_BINDINGS_JS);
995 source_map_.RegisterSource("input.ime", IDR_INPUT_IME_CUSTOM_BINDINGS_JS); 1001 source_map_.RegisterSource("input.ime", IDR_INPUT_IME_CUSTOM_BINDINGS_JS);
996 source_map_.RegisterSource("mediaGalleries", 1002 source_map_.RegisterSource("mediaGalleries",
997 IDR_MEDIA_GALLERIES_CUSTOM_BINDINGS_JS); 1003 IDR_MEDIA_GALLERIES_CUSTOM_BINDINGS_JS);
998 source_map_.RegisterSource("notifications", 1004 source_map_.RegisterSource("notifications",
999 IDR_NOTIFICATIONS_CUSTOM_BINDINGS_JS); 1005 IDR_NOTIFICATIONS_CUSTOM_BINDINGS_JS);
1000 source_map_.RegisterSource("omnibox", IDR_OMNIBOX_CUSTOM_BINDINGS_JS); 1006 source_map_.RegisterSource("omnibox", IDR_OMNIBOX_CUSTOM_BINDINGS_JS);
1001 source_map_.RegisterSource("pageActions", 1007 source_map_.RegisterSource("pageActions",
1002 IDR_PAGE_ACTIONS_CUSTOM_BINDINGS_JS); 1008 IDR_PAGE_ACTIONS_CUSTOM_BINDINGS_JS);
1003 source_map_.RegisterSource("pageAction", IDR_PAGE_ACTION_CUSTOM_BINDINGS_JS); 1009 source_map_.RegisterSource("pageAction", IDR_PAGE_ACTION_CUSTOM_BINDINGS_JS);
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 RenderView* background_view = 1636 RenderView* background_view =
1631 ExtensionHelper::GetBackgroundPage(extension_id); 1637 ExtensionHelper::GetBackgroundPage(extension_id);
1632 if (background_view) { 1638 if (background_view) {
1633 background_view->Send(new ExtensionHostMsg_EventAck( 1639 background_view->Send(new ExtensionHostMsg_EventAck(
1634 background_view->GetRoutingID())); 1640 background_view->GetRoutingID()));
1635 } 1641 }
1636 } 1642 }
1637 } 1643 }
1638 1644
1639 } // namespace extensions 1645 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698