| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_aura.h" | 5 #include "chrome/browser/chrome_browser_main_aura.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 #if defined(OS_CHROMEOS) |
| 10 #include "base/command_line.h" |
| 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 12 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "content/common/main_function_params.h" |
| 15 #endif |
| 16 |
| 9 ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( | 17 ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( |
| 10 const MainFunctionParams& parameters) | 18 const MainFunctionParams& parameters) |
| 11 : ChromeBrowserMainParts(parameters) { | 19 : ChromeBrowserMainParts(parameters) { |
| 12 NOTIMPLEMENTED(); | 20 NOTIMPLEMENTED(); |
| 13 } | 21 } |
| 14 | 22 |
| 23 ChromeBrowserMainPartsAura::~ChromeBrowserMainPartsAura() { |
| 24 #if defined(OS_CHROMEOS) |
| 25 chromeos::DBusThreadManager::Shutdown(); |
| 26 if (!parameters().ui_task && chromeos::CrosLibrary::Get()) |
| 27 chromeos::CrosLibrary::Shutdown(); |
| 28 #endif |
| 29 } |
| 30 |
| 15 void ChromeBrowserMainPartsAura::PreEarlyInitialization() { | 31 void ChromeBrowserMainPartsAura::PreEarlyInitialization() { |
| 16 NOTIMPLEMENTED(); | 32 NOTIMPLEMENTED(); |
| 17 } | 33 } |
| 18 | 34 |
| 35 void ChromeBrowserMainPartsAura::PreMainMessageLoopStart() { |
| 36 #if defined(OS_CHROMEOS) |
| 37 if (!parameters().ui_task) { |
| 38 bool use_stub = parameters().command_line_.HasSwitch(switches::kStubCros); |
| 39 chromeos::CrosLibrary::Initialize(use_stub); |
| 40 } |
| 41 #endif |
| 42 } |
| 43 |
| 19 void ChromeBrowserMainPartsAura::PostMainMessageLoopStart() { | 44 void ChromeBrowserMainPartsAura::PostMainMessageLoopStart() { |
| 20 NOTIMPLEMENTED(); | 45 #if defined(OS_CHROMEOS) |
| 46 // Initialize DBusThreadManager for the browser. This must be done after |
| 47 // the main message loop is started, as it uses the message loop. |
| 48 chromeos::DBusThreadManager::Initialize(); |
| 49 #endif |
| 21 } | 50 } |
| 22 | 51 |
| 23 void ShowMissingLocaleMessageBox() { | 52 void ShowMissingLocaleMessageBox() { |
| 24 NOTIMPLEMENTED(); | 53 NOTIMPLEMENTED(); |
| 25 } | 54 } |
| OLD | NEW |