| 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" |
| 18 #include "chromeos/dbus/dbus_thread_manager.h" | 19 #include "chromeos/dbus/dbus_thread_manager.h" |
| 19 #include "chromeos/network/network_handler.h" | 20 #include "chromeos/network/network_handler.h" |
| 20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 21 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 22 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 22 #include "ui/aura/env.h" | 23 #include "ui/aura/env.h" |
| 23 #include "ui/aura/window_tree_host.h" | 24 #include "ui/aura/window_tree_host.h" |
| 24 #include "ui/display/display_switches.h" | 25 #include "ui/display/display_switches.h" |
| 25 #include "ui/message_center/message_center.h" | 26 #include "ui/message_center/message_center.h" |
| 26 #include "ui/wm/core/wm_state.h" | 27 #include "ui/wm/core/wm_state.h" |
| 27 | 28 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS( | 50 ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS( |
| 50 ui::ContextFactory* context_factory) { | 51 ui::ContextFactory* context_factory) { |
| 51 // Ash Shell can't just live on its own without a browser process, we need to | 52 // Ash Shell can't just live on its own without a browser process, we need to |
| 52 // also create the message center. | 53 // also create the message center. |
| 53 message_center::MessageCenter::Initialize(); | 54 message_center::MessageCenter::Initialize(); |
| 54 chromeos::DBusThreadManager::Initialize(); | 55 chromeos::DBusThreadManager::Initialize(); |
| 55 bluez::BluezDBusManager::Initialize( | 56 bluez::BluezDBusManager::Initialize( |
| 56 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 57 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
| 57 chromeos::DBusThreadManager::Get()->IsUsingStub( | 58 chromeos::DBusThreadManager::Get()->IsUsingFake( |
| 58 chromeos::DBusClientBundle::BLUETOOTH)); | 59 chromeos::DBusClientType::BLUETOOTH)); |
| 59 chromeos::CrasAudioHandler::InitializeForTesting(); | 60 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 60 chromeos::NetworkHandler::Initialize(); | 61 chromeos::NetworkHandler::Initialize(); |
| 61 ash::MaterialDesignController::Initialize(); | 62 ash::MaterialDesignController::Initialize(); |
| 62 | 63 |
| 63 env_ = aura::Env::CreateInstance(); | 64 env_ = aura::Env::CreateInstance(); |
| 64 ash::test::TestShellDelegate* shell_delegate = | 65 ash::test::TestShellDelegate* shell_delegate = |
| 65 new ash::test::TestShellDelegate(); | 66 new ash::test::TestShellDelegate(); |
| 66 ash::ShellInitParams init_params; | 67 ash::ShellInitParams init_params; |
| 67 init_params.delegate = shell_delegate; | 68 init_params.delegate = shell_delegate; |
| 68 init_params.context_factory = context_factory; | 69 init_params.context_factory = context_factory; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 88 message_center::MessageCenter::Shutdown(); | 89 message_center::MessageCenter::Shutdown(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 } // namespace | 92 } // namespace |
| 92 | 93 |
| 93 // static | 94 // static |
| 94 ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create( | 95 ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create( |
| 95 ui::ContextFactory* context_factory) { | 96 ui::ContextFactory* context_factory) { |
| 96 return new ViewEventTestPlatformPartChromeOS(context_factory); | 97 return new ViewEventTestPlatformPartChromeOS(context_factory); |
| 97 } | 98 } |
| OLD | NEW |