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

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

Issue 2215353004: content: Let embedders know when MojoShellConnection is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 <set> 10 #include <set>
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 1216
1217 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this. 1217 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this.
1218 browser_process_->PreCreateThreads(); 1218 browser_process_->PreCreateThreads();
1219 1219
1220 device::GeolocationProvider::SetGeolocationDelegate( 1220 device::GeolocationProvider::SetGeolocationDelegate(
1221 new ChromeGeolocationDelegate()); 1221 new ChromeGeolocationDelegate());
1222 1222
1223 return content::RESULT_CODE_NORMAL_EXIT; 1223 return content::RESULT_CODE_NORMAL_EXIT;
1224 } 1224 }
1225 1225
1226 void ChromeBrowserMainParts::MojoShellConnectionStarted(
1227 content::MojoShellConnection* connection) {
1228 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1229 chrome_extra_parts_[i]->MojoShellConnectionStarted(connection);
1230 }
1231
1226 void ChromeBrowserMainParts::PreMainMessageLoopRun() { 1232 void ChromeBrowserMainParts::PreMainMessageLoopRun() {
1227 #if defined(USE_AURA) 1233 #if defined(USE_AURA)
1228 if (content::MojoShellConnection::GetForProcess() && shell::ShellIsRemote()) { 1234 if (content::MojoShellConnection::GetForProcess() && shell::ShellIsRemote()) {
1229 content::MojoShellConnection::GetForProcess()->SetConnectionLostClosure( 1235 content::MojoShellConnection::GetForProcess()->SetConnectionLostClosure(
1230 base::Bind(&chrome::SessionEnding)); 1236 base::Bind(&chrome::SessionEnding));
1231 } 1237 }
1232 #endif 1238 #endif
1233 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun"); 1239 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
1234 1240
1235 result_code_ = PreMainMessageLoopRunImpl(); 1241 result_code_ = PreMainMessageLoopRunImpl();
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 chromeos::CrosSettings::Shutdown(); 2074 chromeos::CrosSettings::Shutdown();
2069 #endif // defined(OS_CHROMEOS) 2075 #endif // defined(OS_CHROMEOS)
2070 #endif // defined(OS_ANDROID) 2076 #endif // defined(OS_ANDROID)
2071 } 2077 }
2072 2078
2073 // Public members: 2079 // Public members:
2074 2080
2075 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2081 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2076 chrome_extra_parts_.push_back(parts); 2082 chrome_extra_parts_.push_back(parts);
2077 } 2083 }
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