| 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/window_manager_connection.h" | 5 #include "ui/views/mus/window_manager_connection.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/threading/thread_local.h" | 8 #include "base/threading/thread_local.h" |
| 9 #include "components/mus/public/cpp/window_tree_connection.h" | 9 #include "components/mus/public/cpp/window_tree_connection.h" |
| 10 #include "components/mus/public/interfaces/window_tree.mojom.h" | 10 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 template <> | 38 template <> |
| 39 struct TypeConverter<gfx::Display, mus::mojom::DisplayPtr> { | 39 struct TypeConverter<gfx::Display, mus::mojom::DisplayPtr> { |
| 40 static gfx::Display Convert(const mus::mojom::DisplayPtr& input) { | 40 static gfx::Display Convert(const mus::mojom::DisplayPtr& input) { |
| 41 gfx::Display result; | 41 gfx::Display result; |
| 42 result.set_id(input->id); | 42 result.set_id(input->id); |
| 43 result.SetScaleAndBounds(input->device_pixel_ratio, | 43 result.SetScaleAndBounds(input->device_pixel_ratio, |
| 44 input->bounds.To<gfx::Rect>()); | 44 input->bounds.To<gfx::Rect>()); |
| 45 gfx::Rect work_area( | 45 gfx::Rect work_area( |
| 46 gfx::ToFlooredPoint(gfx::ScalePoint( | 46 gfx::ScaleToFlooredPoint( |
| 47 gfx::Point(input->work_area->x, input->work_area->y), | 47 gfx::Point(input->work_area->x, input->work_area->y), |
| 48 1.0f / input->device_pixel_ratio)), | 48 1.0f / input->device_pixel_ratio), |
| 49 gfx::ScaleToFlooredSize( | 49 gfx::ScaleToFlooredSize( |
| 50 gfx::Size(input->work_area->width, input->work_area->height), | 50 gfx::Size(input->work_area->width, input->work_area->height), |
| 51 1.0f / input->device_pixel_ratio)); | 51 1.0f / input->device_pixel_ratio)); |
| 52 result.set_work_area(work_area); | 52 result.set_work_area(work_area); |
| 53 result.set_rotation(GFXRotationFromMojomRotation(input->rotation)); | 53 result.set_rotation(GFXRotationFromMojomRotation(input->rotation)); |
| 54 return result; | 54 return result; |
| 55 } | 55 } |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace mojo | 58 } // namespace mojo |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void WindowManagerConnection::OnConnectionLost( | 139 void WindowManagerConnection::OnConnectionLost( |
| 140 mus::WindowTreeConnection* connection) {} | 140 mus::WindowTreeConnection* connection) {} |
| 141 | 141 |
| 142 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
| 143 HICON WindowManagerConnection::GetSmallWindowIcon() const { | 143 HICON WindowManagerConnection::GetSmallWindowIcon() const { |
| 144 return nullptr; | 144 return nullptr; |
| 145 } | 145 } |
| 146 #endif | 146 #endif |
| 147 | 147 |
| 148 } // namespace views | 148 } // namespace views |
| OLD | NEW |