| 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 "ash/display/unified_mouse_warp_controller.h" | 5 #include "ash/display/unified_mouse_warp_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "ash/display/display_util.h" | 10 #include "ash/display/display_util.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 ->software_mirroring_display_list(); | 124 ->software_mirroring_display_list(); |
| 125 | 125 |
| 126 if (display_list.size() < 2) { | 126 if (display_list.size() < 2) { |
| 127 LOG(ERROR) << "Mirroring Display lost during re-configuration"; | 127 LOG(ERROR) << "Mirroring Display lost during re-configuration"; |
| 128 return; | 128 return; |
| 129 } | 129 } |
| 130 LOG_IF(ERROR, display_list.size() > 2) << "Only two displays are supported"; | 130 LOG_IF(ERROR, display_list.size() > 2) << "Only two displays are supported"; |
| 131 | 131 |
| 132 const gfx::Display& first = display_list[0]; | 132 const gfx::Display& first = display_list[0]; |
| 133 const gfx::Display& second = display_list[1]; | 133 const gfx::Display& second = display_list[1]; |
| 134 ComputeBoundary(first, second, &first_edge_bounds_in_native_, | 134 bool success = ComputeBoundary(first, second, &first_edge_bounds_in_native_, |
| 135 &second_edge_bounds_in_native_); | 135 &second_edge_bounds_in_native_); |
| 136 DCHECK(success); |
| 136 | 137 |
| 137 first_edge_bounds_in_native_ = | 138 first_edge_bounds_in_native_ = |
| 138 GetNativeEdgeBounds(GetMirroringAshWindowTreeHostForDisplayId(first.id()), | 139 GetNativeEdgeBounds(GetMirroringAshWindowTreeHostForDisplayId(first.id()), |
| 139 first_edge_bounds_in_native_); | 140 first_edge_bounds_in_native_); |
| 140 | 141 |
| 141 second_edge_bounds_in_native_ = GetNativeEdgeBounds( | 142 second_edge_bounds_in_native_ = GetNativeEdgeBounds( |
| 142 GetMirroringAshWindowTreeHostForDisplayId(second.id()), | 143 GetMirroringAshWindowTreeHostForDisplayId(second.id()), |
| 143 second_edge_bounds_in_native_); | 144 second_edge_bounds_in_native_); |
| 144 } | 145 } |
| 145 | 146 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 160 in_first_edge ? display_list[0].id() : display_list[1].id(); | 161 in_first_edge ? display_list[0].id() : display_list[1].id(); |
| 161 AshWindowTreeHost* target_ash_host = | 162 AshWindowTreeHost* target_ash_host = |
| 162 GetMirroringAshWindowTreeHostForDisplayId( | 163 GetMirroringAshWindowTreeHostForDisplayId( |
| 163 in_first_edge ? display_list[1].id() : display_list[0].id()); | 164 in_first_edge ? display_list[1].id() : display_list[0].id()); |
| 164 MoveCursorTo(target_ash_host, point_in_unified_host, | 165 MoveCursorTo(target_ash_host, point_in_unified_host, |
| 165 update_mouse_location_now); | 166 update_mouse_location_now); |
| 166 return true; | 167 return true; |
| 167 } | 168 } |
| 168 | 169 |
| 169 } // namespace ash | 170 } // namespace ash |
| OLD | NEW |