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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1183443002: Reland: Introduce the devices Mojo app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn check... Created 5 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 | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chrome_device_client.h » ('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 (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/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/files/scoped_file.h" 14 #include "base/files/scoped_file.h"
15 #include "base/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/prefs/pref_service.h" 18 #include "base/prefs/pref_service.h"
19 #include "base/prefs/scoped_user_pref_update.h" 19 #include "base/prefs/scoped_user_pref_update.h"
20 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/thread_task_runner_handle.h"
22 #include "base/threading/sequenced_worker_pool.h" 23 #include "base/threading/sequenced_worker_pool.h"
23 #include "chrome/browser/after_startup_task_utils.h" 24 #include "chrome/browser/after_startup_task_utils.h"
24 #include "chrome/browser/browser_about_handler.h" 25 #include "chrome/browser/browser_about_handler.h"
25 #include "chrome/browser/browser_process.h" 26 #include "chrome/browser/browser_process.h"
26 #include "chrome/browser/browser_shutdown.h" 27 #include "chrome/browser/browser_shutdown.h"
27 #include "chrome/browser/browsing_data/browsing_data_helper.h" 28 #include "chrome/browser/browsing_data/browsing_data_helper.h"
28 #include "chrome/browser/browsing_data/browsing_data_remover.h" 29 #include "chrome/browser/browsing_data/browsing_data_remover.h"
29 #include "chrome/browser/character_encoding.h" 30 #include "chrome/browser/character_encoding.h"
30 #include "chrome/browser/chrome_content_browser_client_parts.h" 31 #include "chrome/browser/chrome_content_browser_client_parts.h"
31 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 32 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "content/public/browser/render_process_host.h" 117 #include "content/public/browser/render_process_host.h"
117 #include "content/public/browser/render_view_host.h" 118 #include "content/public/browser/render_view_host.h"
118 #include "content/public/browser/resource_context.h" 119 #include "content/public/browser/resource_context.h"
119 #include "content/public/browser/site_instance.h" 120 #include "content/public/browser/site_instance.h"
120 #include "content/public/browser/web_contents.h" 121 #include "content/public/browser/web_contents.h"
121 #include "content/public/common/child_process_host.h" 122 #include "content/public/common/child_process_host.h"
122 #include "content/public/common/content_descriptors.h" 123 #include "content/public/common/content_descriptors.h"
123 #include "content/public/common/service_registry.h" 124 #include "content/public/common/service_registry.h"
124 #include "content/public/common/url_utils.h" 125 #include "content/public/common/url_utils.h"
125 #include "content/public/common/web_preferences.h" 126 #include "content/public/common/web_preferences.h"
127 #include "device/devices_app/devices_app.h"
126 #include "gin/v8_initializer.h" 128 #include "gin/v8_initializer.h"
127 #include "net/base/mime_util.h" 129 #include "net/base/mime_util.h"
128 #include "net/cookies/canonical_cookie.h" 130 #include "net/cookies/canonical_cookie.h"
129 #include "net/cookies/cookie_options.h" 131 #include "net/cookies/cookie_options.h"
130 #include "net/ssl/ssl_cert_request_info.h" 132 #include "net/ssl/ssl_cert_request_info.h"
131 #include "ppapi/host/ppapi_host.h" 133 #include "ppapi/host/ppapi_host.h"
132 #include "storage/browser/fileapi/external_mount_points.h" 134 #include "storage/browser/fileapi/external_mount_points.h"
133 #include "ui/base/l10n/l10n_util.h" 135 #include "ui/base/l10n/l10n_util.h"
134 #include "ui/base/resource/resource_bundle.h" 136 #include "ui/base/resource/resource_bundle.h"
135 #include "ui/resources/grit/ui_resources.h" 137 #include "ui/resources/grit/ui_resources.h"
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 void ChromeContentBrowserClient::OverrideRenderFrameMojoServices( 2360 void ChromeContentBrowserClient::OverrideRenderFrameMojoServices(
2359 content::ServiceRegistry* registry, 2361 content::ServiceRegistry* registry,
2360 content::RenderFrameHost* render_frame_host) { 2362 content::RenderFrameHost* render_frame_host) {
2361 #if defined(OS_CHROMEOS) 2363 #if defined(OS_CHROMEOS)
2362 registry->AddService( 2364 registry->AddService(
2363 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, 2365 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create,
2364 render_frame_host)); 2366 render_frame_host));
2365 #endif 2367 #endif
2366 } 2368 }
2367 2369
2370 void ChromeContentBrowserClient::RegisterMojoApplications(
2371 StaticMojoApplicationMap* apps) {
2372 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2373 apps->insert(std::make_pair(GURL(device::kDevicesMojoAppUrl),
2374 base::Bind(&device::DevicesApp::CreateDelegate,
2375 base::ThreadTaskRunnerHandle::Get())));
2376 #endif
2377 }
2378
2368 void ChromeContentBrowserClient::OpenURL( 2379 void ChromeContentBrowserClient::OpenURL(
2369 content::BrowserContext* browser_context, 2380 content::BrowserContext* browser_context,
2370 const content::OpenURLParams& params, 2381 const content::OpenURLParams& params,
2371 const base::Callback<void(content::WebContents*)>& callback) { 2382 const base::Callback<void(content::WebContents*)>& callback) {
2372 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2383 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2373 2384
2374 #if !defined(OS_ANDROID) && !defined(OS_IOS) 2385 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2375 NavigateParams nav_params(Profile::FromBrowserContext(browser_context), 2386 NavigateParams nav_params(Profile::FromBrowserContext(browser_context),
2376 params.url, 2387 params.url,
2377 params.transition); 2388 params.transition);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 switches::kDisableWebRtcEncryption, 2492 switches::kDisableWebRtcEncryption,
2482 }; 2493 };
2483 to_command_line->CopySwitchesFrom(from_command_line, 2494 to_command_line->CopySwitchesFrom(from_command_line,
2484 kWebRtcDevSwitchNames, 2495 kWebRtcDevSwitchNames,
2485 arraysize(kWebRtcDevSwitchNames)); 2496 arraysize(kWebRtcDevSwitchNames));
2486 } 2497 }
2487 } 2498 }
2488 #endif // defined(ENABLE_WEBRTC) 2499 #endif // defined(ENABLE_WEBRTC)
2489 2500
2490 } // namespace chrome 2501 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chrome_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698