OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test/base/view_event_test_platform_part.h" | 5 #include "chrome/test/base/view_event_test_platform_part.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "ash/shell_init_params.h" | 11 #include "ash/shell_init_params.h" |
12 #include "ash/test/ash_test_helper.h" | 12 #include "ash/test/ash_test_helper.h" |
13 #include "ash/test/test_session_state_delegate.h" | 13 #include "ash/test/test_session_state_delegate.h" |
14 #include "ash/test/test_shell_delegate.h" | 14 #include "ash/test/test_shell_delegate.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "chromeos/audio/cras_audio_handler.h" | 17 #include "chromeos/audio/cras_audio_handler.h" |
18 #include "chromeos/dbus/dbus_client_types.h" | |
19 #include "chromeos/dbus/dbus_thread_manager.h" | 18 #include "chromeos/dbus/dbus_thread_manager.h" |
20 #include "chromeos/network/network_handler.h" | 19 #include "chromeos/network/network_handler.h" |
21 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
22 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 21 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
23 #include "ui/aura/env.h" | 22 #include "ui/aura/env.h" |
24 #include "ui/aura/window_tree_host.h" | 23 #include "ui/aura/window_tree_host.h" |
25 #include "ui/display/display_switches.h" | 24 #include "ui/display/display_switches.h" |
26 #include "ui/message_center/message_center.h" | 25 #include "ui/message_center/message_center.h" |
27 #include "ui/wm/core/wm_state.h" | 26 #include "ui/wm/core/wm_state.h" |
28 | 27 |
(...skipping 19 matching lines...) Expand all Loading... |
48 }; | 47 }; |
49 | 48 |
50 ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS( | 49 ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS( |
51 ui::ContextFactory* context_factory) { | 50 ui::ContextFactory* context_factory) { |
52 // Ash Shell can't just live on its own without a browser process, we need to | 51 // Ash Shell can't just live on its own without a browser process, we need to |
53 // also create the message center. | 52 // also create the message center. |
54 message_center::MessageCenter::Initialize(); | 53 message_center::MessageCenter::Initialize(); |
55 chromeos::DBusThreadManager::Initialize(); | 54 chromeos::DBusThreadManager::Initialize(); |
56 bluez::BluezDBusManager::Initialize( | 55 bluez::BluezDBusManager::Initialize( |
57 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 56 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
58 chromeos::DBusThreadManager::Get()->IsUsingFake( | 57 chromeos::DBusThreadManager::Get()->IsUsingFakes()); |
59 chromeos::DBusClientType::BLUETOOTH)); | |
60 chromeos::CrasAudioHandler::InitializeForTesting(); | 58 chromeos::CrasAudioHandler::InitializeForTesting(); |
61 chromeos::NetworkHandler::Initialize(); | 59 chromeos::NetworkHandler::Initialize(); |
62 ash::MaterialDesignController::Initialize(); | 60 ash::MaterialDesignController::Initialize(); |
63 | 61 |
64 env_ = aura::Env::CreateInstance(); | 62 env_ = aura::Env::CreateInstance(); |
65 ash::test::TestShellDelegate* shell_delegate = | 63 ash::test::TestShellDelegate* shell_delegate = |
66 new ash::test::TestShellDelegate(); | 64 new ash::test::TestShellDelegate(); |
67 ash::ShellInitParams init_params; | 65 ash::ShellInitParams init_params; |
68 init_params.delegate = shell_delegate; | 66 init_params.delegate = shell_delegate; |
69 init_params.context_factory = context_factory; | 67 init_params.context_factory = context_factory; |
(...skipping 19 matching lines...) Expand all Loading... |
89 message_center::MessageCenter::Shutdown(); | 87 message_center::MessageCenter::Shutdown(); |
90 } | 88 } |
91 | 89 |
92 } // namespace | 90 } // namespace |
93 | 91 |
94 // static | 92 // static |
95 ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create( | 93 ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create( |
96 ui::ContextFactory* context_factory) { | 94 ui::ContextFactory* context_factory) { |
97 return new ViewEventTestPlatformPartChromeOS(context_factory); | 95 return new ViewEventTestPlatformPartChromeOS(context_factory); |
98 } | 96 } |
OLD | NEW |