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

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

Issue 2398783002: Rename a bunch of Mojo Application stuff to reference Services. (Closed)
Patch Set: . Created 4 years, 2 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_browser_main.h ('k') | chrome/browser/chrome_browser_main_extra_parts.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 #if defined(USE_AURA) 263 #if defined(USE_AURA)
264 #include "ui/aura/env.h" 264 #include "ui/aura/env.h"
265 #endif // defined(USE_AURA) 265 #endif // defined(USE_AURA)
266 266
267 #if !defined(OS_ANDROID) 267 #if !defined(OS_ANDROID)
268 #include "chrome/browser/usb/web_usb_detector.h" 268 #include "chrome/browser/usb/web_usb_detector.h"
269 #endif 269 #endif
270 270
271 #if defined(USE_AURA) 271 #if defined(USE_AURA)
272 #include "chrome/browser/lifetime/application_lifetime.h" 272 #include "chrome/browser/lifetime/application_lifetime.h"
273 #include "content/public/common/mojo_shell_connection.h" 273 #include "content/public/common/service_manager_connection.h"
274 #include "services/shell/runner/common/client_util.h" 274 #include "services/shell/runner/common/client_util.h"
275 #endif 275 #endif
276 276
277 #if defined(OS_WIN) || defined(OS_MACOSX) || \ 277 #if defined(OS_WIN) || defined(OS_MACOSX) || \
278 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 278 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
279 #include "chrome/browser/metrics/desktop_session_duration/desktop_session_durati on_tracker.h" 279 #include "chrome/browser/metrics/desktop_session_duration/desktop_session_durati on_tracker.h"
280 #endif 280 #endif
281 281
282 using content::BrowserThread; 282 using content::BrowserThread;
283 283
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 SetupMetrics(); 1358 SetupMetrics();
1359 1359
1360 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this. 1360 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this.
1361 // This also instantiates the IOThread which requests the metrics service and 1361 // This also instantiates the IOThread which requests the metrics service and
1362 // must be after |SetupMetrics()|. 1362 // must be after |SetupMetrics()|.
1363 browser_process_->PreCreateThreads(); 1363 browser_process_->PreCreateThreads();
1364 1364
1365 return content::RESULT_CODE_NORMAL_EXIT; 1365 return content::RESULT_CODE_NORMAL_EXIT;
1366 } 1366 }
1367 1367
1368 void ChromeBrowserMainParts::MojoShellConnectionStarted( 1368 void ChromeBrowserMainParts::ServiceManagerConnectionStarted(
1369 content::MojoShellConnection* connection) { 1369 content::ServiceManagerConnection* connection) {
1370 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1370 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1371 chrome_extra_parts_[i]->MojoShellConnectionStarted(connection); 1371 chrome_extra_parts_[i]->ServiceManagerConnectionStarted(connection);
1372 } 1372 }
1373 1373
1374 void ChromeBrowserMainParts::PreMainMessageLoopRun() { 1374 void ChromeBrowserMainParts::PreMainMessageLoopRun() {
1375 #if defined(USE_AURA) 1375 #if defined(USE_AURA)
1376 if (content::MojoShellConnection::GetForProcess() && shell::ShellIsRemote()) { 1376 if (content::ServiceManagerConnection::GetForProcess() &&
1377 content::MojoShellConnection::GetForProcess()->SetConnectionLostClosure( 1377 shell::ShellIsRemote()) {
1378 base::Bind(&chrome::SessionEnding)); 1378 content::ServiceManagerConnection::GetForProcess()->
1379 SetConnectionLostClosure(base::Bind(&chrome::SessionEnding));
1379 } 1380 }
1380 #endif 1381 #endif
1381 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun"); 1382 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
1382 1383
1383 result_code_ = PreMainMessageLoopRunImpl(); 1384 result_code_ = PreMainMessageLoopRunImpl();
1384 1385
1385 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1386 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1386 chrome_extra_parts_[i]->PreMainMessageLoopRun(); 1387 chrome_extra_parts_[i]->PreMainMessageLoopRun();
1387 } 1388 }
1388 1389
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 chromeos::CrosSettings::Shutdown(); 2226 chromeos::CrosSettings::Shutdown();
2226 #endif // defined(OS_CHROMEOS) 2227 #endif // defined(OS_CHROMEOS)
2227 #endif // defined(OS_ANDROID) 2228 #endif // defined(OS_ANDROID)
2228 } 2229 }
2229 2230
2230 // Public members: 2231 // Public members:
2231 2232
2232 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2233 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2233 chrome_extra_parts_.push_back(parts); 2234 chrome_extra_parts_.push_back(parts);
2234 } 2235 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_extra_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698