| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // This has to be before any other includes, else default is picked up. | 5 // This has to be before any other includes, else default is picked up. |
| 6 // See base/logging for details on this. | 6 // See base/logging for details on this. |
| 7 #define NOTIMPLEMENTED_POLICY 5 | 7 #define NOTIMPLEMENTED_POLICY 5 |
| 8 | 8 |
| 9 #include "ui/views/mus/screen_mus.h" | 9 #include "ui/views/mus/screen_mus.h" |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (display_list().displays().empty()) { | 68 if (display_list().displays().empty()) { |
| 69 DCHECK(display_manager_.encountered_error() || !success); | 69 DCHECK(display_manager_.encountered_error() || !success); |
| 70 // In this case we install a default display and assume the process is | 70 // In this case we install a default display and assume the process is |
| 71 // going to exit shortly so that the real value doesn't matter. | 71 // going to exit shortly so that the real value doesn't matter. |
| 72 display_list().AddDisplay( | 72 display_list().AddDisplay( |
| 73 display::Display(0xFFFFFFFF, gfx::Rect(0, 0, 801, 802)), Type::PRIMARY); | 73 display::Display(0xFFFFFFFF, gfx::Rect(0, 0, 801, 802)), Type::PRIMARY); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 display::Display ScreenMus::GetDisplayNearestWindow( | 77 display::Display ScreenMus::GetDisplayNearestWindow( |
| 78 aura::Window* window) const { | 78 gfx::NativeWindow window) const { |
| 79 aura::WindowTreeHostMus* window_tree_host_mus = | 79 aura::WindowTreeHostMus* window_tree_host_mus = |
| 80 aura::WindowTreeHostMus::ForWindow(window); | 80 aura::WindowTreeHostMus::ForWindow(window); |
| 81 if (!window_tree_host_mus) | 81 if (!window_tree_host_mus) |
| 82 return GetPrimaryDisplay(); | 82 return GetPrimaryDisplay(); |
| 83 return window_tree_host_mus->GetDisplay(); | 83 return window_tree_host_mus->GetDisplay(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 gfx::Point ScreenMus::GetCursorScreenPoint() { | 86 gfx::Point ScreenMus::GetCursorScreenPoint() { |
| 87 return aura::Env::GetInstance()->last_mouse_location(); | 87 return aura::Env::GetInstance()->last_mouse_location(); |
| 88 } | 88 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // TODO(kylechar): DisplayList would need to change to handle having no | 150 // TODO(kylechar): DisplayList would need to change to handle having no |
| 151 // primary display. | 151 // primary display. |
| 152 if (primary_display_id == display::kInvalidDisplayId) | 152 if (primary_display_id == display::kInvalidDisplayId) |
| 153 return; | 153 return; |
| 154 | 154 |
| 155 ProcessDisplayChanged(*display_list().FindDisplayById(primary_display_id), | 155 ProcessDisplayChanged(*display_list().FindDisplayById(primary_display_id), |
| 156 true); | 156 true); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace views | 159 } // namespace views |
| OLD | NEW |