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

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

Issue 2300453002: [Extensions] Begin making Extension port initialization asynchronous (Closed)
Patch Set: Nasko's Created 4 years, 3 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
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 <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/sha1.h" 10 #include "base/sha1.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "chrome/common/channel_info.h" 12 #include "chrome/common/channel_info.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/crash_keys.h" 14 #include "chrome/common/crash_keys.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "chrome/grit/renderer_resources.h" 16 #include "chrome/grit/renderer_resources.h"
17 #include "chrome/renderer/extensions/app_bindings.h" 17 #include "chrome/renderer/extensions/app_bindings.h"
18 #include "chrome/renderer/extensions/automation_internal_custom_bindings.h" 18 #include "chrome/renderer/extensions/automation_internal_custom_bindings.h"
19 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h" 19 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h"
20 #include "chrome/renderer/extensions/file_manager_private_custom_bindings.h" 20 #include "chrome/renderer/extensions/file_manager_private_custom_bindings.h"
21 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h" 21 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h"
22 #include "chrome/renderer/extensions/notifications_native_handler.h" 22 #include "chrome/renderer/extensions/notifications_native_handler.h"
23 #include "chrome/renderer/extensions/page_capture_custom_bindings.h" 23 #include "chrome/renderer/extensions/page_capture_custom_bindings.h"
24 #include "chrome/renderer/extensions/platform_keys_natives.h" 24 #include "chrome/renderer/extensions/platform_keys_natives.h"
25 #include "chrome/renderer/extensions/sync_file_system_custom_bindings.h" 25 #include "chrome/renderer/extensions/sync_file_system_custom_bindings.h"
26 #include "chrome/renderer/extensions/tabs_custom_bindings.h"
27 #include "chrome/renderer/extensions/webstore_bindings.h" 26 #include "chrome/renderer/extensions/webstore_bindings.h"
28 #include "components/version_info/version_info.h" 27 #include "components/version_info/version_info.h"
29 #include "content/public/common/content_switches.h" 28 #include "content/public/common/content_switches.h"
30 #include "content/public/renderer/render_thread.h" 29 #include "content/public/renderer/render_thread.h"
31 #include "content/public/renderer/render_view.h" 30 #include "content/public/renderer/render_view.h"
32 #include "extensions/common/constants.h" 31 #include "extensions/common/constants.h"
33 #include "extensions/common/extension.h" 32 #include "extensions/common/extension.h"
34 #include "extensions/common/feature_switch.h" 33 #include "extensions/common/feature_switch.h"
35 #include "extensions/common/features/feature_channel.h" 34 #include "extensions/common/features/feature_channel.h"
36 #include "extensions/common/permissions/manifest_permission_set.h" 35 #include "extensions/common/permissions/manifest_permission_set.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 std::unique_ptr<NativeHandler>( 117 std::unique_ptr<NativeHandler>(
119 new extensions::MediaGalleriesCustomBindings(context))); 118 new extensions::MediaGalleriesCustomBindings(context)));
120 module_system->RegisterNativeHandler( 119 module_system->RegisterNativeHandler(
121 "page_capture", std::unique_ptr<NativeHandler>( 120 "page_capture", std::unique_ptr<NativeHandler>(
122 new extensions::PageCaptureCustomBindings(context))); 121 new extensions::PageCaptureCustomBindings(context)));
123 module_system->RegisterNativeHandler( 122 module_system->RegisterNativeHandler(
124 "platform_keys_natives", 123 "platform_keys_natives",
125 std::unique_ptr<NativeHandler>( 124 std::unique_ptr<NativeHandler>(
126 new extensions::PlatformKeysNatives(context))); 125 new extensions::PlatformKeysNatives(context)));
127 module_system->RegisterNativeHandler( 126 module_system->RegisterNativeHandler(
128 "tabs", std::unique_ptr<NativeHandler>(
129 new extensions::TabsCustomBindings(context)));
130 module_system->RegisterNativeHandler(
131 "webstore", std::unique_ptr<NativeHandler>( 127 "webstore", std::unique_ptr<NativeHandler>(
132 new extensions::WebstoreBindings(context))); 128 new extensions::WebstoreBindings(context)));
133 #if defined(ENABLE_WEBRTC) 129 #if defined(ENABLE_WEBRTC)
134 module_system->RegisterNativeHandler( 130 module_system->RegisterNativeHandler(
135 "cast_streaming_natives", 131 "cast_streaming_natives",
136 std::unique_ptr<NativeHandler>( 132 std::unique_ptr<NativeHandler>(
137 new extensions::CastStreamingNativeHandler(context))); 133 new extensions::CastStreamingNativeHandler(context)));
138 #endif 134 #endif
139 module_system->RegisterNativeHandler( 135 module_system->RegisterNativeHandler(
140 "automationInternal", 136 "automationInternal",
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 282 }
287 283
288 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated( 284 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated(
289 const std::set<std::string>& extension_ids) { 285 const std::set<std::string>& extension_ids) {
290 // In single-process mode, the browser process reports the active extensions. 286 // In single-process mode, the browser process reports the active extensions.
291 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 287 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
292 ::switches::kSingleProcess)) 288 ::switches::kSingleProcess))
293 return; 289 return;
294 crash_keys::SetActiveExtensions(extension_ids); 290 crash_keys::SetActiveExtensions(extension_ids);
295 } 291 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.cc ('k') | chrome/renderer/extensions/tabs_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698