| OLD | NEW |
| 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 "ui/aura/window_tree_host_ozone.h" | 5 #include "ui/aura/window_tree_host_ozone.h" |
| 6 | 6 |
| 7 #include "ui/aura/window_event_dispatcher.h" | 7 #include "ui/aura/window_event_dispatcher.h" |
| 8 #include "ui/ozone/public/cursor_factory_ozone.h" | 8 #include "ui/ozone/public/cursor_factory_ozone.h" |
| 9 #include "ui/ozone/public/ozone_platform.h" | 9 #include "ui/ozone/public/ozone_platform.h" |
| 10 #include "ui/platform_window/platform_window.h" | 10 #include "ui/platform_window/platform_window.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 void WindowTreeHostOzone::SetCapture() { | 89 void WindowTreeHostOzone::SetCapture() { |
| 90 platform_window_->SetCapture(); | 90 platform_window_->SetCapture(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void WindowTreeHostOzone::ReleaseCapture() { | 93 void WindowTreeHostOzone::ReleaseCapture() { |
| 94 platform_window_->ReleaseCapture(); | 94 platform_window_->ReleaseCapture(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void WindowTreeHostOzone::PostNativeEvent( | |
| 98 const base::NativeEvent& native_event) { | |
| 99 SendEventToProcessor(static_cast<ui::Event*>(native_event)); | |
| 100 } | |
| 101 | |
| 102 void WindowTreeHostOzone::SetCursorNative(gfx::NativeCursor cursor) { | 97 void WindowTreeHostOzone::SetCursorNative(gfx::NativeCursor cursor) { |
| 103 platform_window_->SetCursor(cursor.platform()); | 98 platform_window_->SetCursor(cursor.platform()); |
| 104 } | 99 } |
| 105 | 100 |
| 106 void WindowTreeHostOzone::MoveCursorToNative(const gfx::Point& location) { | 101 void WindowTreeHostOzone::MoveCursorToNative(const gfx::Point& location) { |
| 107 platform_window_->MoveCursorTo(location); | 102 platform_window_->MoveCursorTo(location); |
| 108 } | 103 } |
| 109 | 104 |
| 110 void WindowTreeHostOzone::OnCursorVisibilityChangedNative(bool show) { | 105 void WindowTreeHostOzone::OnCursorVisibilityChangedNative(bool show) { |
| 111 NOTIMPLEMENTED(); | 106 NOTIMPLEMENTED(); |
| 112 } | 107 } |
| 113 | 108 |
| 114 ui::EventProcessor* WindowTreeHostOzone::GetEventProcessor() { | 109 ui::EventProcessor* WindowTreeHostOzone::GetEventProcessor() { |
| 115 return dispatcher(); | 110 return dispatcher(); |
| 116 } | 111 } |
| 117 | 112 |
| 118 // static | 113 // static |
| 119 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { | 114 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { |
| 120 return new WindowTreeHostOzone(bounds); | 115 return new WindowTreeHostOzone(bounds); |
| 121 } | 116 } |
| 122 | 117 |
| 123 // static | 118 // static |
| 124 gfx::Size WindowTreeHost::GetNativeScreenSize() { | 119 gfx::Size WindowTreeHost::GetNativeScreenSize() { |
| 125 NOTIMPLEMENTED(); | 120 NOTIMPLEMENTED(); |
| 126 return gfx::Size(); | 121 return gfx::Size(); |
| 127 } | 122 } |
| 128 | 123 |
| 129 } // namespace aura | 124 } // namespace aura |
| OLD | NEW |