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/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gfx/android/device_display_info.h" | 8 #include "ui/gfx/android/device_display_info.h" |
9 #include "ui/gfx/display.h" | 9 #include "ui/gfx/display.h" |
10 #include "ui/gfx/size_conversions.h" | 10 #include "ui/gfx/size_conversions.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 display.set_device_scale_factor(device_scale_factor); | 45 display.set_device_scale_factor(device_scale_factor); |
46 display.SetRotationAsDegree(device_info.GetRotationDegrees()); | 46 display.SetRotationAsDegree(device_info.GetRotationDegrees()); |
47 return display; | 47 return display; |
48 } | 48 } |
49 | 49 |
50 virtual gfx::Display GetDisplayNearestWindow( | 50 virtual gfx::Display GetDisplayNearestWindow( |
51 gfx::NativeView view) const OVERRIDE { | 51 gfx::NativeView view) const OVERRIDE { |
52 return GetPrimaryDisplay(); | 52 return GetPrimaryDisplay(); |
53 } | 53 } |
54 | 54 |
| 55 virtual bool GetDisplayColorProfile( |
| 56 gfx::NativeView view, std::vector<char>*color_profile) const OVERRIDE { |
| 57 // TODO(port): consider screen color profile support. |
| 58 return false; |
| 59 } |
| 60 |
55 virtual gfx::Display GetDisplayNearestPoint( | 61 virtual gfx::Display GetDisplayNearestPoint( |
56 const gfx::Point& point) const OVERRIDE { | 62 const gfx::Point& point) const OVERRIDE { |
57 return GetPrimaryDisplay(); | 63 return GetPrimaryDisplay(); |
58 } | 64 } |
59 | 65 |
60 virtual int GetNumDisplays() const OVERRIDE { return 1; } | 66 virtual int GetNumDisplays() const OVERRIDE { return 1; } |
61 | 67 |
62 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE { | 68 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE { |
63 return std::vector<gfx::Display>(1, GetPrimaryDisplay()); | 69 return std::vector<gfx::Display>(1, GetPrimaryDisplay()); |
64 } | 70 } |
(...skipping 13 matching lines...) Expand all Loading... |
78 | 84 |
79 private: | 85 private: |
80 DISALLOW_COPY_AND_ASSIGN(ScreenAndroid); | 86 DISALLOW_COPY_AND_ASSIGN(ScreenAndroid); |
81 }; | 87 }; |
82 | 88 |
83 Screen* CreateNativeScreen() { | 89 Screen* CreateNativeScreen() { |
84 return new ScreenAndroid; | 90 return new ScreenAndroid; |
85 } | 91 } |
86 | 92 |
87 } // namespace gfx | 93 } // namespace gfx |
OLD | NEW |