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/app/ui/blimp_screen.h" | 5 #include "blimp/engine/app/ui/blimp_screen.h" |
6 | 6 |
7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
8 #include "ui/aura/window_tree_host.h" | 8 #include "ui/aura/window_tree_host.h" |
9 #include "ui/display/display_observer.h" | 9 #include "ui/display/display_observer.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 int BlimpScreen::GetNumDisplays() const { | 61 int BlimpScreen::GetNumDisplays() const { |
62 return kNumDisplays; | 62 return kNumDisplays; |
63 } | 63 } |
64 | 64 |
65 std::vector<display::Display> BlimpScreen::GetAllDisplays() const { | 65 std::vector<display::Display> BlimpScreen::GetAllDisplays() const { |
66 return std::vector<display::Display>(1, display_); | 66 return std::vector<display::Display>(1, display_); |
67 } | 67 } |
68 | 68 |
69 display::Display BlimpScreen::GetDisplayNearestWindow( | 69 display::Display BlimpScreen::GetDisplayNearestWindow( |
70 gfx::NativeWindow window) const { | 70 const gfx::NativeWindow window) const { |
71 return display_; | 71 return display_; |
72 } | 72 } |
73 | 73 |
74 display::Display BlimpScreen::GetDisplayNearestPoint( | 74 display::Display BlimpScreen::GetDisplayNearestPoint( |
75 const gfx::Point& point) const { | 75 const gfx::Point& point) const { |
76 return display_; | 76 return display_; |
77 } | 77 } |
78 | 78 |
79 display::Display BlimpScreen::GetDisplayMatching( | 79 display::Display BlimpScreen::GetDisplayMatching( |
80 const gfx::Rect& match_rect) const { | 80 const gfx::Rect& match_rect) const { |
81 return display_; | 81 return display_; |
82 } | 82 } |
83 | 83 |
84 display::Display BlimpScreen::GetPrimaryDisplay() const { | 84 display::Display BlimpScreen::GetPrimaryDisplay() const { |
85 return display_; | 85 return display_; |
86 } | 86 } |
87 | 87 |
88 void BlimpScreen::AddObserver(display::DisplayObserver* observer) { | 88 void BlimpScreen::AddObserver(display::DisplayObserver* observer) { |
89 observers_.AddObserver(observer); | 89 observers_.AddObserver(observer); |
90 } | 90 } |
91 | 91 |
92 void BlimpScreen::RemoveObserver(display::DisplayObserver* observer) { | 92 void BlimpScreen::RemoveObserver(display::DisplayObserver* observer) { |
93 observers_.RemoveObserver(observer); | 93 observers_.RemoveObserver(observer); |
94 } | 94 } |
95 | 95 |
96 } // namespace engine | 96 } // namespace engine |
97 } // namespace blimp | 97 } // namespace blimp |
OLD | NEW |