| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "ui/aura/aura_switches.h" | 9 #include "ui/aura/aura_switches.h" |
| 10 #include "ui/aura/display_util.h" | 10 #include "ui/aura/display_util.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 21 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 22 switches::kAuraHostWindowSize); | 22 switches::kAuraHostWindowSize); |
| 23 display_ = aura::CreateDisplayFromSpec(size_str); | 23 display_ = aura::CreateDisplayFromSpec(size_str); |
| 24 } | 24 } |
| 25 | 25 |
| 26 TestScreen::~TestScreen() { | 26 TestScreen::~TestScreen() { |
| 27 } | 27 } |
| 28 | 28 |
| 29 RootWindow* TestScreen::CreateRootWindowForPrimaryDisplay() { | 29 RootWindow* TestScreen::CreateRootWindowForPrimaryDisplay() { |
| 30 DCHECK(!root_window_); | 30 DCHECK(!root_window_); |
| 31 root_window_ = new RootWindow(RootWindow::CreateParams(display_.bounds())); | 31 root_window_ = new RootWindow( |
| 32 RootWindow::CreateParams(display_.bounds(), true)); |
| 32 root_window_->AddObserver(this); | 33 root_window_->AddObserver(this); |
| 33 root_window_->Init(); | 34 root_window_->Init(); |
| 34 if (UseFullscreenHostWindow()) | 35 if (UseFullscreenHostWindow()) |
| 35 root_window_->ConfineCursorToWindow(); | 36 root_window_->ConfineCursorToWindow(); |
| 36 return root_window_; | 37 return root_window_; |
| 37 } | 38 } |
| 38 | 39 |
| 39 bool TestScreen::IsDIPEnabled() { | 40 bool TestScreen::IsDIPEnabled() { |
| 40 return true; | 41 return true; |
| 41 } | 42 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return display_; | 84 return display_; |
| 84 } | 85 } |
| 85 | 86 |
| 86 void TestScreen::AddObserver(gfx::DisplayObserver* observer) { | 87 void TestScreen::AddObserver(gfx::DisplayObserver* observer) { |
| 87 } | 88 } |
| 88 | 89 |
| 89 void TestScreen::RemoveObserver(gfx::DisplayObserver* observer) { | 90 void TestScreen::RemoveObserver(gfx::DisplayObserver* observer) { |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace aura | 93 } // namespace aura |
| OLD | NEW |