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

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

Issue 1423063004: Allow Chrome to bind an Application request from mojo_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@callback
Patch Set: . Created 5 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
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/mojo_runner_state.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_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "chrome/browser/component_updater/swiftshader_component_installer.h" 56 #include "chrome/browser/component_updater/swiftshader_component_installer.h"
57 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" 57 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
58 #include "chrome/browser/defaults.h" 58 #include "chrome/browser/defaults.h"
59 #include "chrome/browser/first_run/first_run.h" 59 #include "chrome/browser/first_run/first_run.h"
60 #include "chrome/browser/gpu/gl_string_manager.h" 60 #include "chrome/browser/gpu/gl_string_manager.h"
61 #include "chrome/browser/gpu/three_d_api_observer.h" 61 #include "chrome/browser/gpu/three_d_api_observer.h"
62 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 62 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
63 #include "chrome/browser/memory/tab_manager.h" 63 #include "chrome/browser/memory/tab_manager.h"
64 #include "chrome/browser/metrics/field_trial_synchronizer.h" 64 #include "chrome/browser/metrics/field_trial_synchronizer.h"
65 #include "chrome/browser/metrics/thread_watcher.h" 65 #include "chrome/browser/metrics/thread_watcher.h"
66 #include "chrome/browser/mojo_runner_util.h"
66 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 67 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
67 #include "chrome/browser/net/crl_set_fetcher.h" 68 #include "chrome/browser/net/crl_set_fetcher.h"
68 #include "chrome/browser/performance_monitor/performance_monitor.h" 69 #include "chrome/browser/performance_monitor/performance_monitor.h"
69 #include "chrome/browser/plugins/plugin_prefs.h" 70 #include "chrome/browser/plugins/plugin_prefs.h"
70 #include "chrome/browser/power/process_power_collector.h" 71 #include "chrome/browser/power/process_power_collector.h"
71 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 72 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
72 #include "chrome/browser/prefs/command_line_pref_store.h" 73 #include "chrome/browser/prefs/command_line_pref_store.h"
73 #include "chrome/browser/prefs/incognito_mode_prefs.h" 74 #include "chrome/browser/prefs/incognito_mode_prefs.h"
74 #include "chrome/browser/prefs/pref_metrics_service.h" 75 #include "chrome/browser/prefs/pref_metrics_service.h"
75 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 76 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 241
241 #if defined(USE_AURA) 242 #if defined(USE_AURA)
242 #include "ui/aura/env.h" 243 #include "ui/aura/env.h"
243 #endif // defined(USE_AURA) 244 #endif // defined(USE_AURA)
244 245
245 #if !defined(OS_ANDROID) && !defined(OS_IOS) 246 #if !defined(OS_ANDROID) && !defined(OS_IOS)
246 #include "chrome/browser/chrome_webusb_browser_client.h" 247 #include "chrome/browser/chrome_webusb_browser_client.h"
247 #include "components/webusb/webusb_detector.h" 248 #include "components/webusb/webusb_detector.h"
248 #endif 249 #endif
249 250
251 #if defined(MOJO_RUNNER_CLIENT)
252 #include "chrome/browser/mojo_runner_state.h"
253 #endif
254
250 using content::BrowserThread; 255 using content::BrowserThread;
251 256
252 namespace { 257 namespace {
253 258
254 // This function provides some ways to test crash and assertion handling 259 // This function provides some ways to test crash and assertion handling
255 // behavior of the program. 260 // behavior of the program.
256 void HandleTestParameters(const base::CommandLine& command_line) { 261 void HandleTestParameters(const base::CommandLine& command_line) {
257 // This parameter causes a null pointer crash (crash reporter trigger). 262 // This parameter causes a null pointer crash (crash reporter trigger).
258 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { 263 if (command_line.HasSwitch(switches::kBrowserCrashTest)) {
259 int* bad_pointer = NULL; 264 int* bad_pointer = NULL;
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 } 1210 }
1206 1211
1207 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1212 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1208 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1213 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1209 TRACK_SCOPED_REGION( 1214 TRACK_SCOPED_REGION(
1210 "Startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1215 "Startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1211 1216
1212 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); 1217 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime");
1213 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); 1218 const base::TimeTicks start_time_step1 = base::TimeTicks::Now();
1214 1219
1220 #if defined(MOJO_RUNNER_CLIENT)
1221 if (IsRunningInMojoRunner()) {
1222 mojo_runner_state_.reset(new MojoRunnerState);
1223 mojo_runner_state_->WaitForConnection();
1224 }
1225 #endif // defined(MOJO_RUNNER_CLIENT)
1226
1215 #if defined(OS_WIN) 1227 #if defined(OS_WIN)
1216 // Windows parental controls calls can be slow, so we do an early init here 1228 // Windows parental controls calls can be slow, so we do an early init here
1217 // that calculates this value off of the UI thread. 1229 // that calculates this value off of the UI thread.
1218 IncognitoModePrefs::InitializePlatformParentalControls(); 1230 IncognitoModePrefs::InitializePlatformParentalControls();
1219 #endif 1231 #endif
1220 1232
1221 #if defined(ENABLE_EXTENSIONS) 1233 #if defined(ENABLE_EXTENSIONS)
1222 if (!variations::GetVariationParamValue( 1234 if (!variations::GetVariationParamValue(
1223 "LightSpeed", "EarlyInitStartup").empty()) { 1235 "LightSpeed", "EarlyInitStartup").empty()) {
1224 // Try to compute this early on another thread so that we don't spend time 1236 // Try to compute this early on another thread so that we don't spend time
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 chromeos::CrosSettings::Shutdown(); 1862 chromeos::CrosSettings::Shutdown();
1851 #endif // defined(OS_CHROMEOS) 1863 #endif // defined(OS_CHROMEOS)
1852 #endif // defined(OS_ANDROID) 1864 #endif // defined(OS_ANDROID)
1853 } 1865 }
1854 1866
1855 // Public members: 1867 // Public members:
1856 1868
1857 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1869 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1858 chrome_extra_parts_.push_back(parts); 1870 chrome_extra_parts_.push_back(parts);
1859 } 1871 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/mojo_runner_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698