OLD | NEW |
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 "blimp/engine/ui/blimp_screen.h" | 5 #include "blimp/engine/ui/blimp_screen.h" |
6 | 6 |
7 namespace blimp { | 7 namespace blimp { |
8 namespace engine { | 8 namespace engine { |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 const int64 kDisplayId = 1; | 12 const int64 kDisplayId = 1; |
13 const int kDefaultDisplayWidth = 1; | |
14 const int kDefaultDisplayHeight = 1; | |
15 const float kDefaultScale = 1.0f; | 13 const float kDefaultScale = 1.0f; |
16 const int kNumDisplays = 1; | 14 const int kNumDisplays = 1; |
17 | 15 |
18 } // namespace | 16 } // namespace |
19 | 17 |
| 18 const int BlimpScreen::kDefaultDisplayWidth = 800; |
| 19 const int BlimpScreen::kDefaultDisplayHeight = 600; |
| 20 |
20 BlimpScreen::BlimpScreen() : display_(kDisplayId) { | 21 BlimpScreen::BlimpScreen() : display_(kDisplayId) { |
21 display_.SetScaleAndBounds( | 22 display_.SetScaleAndBounds( |
22 kDefaultScale, gfx::Rect(kDefaultDisplayWidth, kDefaultDisplayHeight)); | 23 kDefaultScale, gfx::Rect(kDefaultDisplayWidth, kDefaultDisplayHeight)); |
23 } | 24 } |
24 | 25 |
25 BlimpScreen::~BlimpScreen() {} | 26 BlimpScreen::~BlimpScreen() {} |
26 | 27 |
27 void BlimpScreen::UpdateDisplaySize(const gfx::Size& size) { | 28 void BlimpScreen::UpdateDisplaySize(const gfx::Size& size) { |
28 display_.SetScaleAndBounds(kDefaultScale, gfx::Rect(size)); | 29 display_.SetScaleAndBounds(kDefaultScale, gfx::Rect(size)); |
29 } | 30 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 gfx::Display BlimpScreen::GetPrimaryDisplay() const { | 69 gfx::Display BlimpScreen::GetPrimaryDisplay() const { |
69 return display_; | 70 return display_; |
70 } | 71 } |
71 | 72 |
72 void BlimpScreen::AddObserver(gfx::DisplayObserver* observer) {} | 73 void BlimpScreen::AddObserver(gfx::DisplayObserver* observer) {} |
73 | 74 |
74 void BlimpScreen::RemoveObserver(gfx::DisplayObserver* observer) {} | 75 void BlimpScreen::RemoveObserver(gfx::DisplayObserver* observer) {} |
75 | 76 |
76 } // namespace engine | 77 } // namespace engine |
77 } // namespace blimp | 78 } // namespace blimp |
OLD | NEW |