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 "ui/views/mus/display_converter.h" | 5 #include "ui/views/mus/display_converter.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "components/mus/public/cpp/window.h" | 9 #include "components/mus/public/cpp/window.h" |
8 #include "mojo/converters/geometry/geometry_type_converters.h" | 10 #include "mojo/converters/geometry/geometry_type_converters.h" |
9 | 11 |
10 namespace views { | 12 namespace views { |
11 | 13 |
12 std::vector<gfx::Display> GetDisplaysFromWindow(mus::Window* window) { | 14 std::vector<gfx::Display> GetDisplaysFromWindow(mus::Window* window) { |
13 static int64 synthesized_display_id = 2000; | 15 static int64_t synthesized_display_id = 2000; |
14 gfx::Display display; | 16 gfx::Display display; |
15 display.set_id(synthesized_display_id++); | 17 display.set_id(synthesized_display_id++); |
16 display.SetScaleAndBounds( | 18 display.SetScaleAndBounds( |
17 window->viewport_metrics().device_pixel_ratio, | 19 window->viewport_metrics().device_pixel_ratio, |
18 gfx::Rect(window->viewport_metrics().size_in_pixels.To<gfx::Size>())); | 20 gfx::Rect(window->viewport_metrics().size_in_pixels.To<gfx::Size>())); |
19 std::vector<gfx::Display> displays; | 21 std::vector<gfx::Display> displays; |
20 displays.push_back(display); | 22 displays.push_back(display); |
21 return displays; | 23 return displays; |
22 } | 24 } |
23 | 25 |
24 } // namespace views | 26 } // namespace views |
OLD | NEW |