OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 "mojo/aura/screen_mojo.h" | 5 #include "mojo/aura/screen_mojo.h" |
6 | 6 |
7 #include "ui/gfx/native_widget_types.h" | 7 #include "ui/gfx/native_widget_types.h" |
8 #include "ui/gfx/rect_conversions.h" | 8 #include "ui/gfx/rect_conversions.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 std::vector<gfx::Display> ScreenMojo::GetAllDisplays() const { | 43 std::vector<gfx::Display> ScreenMojo::GetAllDisplays() const { |
44 return std::vector<gfx::Display>(1, display_); | 44 return std::vector<gfx::Display>(1, display_); |
45 } | 45 } |
46 | 46 |
47 gfx::Display ScreenMojo::GetDisplayNearestWindow( | 47 gfx::Display ScreenMojo::GetDisplayNearestWindow( |
48 gfx::NativeWindow window) const { | 48 gfx::NativeWindow window) const { |
49 return display_; | 49 return display_; |
50 } | 50 } |
51 | 51 |
| 52 bool ScreenMojo::GetDisplayColorProfile( |
| 53 gfx::NativeWindow window, std::vector<char>* color_profile) const { |
| 54 // TODO(port): consider screen color profile support. |
| 55 return false; |
| 56 } |
| 57 |
52 gfx::Display ScreenMojo::GetDisplayNearestPoint(const gfx::Point& point) const { | 58 gfx::Display ScreenMojo::GetDisplayNearestPoint(const gfx::Point& point) const { |
53 return display_; | 59 return display_; |
54 } | 60 } |
55 | 61 |
56 gfx::Display ScreenMojo::GetDisplayMatching(const gfx::Rect& match_rect) const { | 62 gfx::Display ScreenMojo::GetDisplayMatching(const gfx::Rect& match_rect) const { |
57 return display_; | 63 return display_; |
58 } | 64 } |
59 | 65 |
60 gfx::Display ScreenMojo::GetPrimaryDisplay() const { | 66 gfx::Display ScreenMojo::GetPrimaryDisplay() const { |
61 return display_; | 67 return display_; |
62 } | 68 } |
63 | 69 |
64 void ScreenMojo::AddObserver(gfx::DisplayObserver* observer) { | 70 void ScreenMojo::AddObserver(gfx::DisplayObserver* observer) { |
65 } | 71 } |
66 | 72 |
67 void ScreenMojo::RemoveObserver(gfx::DisplayObserver* observer) { | 73 void ScreenMojo::RemoveObserver(gfx::DisplayObserver* observer) { |
68 } | 74 } |
69 | 75 |
70 ScreenMojo::ScreenMojo(const gfx::Rect& screen_bounds) { | 76 ScreenMojo::ScreenMojo(const gfx::Rect& screen_bounds) { |
71 static int64 synthesized_display_id = 2000; | 77 static int64 synthesized_display_id = 2000; |
72 display_.set_id(synthesized_display_id++); | 78 display_.set_id(synthesized_display_id++); |
73 display_.SetScaleAndBounds(1.0f, screen_bounds); | 79 display_.SetScaleAndBounds(1.0f, screen_bounds); |
74 } | 80 } |
75 | 81 |
76 } // namespace mojo | 82 } // namespace mojo |
OLD | NEW |