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

Side by Side 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: Remove DCHECKs from DriWindowManager Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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"
11 11
12 namespace aura { 12 namespace aura {
13 13
14 WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds) 14 WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
15 : widget_(gfx::kNullAcceleratedWidget) { 15 : widget_(gfx::kNullAcceleratedWidget) {
16 platform_window_ = 16 platform_window_ =
17 ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds); 17 ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds);
18 } 18 }
19 19
20 WindowTreeHostOzone::~WindowTreeHostOzone() { 20 WindowTreeHostOzone::~WindowTreeHostOzone() {
21 DestroyCompositor(); 21 DestroyCompositor();
22 DestroyDispatcher(); 22 DestroyDispatcher();
23 } 23 }
24 24
25 gfx::Rect WindowTreeHostOzone::GetBounds() const {
26 return platform_window_->GetBounds();
27 }
28
25 void WindowTreeHostOzone::OnBoundsChanged(const gfx::Rect& new_bounds) { 29 void WindowTreeHostOzone::OnBoundsChanged(const gfx::Rect& new_bounds) {
26 // TOOD(spang): Should we determine which parts changed? 30 // TOOD(spang): Should we determine which parts changed?
27 OnHostResized(new_bounds.size()); 31 OnHostResized(new_bounds.size());
28 OnHostMoved(new_bounds.origin()); 32 OnHostMoved(new_bounds.origin());
29 } 33 }
30 34
31 void WindowTreeHostOzone::OnDamageRect(const gfx::Rect& damaged_region) { 35 void WindowTreeHostOzone::OnDamageRect(const gfx::Rect& damaged_region) {
32 } 36 }
33 37
34 void WindowTreeHostOzone::DispatchEvent(ui::Event* event) { 38 void WindowTreeHostOzone::DispatchEvent(ui::Event* event) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 71 }
68 72
69 void WindowTreeHostOzone::Show() { 73 void WindowTreeHostOzone::Show() {
70 platform_window_->Show(); 74 platform_window_->Show();
71 } 75 }
72 76
73 void WindowTreeHostOzone::Hide() { 77 void WindowTreeHostOzone::Hide() {
74 platform_window_->Hide(); 78 platform_window_->Hide();
75 } 79 }
76 80
77 gfx::Rect WindowTreeHostOzone::GetBounds() const {
78 return platform_window_->GetBounds();
79 }
80
81 void WindowTreeHostOzone::SetBounds(const gfx::Rect& bounds) { 81 void WindowTreeHostOzone::SetBounds(const gfx::Rect& bounds) {
82 platform_window_->SetBounds(bounds); 82 platform_window_->SetBounds(bounds);
83 } 83 }
84 84
85 gfx::Point WindowTreeHostOzone::GetLocationOnNativeScreen() const { 85 gfx::Point WindowTreeHostOzone::GetLocationOnNativeScreen() const {
86 return platform_window_->GetBounds().origin(); 86 return platform_window_->GetBounds().origin();
87 } 87 }
88 88
89 void WindowTreeHostOzone::SetCapture() { 89 void WindowTreeHostOzone::SetCapture() {
90 platform_window_->SetCapture(); 90 platform_window_->SetCapture();
(...skipping 24 matching lines...) Expand all
115 return new WindowTreeHostOzone(bounds); 115 return new WindowTreeHostOzone(bounds);
116 } 116 }
117 117
118 // static 118 // static
119 gfx::Size WindowTreeHost::GetNativeScreenSize() { 119 gfx::Size WindowTreeHost::GetNativeScreenSize() {
120 NOTIMPLEMENTED(); 120 NOTIMPLEMENTED();
121 return gfx::Size(); 121 return gfx::Size();
122 } 122 }
123 123
124 } // namespace aura 124 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698