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

Unified Diff: ui/aura/window_tree_host_ozone.cc

Issue 657603002: ash: ozone: apply transformation to events outside the root window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: coding style Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/window_tree_host_ozone.cc
diff --git a/ui/aura/window_tree_host_ozone.cc b/ui/aura/window_tree_host_ozone.cc
index 6c332d75f590f33f6275dee1137ecffa640426ec..655161d4e95ff9f2b9626f53df0f541b158b52fb 100644
--- a/ui/aura/window_tree_host_ozone.cc
+++ b/ui/aura/window_tree_host_ozone.cc
@@ -12,7 +12,7 @@
namespace aura {
WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
- : widget_(gfx::kNullAcceleratedWidget) {
+ : widget_(gfx::kNullAcceleratedWidget), bounds_(bounds) {
platform_window_ =
ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds);
}
@@ -32,6 +32,8 @@ void WindowTreeHostOzone::OnDamageRect(const gfx::Rect& damaged_region) {
}
void WindowTreeHostOzone::DispatchEvent(ui::Event* event) {
+ if (event->IsMouseEvent())
spang 2014/11/04 23:27:22 Can you move this entirely into AshWindowTreeHostO
+ TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event));
SendEventToProcessor(event);
}
@@ -79,6 +81,7 @@ gfx::Rect WindowTreeHostOzone::GetBounds() const {
}
void WindowTreeHostOzone::SetBounds(const gfx::Rect& bounds) {
+ bounds_ = bounds;
platform_window_->SetBounds(bounds);
}
@@ -115,6 +118,9 @@ ui::EventProcessor* WindowTreeHostOzone::GetEventProcessor() {
return dispatcher();
}
+void WindowTreeHostOzone::TranslateLocatedEvent(ui::LocatedEvent* event) {
+}
+
// static
WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
return new WindowTreeHostOzone(bounds);

Powered by Google App Engine
This is Rietveld 408576698