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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 2343993003: chromeos: Refactor D-Bus client creation for ash and browser processes (Closed)
Patch Set: rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/test/ash_test_helper.h" 5 #include "ash/test/ash_test_helper.h"
6 6
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/test/material_design_controller_test_api.h" 9 #include "ash/common/test/material_design_controller_test_api.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (!test_shell_delegate_) 86 if (!test_shell_delegate_)
87 test_shell_delegate_ = new TestShellDelegate; 87 test_shell_delegate_ = new TestShellDelegate;
88 88
89 // Creates MessageCenter since g_browser_process is not created in AshTestBase 89 // Creates MessageCenter since g_browser_process is not created in AshTestBase
90 // tests. 90 // tests.
91 message_center::MessageCenter::Initialize(); 91 message_center::MessageCenter::Initialize();
92 92
93 #if defined(OS_CHROMEOS) 93 #if defined(OS_CHROMEOS)
94 // Create DBusThreadManager for testing. 94 // Create DBusThreadManager for testing.
95 if (!chromeos::DBusThreadManager::IsInitialized()) { 95 if (!chromeos::DBusThreadManager::IsInitialized()) {
96 chromeos::DBusThreadManager::Initialize(); 96 chromeos::DBusThreadManager::Initialize(
97 chromeos::DBusThreadManager::PROCESS_ASH);
97 dbus_thread_manager_initialized_ = true; 98 dbus_thread_manager_initialized_ = true;
98 } 99 }
99 100
100 if (!bluez::BluezDBusManager::IsInitialized()) { 101 if (!bluez::BluezDBusManager::IsInitialized()) {
101 bluez::BluezDBusManager::Initialize( 102 bluez::BluezDBusManager::Initialize(
102 chromeos::DBusThreadManager::Get()->GetSystemBus(), 103 chromeos::DBusThreadManager::Get()->GetSystemBus(),
103 chromeos::DBusThreadManager::Get()->IsUsingFake( 104 chromeos::DBusThreadManager::Get()->IsUsingFake(
104 chromeos::DBusClientType::BLUETOOTH)); 105 chromeos::DBusClientType::BLUETOOTH));
105 bluez_dbus_manager_initialized_ = true; 106 bluez_dbus_manager_initialized_ = true;
106 } 107 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 bool AshTestHelper::SupportsHostWindowResize() { 219 bool AshTestHelper::SupportsHostWindowResize() {
219 #if defined(OS_WIN) 220 #if defined(OS_WIN)
220 return false; 221 return false;
221 #else 222 #else
222 return true; 223 return true;
223 #endif 224 #endif
224 } 225 }
225 226
226 } // namespace test 227 } // namespace test
227 } // namespace ash 228 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698