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

Side by Side Diff: ui/aura/window_tree_host_platform.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: GetNativeScreen Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_platform.h" 5 #include "ui/aura/window_tree_host_platform.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void WindowTreeHostPlatform::MoveCursorToNative(const gfx::Point& location) { 118 void WindowTreeHostPlatform::MoveCursorToNative(const gfx::Point& location) {
119 window_->MoveCursorTo(location); 119 window_->MoveCursorTo(location);
120 } 120 }
121 121
122 void WindowTreeHostPlatform::OnCursorVisibilityChangedNative(bool show) { 122 void WindowTreeHostPlatform::OnCursorVisibilityChangedNative(bool show) {
123 NOTIMPLEMENTED(); 123 NOTIMPLEMENTED();
124 } 124 }
125 125
126 void WindowTreeHostPlatform::OnBoundsChanged(const gfx::Rect& new_bounds) { 126 void WindowTreeHostPlatform::OnBoundsChanged(const gfx::Rect& new_bounds) {
127 float current_scale = compositor()->device_scale_factor(); 127 float current_scale = compositor()->device_scale_factor();
128 float new_scale = gfx::Screen::GetScreenFor(window()) 128 float new_scale = gfx::Screen::GetScreen()
129 ->GetDisplayNearestWindow(window()) 129 ->GetDisplayNearestWindow(window())
130 .device_scale_factor(); 130 .device_scale_factor();
131 gfx::Rect old_bounds = bounds_; 131 gfx::Rect old_bounds = bounds_;
132 bounds_ = new_bounds; 132 bounds_ = new_bounds;
133 if (bounds_.origin() != old_bounds.origin()) { 133 if (bounds_.origin() != old_bounds.origin()) {
134 OnHostMoved(bounds_.origin()); 134 OnHostMoved(bounds_.origin());
135 } 135 }
136 if (bounds_.size() != old_bounds.size() || current_scale != new_scale) { 136 if (bounds_.size() != old_bounds.size() || current_scale != new_scale) {
137 OnHostResized(bounds_.size()); 137 OnHostResized(bounds_.size());
138 } 138 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 DCHECK_EQ(widget, widget_); 179 DCHECK_EQ(widget, widget_);
180 widget_ = gfx::kNullAcceleratedWidget; 180 widget_ = gfx::kNullAcceleratedWidget;
181 } 181 }
182 182
183 void WindowTreeHostPlatform::OnActivationChanged(bool active) { 183 void WindowTreeHostPlatform::OnActivationChanged(bool active) {
184 if (active) 184 if (active)
185 OnHostActivated(); 185 OnHostActivated();
186 } 186 }
187 187
188 } // namespace aura 188 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698