| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 WindowManagerFrameValues frame_values = | 107 WindowManagerFrameValues frame_values = |
| 108 ws_displays[i] | 108 ws_displays[i] |
| 109 ->frame_decoration_values.To<WindowManagerFrameValues>(); | 109 ->frame_decoration_values.To<WindowManagerFrameValues>(); |
| 110 WindowManagerFrameValues::SetInstance(frame_values); | 110 WindowManagerFrameValues::SetInstance(frame_values); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 DCHECK(display_list().GetPrimaryDisplayIterator() != | 114 DCHECK(display_list().GetPrimaryDisplayIterator() != |
| 115 display_list().displays().end()); | 115 display_list().displays().end()); |
| 116 | 116 |
| 117 if (internal_display_id != display::Display::kInvalidDisplayID) | 117 if (internal_display_id != display::kInvalidDisplayId) |
| 118 display::Display::SetInternalDisplayId(internal_display_id); | 118 display::Display::SetInternalDisplayId(internal_display_id); |
| 119 | 119 |
| 120 DCHECK(!display_list().displays().empty()); | 120 DCHECK(!display_list().displays().empty()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void ScreenMus::OnDisplaysChanged( | 123 void ScreenMus::OnDisplaysChanged( |
| 124 std::vector<ui::mojom::WsDisplayPtr> ws_displays) { | 124 std::vector<ui::mojom::WsDisplayPtr> ws_displays) { |
| 125 for (size_t i = 0; i < ws_displays.size(); ++i) { | 125 for (size_t i = 0; i < ws_displays.size(); ++i) { |
| 126 const display::Display& display = ws_displays[i]->display; | 126 const display::Display& display = ws_displays[i]->display; |
| 127 const bool is_primary = | 127 const bool is_primary = |
| (...skipping 10 matching lines...) Expand all Loading... |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 void ScreenMus::OnDisplayRemoved(int64_t display_id) { | 141 void ScreenMus::OnDisplayRemoved(int64_t display_id) { |
| 142 display_list().RemoveDisplay(display_id); | 142 display_list().RemoveDisplay(display_id); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void ScreenMus::OnPrimaryDisplayChanged(int64_t primary_display_id) { | 145 void ScreenMus::OnPrimaryDisplayChanged(int64_t primary_display_id) { |
| 146 // TODO(kylechar): DisplayList would need to change to handle having no | 146 // TODO(kylechar): DisplayList would need to change to handle having no |
| 147 // primary display. | 147 // primary display. |
| 148 if (primary_display_id == display::Display::kInvalidDisplayID) | 148 if (primary_display_id == display::kInvalidDisplayId) |
| 149 return; | 149 return; |
| 150 | 150 |
| 151 ProcessDisplayChanged(*display_list().FindDisplayById(primary_display_id), | 151 ProcessDisplayChanged(*display_list().FindDisplayById(primary_display_id), |
| 152 true); | 152 true); |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace views | 155 } // namespace views |
| OLD | NEW |