Commit 1a076f1a authored by Elliot Glaysher's avatar Elliot Glaysher Committed by Commit Bot

Remove superfluous USE_OZONE guards.

Bug: 750642
Change-Id: Ib2b7167048a75a3b97e7df80ea21d1ca30ae5b1a
Reviewed-on: https://chromium-review.googlesource.com/598459Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Elliot Glaysher <erg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491508}
parent 72892854
...@@ -68,10 +68,6 @@ include_rules = [ ...@@ -68,10 +68,6 @@ include_rules = [
# TODO: This is temporary, ash should not use these. http://crbug.com/747415. # TODO: This is temporary, ash should not use these. http://crbug.com/747415.
"+ui/events/devices/device_data_manager.h", "+ui/events/devices/device_data_manager.h",
"+ui/events/devices/input_device_manager.h", "+ui/events/devices/input_device_manager.h",
# X11 support isn't used in production and will go away soon.
# http://crbug.com/671355.
"+ui/events/devices/x11",
] ]
specific_include_rules = { specific_include_rules = {
......
...@@ -142,14 +142,12 @@ bool ExtendedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) { ...@@ -142,14 +142,12 @@ bool ExtendedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) {
gfx::Point point_in_native = gfx::Point point_in_native =
ui::EventSystemLocationFromNative(event->native_event()); ui::EventSystemLocationFromNative(event->native_event());
#if defined(USE_OZONE)
// TODO(dnicoara): crbug.com/415680 Move cursor warping into Ozone once Ozone // TODO(dnicoara): crbug.com/415680 Move cursor warping into Ozone once Ozone
// has access to the logical display layout. // has access to the logical display layout.
// Native events in Ozone are in the native window coordinate system. We need // Native events in Ozone are in the native window coordinate system. We need
// to translate them to get the global position. // to translate them to get the global position.
point_in_native.Offset(target->GetHost()->GetBoundsInPixels().x(), point_in_native.Offset(target->GetHost()->GetBoundsInPixels().x(),
target->GetHost()->GetBoundsInPixels().y()); target->GetHost()->GetBoundsInPixels().y());
#endif
return WarpMouseCursorInNativeCoords(point_in_native, point_in_screen, false); return WarpMouseCursorInNativeCoords(point_in_native, point_in_screen, false);
} }
......
...@@ -35,7 +35,6 @@ AshWindowTreeHost* GetMirroringAshWindowTreeHostForDisplayId( ...@@ -35,7 +35,6 @@ AshWindowTreeHost* GetMirroringAshWindowTreeHostForDisplayId(
->GetAshWindowTreeHostForDisplayId(display_id); ->GetAshWindowTreeHostForDisplayId(display_id);
} }
#if defined(USE_OZONE)
// Find a WindowTreeHost used for mirroring displays that contains // Find a WindowTreeHost used for mirroring displays that contains
// the |point_in_screen|. Returns nullptr if such WTH does not exist. // the |point_in_screen|. Returns nullptr if such WTH does not exist.
aura::WindowTreeHost* FindMirroringWindowTreeHostFromScreenPoint( aura::WindowTreeHost* FindMirroringWindowTreeHostFromScreenPoint(
...@@ -49,7 +48,6 @@ aura::WindowTreeHost* FindMirroringWindowTreeHostFromScreenPoint( ...@@ -49,7 +48,6 @@ aura::WindowTreeHost* FindMirroringWindowTreeHostFromScreenPoint(
return GetMirroringAshWindowTreeHostForDisplayId(iter->id()) return GetMirroringAshWindowTreeHostForDisplayId(iter->id())
->AsWindowTreeHost(); ->AsWindowTreeHost();
} }
#endif
} // namespace } // namespace
...@@ -95,7 +93,6 @@ bool UnifiedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) { ...@@ -95,7 +93,6 @@ bool UnifiedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) {
gfx::Point point_in_native = gfx::Point point_in_native =
ui::EventSystemLocationFromNative(event->native_event()); ui::EventSystemLocationFromNative(event->native_event());
#if defined(USE_OZONE)
// TODO(dnicoara): crbug.com/415680 Move cursor warping into Ozone once Ozone // TODO(dnicoara): crbug.com/415680 Move cursor warping into Ozone once Ozone
// has access to the logical display layout. // has access to the logical display layout.
// Native events in Ozone are in the native window coordinate system. We need // Native events in Ozone are in the native window coordinate system. We need
...@@ -106,7 +103,6 @@ bool UnifiedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) { ...@@ -106,7 +103,6 @@ bool UnifiedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) {
return false; return false;
point_in_native.Offset(host->GetBoundsInPixels().x(), point_in_native.Offset(host->GetBoundsInPixels().x(),
host->GetBoundsInPixels().y()); host->GetBoundsInPixels().y());
#endif
return WarpMouseCursorInNativeCoords(point_in_native, point_in_unified_host, return WarpMouseCursorInNativeCoords(point_in_native, point_in_unified_host,
update_location_for_test_); update_location_for_test_);
......
...@@ -72,14 +72,9 @@ class UnifiedMouseWarpControllerTest : public AshTestBase { ...@@ -72,14 +72,9 @@ class UnifiedMouseWarpControllerTest : public AshTestBase {
&point_in_mirroring_host, &point_in_unified_host)) { &point_in_mirroring_host, &point_in_unified_host)) {
return false; return false;
} }
#if defined(USE_OZONE)
// The location of the ozone's native event is relative to the host. // The location of the ozone's native event is relative to the host.
GetEventGenerator().MoveMouseToWithNative(point_in_unified_host, GetEventGenerator().MoveMouseToWithNative(point_in_unified_host,
point_in_mirroring_host); point_in_mirroring_host);
#else
GetEventGenerator().MoveMouseToWithNative(point_in_unified_host,
point_in_native);
#endif
aura::Window* root = Shell::GetPrimaryRootWindow(); aura::Window* root = Shell::GetPrimaryRootWindow();
gfx::Point new_location_in_unified_host = gfx::Point new_location_in_unified_host =
aura::Env::GetInstance()->last_mouse_location(); aura::Env::GetInstance()->last_mouse_location();
......
...@@ -17,9 +17,4 @@ specific_include_rules = { ...@@ -17,9 +17,4 @@ specific_include_rules = {
# ozone. # ozone.
"+ui/events/ozone/chromeos/cursor_controller.h", "+ui/events/ozone/chromeos/cursor_controller.h",
], ],
# X11 support isn't used and will be removed soon, so it can depend on
# whatever.
"ash_window_tree_host_x11.cc": [
"+ui/events/devices",
],
} }
...@@ -49,11 +49,9 @@ class ASH_EXPORT AshWindowTreeHost { ...@@ -49,11 +49,9 @@ class ASH_EXPORT AshWindowTreeHost {
virtual void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) {} virtual void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) {}
#if defined(USE_OZONE)
virtual void SetCursorConfig(const display::Display& display, virtual void SetCursorConfig(const display::Display& display,
display::Display::Rotation rotation) = 0; display::Display::Rotation rotation) = 0;
virtual void ClearCursorConfig() = 0; virtual void ClearCursorConfig() = 0;
#endif
protected: protected:
// Translates the native mouse location into screen coordinates. // Translates the native mouse location into screen coordinates.
......
...@@ -11,20 +11,17 @@ ...@@ -11,20 +11,17 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/shell_delegate.h" #include "ash/shell_delegate.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_tree_host_platform.h" #include "ui/aura/window_tree_host_platform.h"
#include "ui/events/event_sink.h" #include "ui/events/event_sink.h"
#include "ui/events/null_event_targeter.h" #include "ui/events/null_event_targeter.h"
#include "ui/events/ozone/chromeos/cursor_controller.h"
#include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/insets.h"
#include "ui/gfx/transform.h" #include "ui/gfx/transform.h"
#include "ui/platform_window/platform_window.h" #include "ui/platform_window/platform_window.h"
#if defined(USE_OZONE)
#include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "ui/events/ozone/chromeos/cursor_controller.h"
#endif
namespace ash { namespace ash {
AshWindowTreeHostPlatform::AshWindowTreeHostPlatform( AshWindowTreeHostPlatform::AshWindowTreeHostPlatform(
...@@ -48,7 +45,6 @@ bool AshWindowTreeHostPlatform::ConfineCursorToRootWindow() { ...@@ -48,7 +45,6 @@ bool AshWindowTreeHostPlatform::ConfineCursorToRootWindow() {
return true; return true;
} }
#if defined(USE_OZONE)
void AshWindowTreeHostPlatform::SetCursorConfig( void AshWindowTreeHostPlatform::SetCursorConfig(
const display::Display& display, const display::Display& display,
display::Display::Rotation rotation) { display::Display::Rotation rotation) {
...@@ -66,7 +62,6 @@ void AshWindowTreeHostPlatform::ClearCursorConfig() { ...@@ -66,7 +62,6 @@ void AshWindowTreeHostPlatform::ClearCursorConfig() {
ui::CursorController::GetInstance()->ClearCursorConfigForWindow( ui::CursorController::GetInstance()->ClearCursorConfigForWindow(
GetAcceleratedWidget()); GetAcceleratedWidget());
} }
#endif
void AshWindowTreeHostPlatform::SetRootWindowTransformer( void AshWindowTreeHostPlatform::SetRootWindowTransformer(
std::unique_ptr<RootWindowTransformer> transformer) { std::unique_ptr<RootWindowTransformer> transformer) {
...@@ -130,7 +125,6 @@ void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) { ...@@ -130,7 +125,6 @@ void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) {
} }
void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) { void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) {
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* input_device_controller_client = ui::InputDeviceControllerClient* input_device_controller_client =
Shell::Get()->shell_delegate()->GetInputDeviceControllerClient(); Shell::Get()->shell_delegate()->GetInputDeviceControllerClient();
if (!input_device_controller_client) if (!input_device_controller_client)
...@@ -138,7 +132,6 @@ void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) { ...@@ -138,7 +132,6 @@ void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) {
// Temporarily pause tap-to-click when the cursor is hidden. // Temporarily pause tap-to-click when the cursor is hidden.
input_device_controller_client->SetTapToClickPaused(state); input_device_controller_client->SetTapToClickPaused(state);
#endif
} }
} // namespace ash } // namespace ash
...@@ -31,11 +31,9 @@ class ASH_EXPORT AshWindowTreeHostPlatform ...@@ -31,11 +31,9 @@ class ASH_EXPORT AshWindowTreeHostPlatform
gfx::Insets GetHostInsets() const override; gfx::Insets GetHostInsets() const override;
aura::WindowTreeHost* AsWindowTreeHost() override; aura::WindowTreeHost* AsWindowTreeHost() override;
void PrepareForShutdown() override; void PrepareForShutdown() override;
#if defined(USE_OZONE)
void SetCursorConfig(const display::Display& display, void SetCursorConfig(const display::Display& display,
display::Display::Rotation rotation) override; display::Display::Rotation rotation) override;
void ClearCursorConfig() override; void ClearCursorConfig() override;
#endif
// aura::WindowTreeHostPlatform: // aura::WindowTreeHostPlatform:
void SetRootTransform(const gfx::Transform& transform) override; void SetRootTransform(const gfx::Transform& transform) override;
......
...@@ -9,15 +9,12 @@ ...@@ -9,15 +9,12 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/shell_delegate.h" #include "ash/shell_delegate.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
#include "ui/aura/mus/window_tree_host_mus_init_params.h" #include "ui/aura/mus/window_tree_host_mus_init_params.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/events/event_sink.h" #include "ui/events/event_sink.h"
#include "ui/events/null_event_targeter.h" #include "ui/events/null_event_targeter.h"
#if defined(USE_OZONE)
#include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
#endif
namespace ash { namespace ash {
AshWindowTreeHostMus::AshWindowTreeHostMus( AshWindowTreeHostMus::AshWindowTreeHostMus(
...@@ -68,7 +65,6 @@ void AshWindowTreeHostMus::RegisterMirroringHost( ...@@ -68,7 +65,6 @@ void AshWindowTreeHostMus::RegisterMirroringHost(
NOTIMPLEMENTED(); NOTIMPLEMENTED();
} }
#if defined(USE_OZONE)
void AshWindowTreeHostMus::SetCursorConfig( void AshWindowTreeHostMus::SetCursorConfig(
const display::Display& display, const display::Display& display,
display::Display::Rotation rotation) { display::Display::Rotation rotation) {
...@@ -78,7 +74,6 @@ void AshWindowTreeHostMus::SetCursorConfig( ...@@ -78,7 +74,6 @@ void AshWindowTreeHostMus::SetCursorConfig(
void AshWindowTreeHostMus::ClearCursorConfig() { void AshWindowTreeHostMus::ClearCursorConfig() {
// Nothing to do here, mus takes care of this. // Nothing to do here, mus takes care of this.
} }
#endif
void AshWindowTreeHostMus::SetRootTransform(const gfx::Transform& transform) { void AshWindowTreeHostMus::SetRootTransform(const gfx::Transform& transform) {
transformer_helper_->SetTransform(transform); transformer_helper_->SetTransform(transform);
...@@ -98,7 +93,6 @@ void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( ...@@ -98,7 +93,6 @@ void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels(
} }
void AshWindowTreeHostMus::OnCursorVisibilityChangedNative(bool show) { void AshWindowTreeHostMus::OnCursorVisibilityChangedNative(bool show) {
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* input_device_controller_client = ui::InputDeviceControllerClient* input_device_controller_client =
Shell::Get()->shell_delegate()->GetInputDeviceControllerClient(); Shell::Get()->shell_delegate()->GetInputDeviceControllerClient();
if (!input_device_controller_client) if (!input_device_controller_client)
...@@ -106,7 +100,6 @@ void AshWindowTreeHostMus::OnCursorVisibilityChangedNative(bool show) { ...@@ -106,7 +100,6 @@ void AshWindowTreeHostMus::OnCursorVisibilityChangedNative(bool show) {
// Temporarily pause tap-to-click when the cursor is hidden. // Temporarily pause tap-to-click when the cursor is hidden.
input_device_controller_client->SetTapToClickPaused(!show); input_device_controller_client->SetTapToClickPaused(!show);
#endif
} }
} // namespace ash } // namespace ash
...@@ -27,11 +27,9 @@ class AshWindowTreeHostMus : public AshWindowTreeHost, ...@@ -27,11 +27,9 @@ class AshWindowTreeHostMus : public AshWindowTreeHost,
aura::WindowTreeHost* AsWindowTreeHost() override; aura::WindowTreeHost* AsWindowTreeHost() override;
void PrepareForShutdown() override; void PrepareForShutdown() override;
void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) override; void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) override;
#if defined(USE_OZONE)
void SetCursorConfig(const display::Display& display, void SetCursorConfig(const display::Display& display,
display::Display::Rotation rotation) override; display::Display::Rotation rotation) override;
void ClearCursorConfig() override; void ClearCursorConfig() override;
#endif
// aura::WindowTreeHostMus: // aura::WindowTreeHostMus:
void SetRootTransform(const gfx::Transform& transform) override; void SetRootTransform(const gfx::Transform& transform) override;
......
...@@ -50,13 +50,10 @@ ...@@ -50,13 +50,10 @@
#include "ui/aura/mus/window_tree_host_mus_init_params.h" #include "ui/aura/mus/window_tree_host_mus_init_params.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/display/manager/display_manager.h" #include "ui/display/manager/display_manager.h"
#include "ui/display/manager/forwarding_display_delegate.h"
#include "ui/display/types/native_display_delegate.h" #include "ui/display/types/native_display_delegate.h"
#include "ui/views/mus/pointer_watcher_event_router.h" #include "ui/views/mus/pointer_watcher_event_router.h"
#if defined(USE_OZONE)
#include "ui/display/manager/forwarding_display_delegate.h"
#endif
namespace ash { namespace ash {
namespace mus { namespace mus {
...@@ -354,7 +351,6 @@ void ShellPortMash::OnHostsInitialized() { ...@@ -354,7 +351,6 @@ void ShellPortMash::OnHostsInitialized() {
std::unique_ptr<display::NativeDisplayDelegate> std::unique_ptr<display::NativeDisplayDelegate>
ShellPortMash::CreateNativeDisplayDelegate() { ShellPortMash::CreateNativeDisplayDelegate() {
#if defined(USE_OZONE)
display::mojom::NativeDisplayDelegatePtr native_display_delegate; display::mojom::NativeDisplayDelegatePtr native_display_delegate;
if (window_manager_->connector()) { if (window_manager_->connector()) {
window_manager_->connector()->BindInterface(ui::mojom::kServiceName, window_manager_->connector()->BindInterface(ui::mojom::kServiceName,
...@@ -362,11 +358,6 @@ ShellPortMash::CreateNativeDisplayDelegate() { ...@@ -362,11 +358,6 @@ ShellPortMash::CreateNativeDisplayDelegate() {
} }
return base::MakeUnique<display::ForwardingDisplayDelegate>( return base::MakeUnique<display::ForwardingDisplayDelegate>(
std::move(native_display_delegate)); std::move(native_display_delegate));
#else
// The bots compile this config, but it is never run.
CHECK(false);
return nullptr;
#endif
} }
std::unique_ptr<AcceleratorController> std::unique_ptr<AcceleratorController>
......
...@@ -18,10 +18,7 @@ ...@@ -18,10 +18,7 @@
#include "components/user_manager/user_info_impl.h" #include "components/user_manager/user_info_impl.h"
#include "ui/gfx/image/image.h" #include "ui/gfx/image/image.h"
#include "ui/keyboard/keyboard_ui.h" #include "ui/keyboard/keyboard_ui.h"
#if defined(USE_OZONE)
#include "services/ui/public/cpp/input_devices/input_device_controller_client.h" #include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
#endif
namespace ash { namespace ash {
...@@ -157,7 +154,6 @@ void ShellDelegateMus::UpdateTouchscreenStatusFromPrefs() { ...@@ -157,7 +154,6 @@ void ShellDelegateMus::UpdateTouchscreenStatusFromPrefs() {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
} }
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* ui::InputDeviceControllerClient*
ShellDelegateMus::GetInputDeviceControllerClient() { ShellDelegateMus::GetInputDeviceControllerClient() {
if (!connector_) if (!connector_)
...@@ -169,6 +165,5 @@ ShellDelegateMus::GetInputDeviceControllerClient() { ...@@ -169,6 +165,5 @@ ShellDelegateMus::GetInputDeviceControllerClient() {
} }
return input_device_controller_client_.get(); return input_device_controller_client_.get();
} }
#endif
} // namespace ash } // namespace ash
...@@ -50,18 +50,14 @@ class ShellDelegateMus : public ShellDelegate { ...@@ -50,18 +50,14 @@ class ShellDelegateMus : public ShellDelegate {
void SetTouchscreenEnabledInPrefs(bool enabled, void SetTouchscreenEnabledInPrefs(bool enabled,
bool use_local_state) override; bool use_local_state) override;
void UpdateTouchscreenStatusFromPrefs() override; void UpdateTouchscreenStatusFromPrefs() override;
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* GetInputDeviceControllerClient() override; ui::InputDeviceControllerClient* GetInputDeviceControllerClient() override;
#endif
private: private:
// |connector_| may be null in tests. // |connector_| may be null in tests.
service_manager::Connector* connector_; service_manager::Connector* connector_;
#if defined(USE_OZONE)
std::unique_ptr<ui::InputDeviceControllerClient> std::unique_ptr<ui::InputDeviceControllerClient>
input_device_controller_client_; input_device_controller_client_;
#endif
DISALLOW_COPY_AND_ASSIGN(ShellDelegateMus); DISALLOW_COPY_AND_ASSIGN(ShellDelegateMus);
}; };
......
...@@ -159,12 +159,10 @@ void ShellDelegateImpl::SetTouchscreenEnabledInPrefs(bool enabled, ...@@ -159,12 +159,10 @@ void ShellDelegateImpl::SetTouchscreenEnabledInPrefs(bool enabled,
void ShellDelegateImpl::UpdateTouchscreenStatusFromPrefs() {} void ShellDelegateImpl::UpdateTouchscreenStatusFromPrefs() {}
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* ui::InputDeviceControllerClient*
ShellDelegateImpl::GetInputDeviceControllerClient() { ShellDelegateImpl::GetInputDeviceControllerClient() {
return nullptr; return nullptr;
} }
#endif
} // namespace shell } // namespace shell
} // namespace ash } // namespace ash
...@@ -52,9 +52,7 @@ class ShellDelegateImpl : public ShellDelegate { ...@@ -52,9 +52,7 @@ class ShellDelegateImpl : public ShellDelegate {
void SetTouchscreenEnabledInPrefs(bool enabled, void SetTouchscreenEnabledInPrefs(bool enabled,
bool use_local_state) override; bool use_local_state) override;
void UpdateTouchscreenStatusFromPrefs() override; void UpdateTouchscreenStatusFromPrefs() override;
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* GetInputDeviceControllerClient() override; ui::InputDeviceControllerClient* GetInputDeviceControllerClient() override;
#endif
private: private:
DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);
......
...@@ -32,9 +32,7 @@ class Connector; ...@@ -32,9 +32,7 @@ class Connector;
} }
namespace ui { namespace ui {
#if defined(USE_OZONE)
class InputDeviceControllerClient; class InputDeviceControllerClient;
#endif
class MenuModel; class MenuModel;
} }
...@@ -147,10 +145,8 @@ class ASH_EXPORT ShellDelegate { ...@@ -147,10 +145,8 @@ class ASH_EXPORT ShellDelegate {
// Suspends all WebContents-associated media sessions to stop managed players. // Suspends all WebContents-associated media sessions to stop managed players.
virtual void SuspendMediaSessions() {} virtual void SuspendMediaSessions() {}
#if defined(USE_OZONE)
// Creator of Shell owns this; it's assumed this outlives Shell. // Creator of Shell owns this; it's assumed this outlives Shell.
virtual ui::InputDeviceControllerClient* GetInputDeviceControllerClient() = 0; virtual ui::InputDeviceControllerClient* GetInputDeviceControllerClient() = 0;
#endif
}; };
} // namespace ash } // namespace ash
......
...@@ -160,11 +160,9 @@ void TestShellDelegate::SuspendMediaSessions() { ...@@ -160,11 +160,9 @@ void TestShellDelegate::SuspendMediaSessions() {
media_sessions_suspended_ = true; media_sessions_suspended_ = true;
} }
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* ui::InputDeviceControllerClient*
TestShellDelegate::GetInputDeviceControllerClient() { TestShellDelegate::GetInputDeviceControllerClient() {
return nullptr; return nullptr;
} }
#endif
} // namespace ash } // namespace ash
...@@ -64,9 +64,7 @@ class TestShellDelegate : public ShellDelegate { ...@@ -64,9 +64,7 @@ class TestShellDelegate : public ShellDelegate {
bool use_local_state) override; bool use_local_state) override;
void UpdateTouchscreenStatusFromPrefs() override; void UpdateTouchscreenStatusFromPrefs() override;
void SuspendMediaSessions() override; void SuspendMediaSessions() override;
#if defined(USE_OZONE)
ui::InputDeviceControllerClient* GetInputDeviceControllerClient() override; ui::InputDeviceControllerClient* GetInputDeviceControllerClient() override;
#endif
int num_exit_requests() const { return num_exit_requests_; } int num_exit_requests() const { return num_exit_requests_; }
......
...@@ -13,13 +13,10 @@ ...@@ -13,13 +13,10 @@
#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host.h"
#include "ui/base/cursor/image_cursors.h" #include "ui/base/cursor/image_cursors.h"
#include "ui/base/cursor/ozone/cursor_data_factory_ozone.h"
#include "ui/base/layout.h" #include "ui/base/layout.h"
#include "ui/wm/core/cursor_manager.h" #include "ui/wm/core/cursor_manager.h"
#if defined(USE_OZONE)
#include "ui/base/cursor/ozone/cursor_data_factory_ozone.h"
#endif
namespace ash { namespace ash {
namespace { namespace {
...@@ -27,17 +24,10 @@ namespace { ...@@ -27,17 +24,10 @@ namespace {
void SetCursorOnAllRootWindows(gfx::NativeCursor cursor) { void SetCursorOnAllRootWindows(gfx::NativeCursor cursor) {
ui::CursorData mojo_cursor; ui::CursorData mojo_cursor;
if (cursor.platform()) { if (cursor.platform())
#if defined(USE_OZONE)
mojo_cursor = ui::CursorDataFactoryOzone::GetCursorData(cursor.platform()); mojo_cursor = ui::CursorDataFactoryOzone::GetCursorData(cursor.platform());
#else else
NOTIMPLEMENTED()
<< "Can't pass native platform cursors on non-ozone platforms";
mojo_cursor = ui::CursorData(ui::CursorType::kPointer);
#endif
} else {
mojo_cursor = ui::CursorData(cursor.native_type()); mojo_cursor = ui::CursorData(cursor.native_type());
}
// As the window manager, tell mus to use |mojo_cursor| everywhere. We do // As the window manager, tell mus to use |mojo_cursor| everywhere. We do
// this instead of trying to set per-window because otherwise we run into the // this instead of trying to set per-window because otherwise we run into the
...@@ -82,16 +72,14 @@ void NotifyMouseEventsEnableStateChange(bool enabled) { ...@@ -82,16 +72,14 @@ void NotifyMouseEventsEnableStateChange(bool enabled) {
} // namespace } // namespace
NativeCursorManagerAshMus::NativeCursorManagerAshMus() { NativeCursorManagerAshMus::NativeCursorManagerAshMus() {
#if defined(USE_OZONE)
// If we're in a mus client, we aren't going to have all of ozone initialized // If we're in a mus client, we aren't going to have all of ozone initialized
// even though we're in an ozone build. All the hard coded USE_OZONE ifdefs // even though we're in an ozone build. All the hard coded USE_OZONE ifdefs
// that handle cursor code expect that there will be a CursorFactoryOzone // that handle cursor code in //content/ expect that there will be a
// instance. Partially initialize the ozone cursor internals here, like we // CursorFactoryOzone instance. Partially initialize the ozone cursor
// partially initialize other ozone subsystems in // internals here, like we partially initialize other ozone subsystems in
// ChromeBrowserMainExtraPartsViews. // ChromeBrowserMainExtraPartsViews.
cursor_factory_ozone_ = base::MakeUnique<ui::CursorDataFactoryOzone>(); cursor_factory_ozone_ = base::MakeUnique<ui::CursorDataFactoryOzone>();
image_cursors_ = base::MakeUnique<ui::ImageCursors>(); image_cursors_ = base::MakeUnique<ui::ImageCursors>();
#endif
} }
NativeCursorManagerAshMus::~NativeCursorManagerAshMus() = default; NativeCursorManagerAshMus::~NativeCursorManagerAshMus() = default;
......
...@@ -52,11 +52,8 @@ class ASH_EXPORT NativeCursorManagerAshMus : public NativeCursorManagerAsh { ...@@ -52,11 +52,8 @@ class ASH_EXPORT NativeCursorManagerAshMus : public NativeCursorManagerAsh {
bool native_cursor_enabled_ = true; bool native_cursor_enabled_ = true;
#if defined(USE_OZONE)
std::unique_ptr<ui::CursorDataFactoryOzone> cursor_factory_ozone_; std::unique_ptr<ui::CursorDataFactoryOzone> cursor_factory_ozone_;
#endif
// Always nullptr when USE_OZONE is false.
std::unique_ptr<::ui::ImageCursors> image_cursors_; std::unique_ptr<::ui::ImageCursors> image_cursors_;
DISALLOW_COPY_AND_ASSIGN(NativeCursorManagerAshMus); DISALLOW_COPY_AND_ASSIGN(NativeCursorManagerAshMus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment