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

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

Issue 302463005: Add support for AMD to the extensions module system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/app_custom_bindings.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome_extensions_dispatcher_delegate.h" 5 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 void ChromeExtensionsDispatcherDelegate::RegisterNativeHandlers( 86 void ChromeExtensionsDispatcherDelegate::RegisterNativeHandlers(
87 extensions::Dispatcher* dispatcher, 87 extensions::Dispatcher* dispatcher,
88 extensions::ModuleSystem* module_system, 88 extensions::ModuleSystem* module_system,
89 extensions::ScriptContext* context) { 89 extensions::ScriptContext* context) {
90 #if !defined(ENABLE_EXTENSIONS) 90 #if !defined(ENABLE_EXTENSIONS)
91 return; 91 return;
92 #endif 92 #endif
93 module_system->RegisterNativeHandler( 93 module_system->RegisterNativeHandler(
94 "app", 94 "app_natives",
95 scoped_ptr<NativeHandler>( 95 scoped_ptr<NativeHandler>(
96 new extensions::AppBindings(dispatcher, context))); 96 new extensions::AppBindings(dispatcher, context)));
97 module_system->RegisterNativeHandler( 97 module_system->RegisterNativeHandler(
98 "app_window_natives", 98 "app_window_natives",
99 scoped_ptr<NativeHandler>( 99 scoped_ptr<NativeHandler>(
100 new extensions::AppWindowCustomBindings(dispatcher, context))); 100 new extensions::AppWindowCustomBindings(dispatcher, context)));
101 module_system->RegisterNativeHandler( 101 module_system->RegisterNativeHandler(
102 "sync_file_system", 102 "sync_file_system",
103 scoped_ptr<NativeHandler>( 103 scoped_ptr<NativeHandler>(
104 new extensions::SyncFileSystemCustomBindings(context))); 104 new extensions::SyncFileSystemCustomBindings(context)));
105 module_system->RegisterNativeHandler( 105 module_system->RegisterNativeHandler(
106 "file_browser_handler", 106 "file_browser_handler",
107 scoped_ptr<NativeHandler>( 107 scoped_ptr<NativeHandler>(
108 new extensions::FileBrowserHandlerCustomBindings(context))); 108 new extensions::FileBrowserHandlerCustomBindings(context)));
109 module_system->RegisterNativeHandler( 109 module_system->RegisterNativeHandler(
110 "file_browser_private", 110 "file_browser_private",
111 scoped_ptr<NativeHandler>( 111 scoped_ptr<NativeHandler>(
112 new extensions::FileBrowserPrivateCustomBindings(context))); 112 new extensions::FileBrowserPrivateCustomBindings(context)));
113 module_system->RegisterNativeHandler( 113 module_system->RegisterNativeHandler(
114 "notifications_private", 114 "notifications_private",
115 scoped_ptr<NativeHandler>( 115 scoped_ptr<NativeHandler>(
116 new extensions::NotificationsNativeHandler(context))); 116 new extensions::NotificationsNativeHandler(context)));
117 module_system->RegisterNativeHandler( 117 module_system->RegisterNativeHandler(
118 "mediaGalleries", 118 "media_galleries_natives",
119 scoped_ptr<NativeHandler>( 119 scoped_ptr<NativeHandler>(
120 new extensions::MediaGalleriesCustomBindings(context))); 120 new extensions::MediaGalleriesCustomBindings(context)));
121 module_system->RegisterNativeHandler( 121 module_system->RegisterNativeHandler(
122 "page_actions", 122 "page_actions",
123 scoped_ptr<NativeHandler>( 123 scoped_ptr<NativeHandler>(
124 new extensions::PageActionsCustomBindings(dispatcher, context))); 124 new extensions::PageActionsCustomBindings(dispatcher, context)));
125 module_system->RegisterNativeHandler( 125 module_system->RegisterNativeHandler(
126 "page_capture", 126 "page_capture",
127 scoped_ptr<NativeHandler>( 127 scoped_ptr<NativeHandler>(
128 new extensions::PageCaptureCustomBindings(context))); 128 new extensions::PageCaptureCustomBindings(context)));
129 module_system->RegisterNativeHandler( 129 module_system->RegisterNativeHandler(
130 "pepper_request_natives", 130 "pepper_request_natives",
131 scoped_ptr<NativeHandler>(new extensions::PepperRequestNatives(context))); 131 scoped_ptr<NativeHandler>(new extensions::PepperRequestNatives(context)));
132 module_system->RegisterNativeHandler( 132 module_system->RegisterNativeHandler(
133 "tabs", 133 "tabs_natives",
134 scoped_ptr<NativeHandler>(new extensions::TabsCustomBindings(context))); 134 scoped_ptr<NativeHandler>(new extensions::TabsCustomBindings(context)));
135 module_system->RegisterNativeHandler( 135 module_system->RegisterNativeHandler(
136 "webstore", 136 "webstore_natives",
137 scoped_ptr<NativeHandler>(new extensions::WebstoreBindings(context))); 137 scoped_ptr<NativeHandler>(new extensions::WebstoreBindings(context)));
138 #if defined(ENABLE_WEBRTC) 138 #if defined(ENABLE_WEBRTC)
139 module_system->RegisterNativeHandler( 139 module_system->RegisterNativeHandler(
140 "cast_streaming_natives", 140 "cast_streaming_natives",
141 scoped_ptr<NativeHandler>( 141 scoped_ptr<NativeHandler>(
142 new extensions::CastStreamingNativeHandler(context))); 142 new extensions::CastStreamingNativeHandler(context)));
143 #endif 143 #endif
144 module_system->RegisterNativeHandler( 144 module_system->RegisterNativeHandler(
145 "automationInternal", 145 "automationInternal",
146 scoped_ptr<NativeHandler>( 146 scoped_ptr<NativeHandler>(
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 new extensions::PermissionSet(extensions::APIPermissionSet(), 348 new extensions::PermissionSet(extensions::APIPermissionSet(),
349 extensions::ManifestPermissionSet(), 349 extensions::ManifestPermissionSet(),
350 origin_set, 350 origin_set,
351 extensions::URLPatternSet())); 351 extensions::URLPatternSet()));
352 } 352 }
353 353
354 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage( 354 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage(
355 bool webrequest_used) { 355 bool webrequest_used) {
356 webrequest_used_ = webrequest_used; 356 webrequest_used_ = webrequest_used;
357 } 357 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/app_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698