| OLD | NEW |
| 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/root_window.h" | 9 #include "ui/aura/root_window.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| 11 #include "ui/aura/window_tree_host.h" | 11 #include "ui/aura/window_tree_host.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 13 #include "ui/gfx/rect_conversions.h" | 13 #include "ui/gfx/rect_conversions.h" |
| 14 #include "ui/gfx/screen.h" | 14 #include "ui/gfx/screen.h" |
| 15 | 15 |
| 16 namespace aura { | 16 namespace aura { |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 TestScreen* TestScreen::Create() { | 19 TestScreen* TestScreen::Create() { |
| 20 // Use (0,0) because the desktop aura tests are executed in | 20 // Use (0,0) because the desktop aura tests are executed in |
| 21 // native environment where the display's origin is (0,0). | 21 // native environment where the display's origin is (0,0). |
| 22 return new TestScreen(gfx::Rect(0, 0, 800, 600)); | 22 return new TestScreen(gfx::Rect(0, 0, 2560, 1700)); |
| 23 } | 23 } |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 TestScreen* TestScreen::CreateFullscreen() { | 26 TestScreen* TestScreen::CreateFullscreen() { |
| 27 return new TestScreen(gfx::Rect(RootWindowHost::GetNativeScreenSize())); | 27 return new TestScreen(gfx::Rect(RootWindowHost::GetNativeScreenSize())); |
| 28 } | 28 } |
| 29 | 29 |
| 30 TestScreen::~TestScreen() { | 30 TestScreen::~TestScreen() { |
| 31 } | 31 } |
| 32 | 32 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 TestScreen::TestScreen(const gfx::Rect& screen_bounds) | 152 TestScreen::TestScreen(const gfx::Rect& screen_bounds) |
| 153 : root_window_(NULL), | 153 : root_window_(NULL), |
| 154 ui_scale_(1.0f) { | 154 ui_scale_(1.0f) { |
| 155 static int64 synthesized_display_id = 2000; | 155 static int64 synthesized_display_id = 2000; |
| 156 display_.set_id(synthesized_display_id++); | 156 display_.set_id(synthesized_display_id++); |
| 157 display_.SetScaleAndBounds(1.0f, screen_bounds); | 157 display_.SetScaleAndBounds(1.0f, screen_bounds); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace aura | 160 } // namespace aura |
| OLD | NEW |