OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |