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

Side by Side Diff: ui/aura/test/test_screen.cc

Issue 672823002: Remove IsDIPEnabled from Screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-1
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « ui/aura/test/test_screen.h ('k') | ui/base/layout.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/test_screen.h" 5 #include "ui/aura/test/test_screen.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/env.h" 8 #include "ui/aura/env.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 return rotate; 103 return rotate;
104 } 104 }
105 105
106 gfx::Transform TestScreen::GetUIScaleTransform() const { 106 gfx::Transform TestScreen::GetUIScaleTransform() const {
107 gfx::Transform ui_scale; 107 gfx::Transform ui_scale;
108 ui_scale.Scale(1.0f / ui_scale_, 1.0f / ui_scale_); 108 ui_scale.Scale(1.0f / ui_scale_, 1.0f / ui_scale_);
109 return ui_scale; 109 return ui_scale;
110 } 110 }
111 111
112 bool TestScreen::IsDIPEnabled() {
113 return true;
114 }
115
116 void TestScreen::OnWindowBoundsChanged( 112 void TestScreen::OnWindowBoundsChanged(
117 Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) { 113 Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) {
118 DCHECK_EQ(host_->window(), window); 114 DCHECK_EQ(host_->window(), window);
119 display_.SetSize(gfx::ToFlooredSize( 115 display_.SetSize(gfx::ToFlooredSize(
120 gfx::ScaleSize(new_bounds.size(), display_.device_scale_factor()))); 116 gfx::ScaleSize(new_bounds.size(), display_.device_scale_factor())));
121 } 117 }
122 118
123 void TestScreen::OnWindowDestroying(Window* window) { 119 void TestScreen::OnWindowDestroying(Window* window) {
124 if (host_->window() == window) 120 if (host_->window() == window)
125 host_ = NULL; 121 host_ = NULL;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 166
171 TestScreen::TestScreen(const gfx::Rect& screen_bounds) 167 TestScreen::TestScreen(const gfx::Rect& screen_bounds)
172 : host_(NULL), 168 : host_(NULL),
173 ui_scale_(1.0f) { 169 ui_scale_(1.0f) {
174 static int64 synthesized_display_id = 2000; 170 static int64 synthesized_display_id = 2000;
175 display_.set_id(synthesized_display_id++); 171 display_.set_id(synthesized_display_id++);
176 display_.SetScaleAndBounds(1.0f, screen_bounds); 172 display_.SetScaleAndBounds(1.0f, screen_bounds);
177 } 173 }
178 174
179 } // namespace aura 175 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_screen.h ('k') | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698