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/single_monitor_manager.h" | 5 #include "ui/aura/single_monitor_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "ui/aura/aura_switches.h" | 10 #include "ui/aura/aura_switches.h" |
11 #include "ui/aura/monitor.h" | 11 #include "ui/aura/monitor.h" |
12 #include "ui/aura/root_window.h" | 12 #include "ui/aura/root_window.h" |
13 #include "ui/aura/root_window_host.h" | 13 #include "ui/aura/root_window_host.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 | 15 |
16 namespace aura { | 16 namespace aura { |
17 namespace test { | |
18 | 17 |
19 using std::string; | 18 using std::string; |
20 | 19 |
21 namespace { | 20 namespace { |
22 // Default bounds for the primary monitor. | 21 // Default bounds for the primary monitor. |
23 static const int kDefaultHostWindowX = 200; | 22 static const int kDefaultHostWindowX = 200; |
24 static const int kDefaultHostWindowY = 200; | 23 static const int kDefaultHostWindowY = 200; |
25 static const int kDefaultHostWindowWidth = 1280; | 24 static const int kDefaultHostWindowWidth = 1280; |
26 static const int kDefaultHostWindowHeight = 1024; | 25 static const int kDefaultHostWindowHeight = 1024; |
27 } | 26 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void SingleMonitorManager::Init() { | 91 void SingleMonitorManager::Init() { |
93 const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 92 const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
94 switches::kAuraHostWindowSize); | 93 switches::kAuraHostWindowSize); |
95 monitor_.reset(CreateMonitorFromSpec(size_str)); | 94 monitor_.reset(CreateMonitorFromSpec(size_str)); |
96 } | 95 } |
97 | 96 |
98 void SingleMonitorManager::Update(const gfx::Size size) { | 97 void SingleMonitorManager::Update(const gfx::Size size) { |
99 monitor_->set_size(size); | 98 monitor_->set_size(size); |
100 } | 99 } |
101 | 100 |
102 } // namespace test | |
103 } // namespace aura | 101 } // namespace aura |
OLD | NEW |