Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: services/ui/display/screen_manager_ozone.cc

Issue 2537643008: Add IPCs for ash display shortcuts. (Closed)
Patch Set: Fixes. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "services/ui/display/screen_manager_ozone.h" 5 #include "services/ui/display/screen_manager_ozone.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 display.requested_size = display.supported_sizes[0]; 140 display.requested_size = display.supported_sizes[0];
141 else 141 else
142 display.requested_size = display.supported_sizes[i + 1]; 142 display.requested_size = display.supported_sizes[i + 1];
143 break; 143 break;
144 } 144 }
145 } 145 }
146 146
147 display_configurator_.OnConfigurationChanged(); 147 display_configurator_.OnConfigurationChanged();
148 } 148 }
149 149
150 void ScreenManagerOzone::InternalDisplayIncreaseZoom() {
151 NOTIMPLEMENTED();
152 }
153
154 void ScreenManagerOzone::InternalDisplayDecreaseZoom() {
155 NOTIMPLEMENTED();
156 }
157
158 void ScreenManagerOzone::InternalDisplayResetZoom() {
159 NOTIMPLEMENTED();
160 }
161
162 void ScreenManagerOzone::RotateCurrentDisplayCW() {
163 NOTIMPLEMENTED();
164 }
165
150 void ScreenManagerOzone::SwapPrimaryDisplay() { 166 void ScreenManagerOzone::SwapPrimaryDisplay() {
151 const size_t num_displays = cached_displays_.size(); 167 const size_t num_displays = cached_displays_.size();
152 if (num_displays <= 1) 168 if (num_displays <= 1)
153 return; 169 return;
154 170
155 // Find index of current primary display. 171 // Find index of current primary display.
156 size_t primary_display_index = 0; 172 size_t primary_display_index = 0;
157 for (size_t i = 0; i < num_displays; i++) { 173 for (size_t i = 0; i < num_displays; i++) {
158 if (cached_displays_[i].id == primary_display_id_) { 174 if (cached_displays_[i].id == primary_display_id_) {
159 primary_display_index = i; 175 primary_display_index = i;
160 break; 176 break;
161 } 177 }
162 } 178 }
163 179
164 // Set next display index as primary, or loop back to first display if last. 180 // Set next display index as primary, or loop back to first display if last.
165 if (primary_display_index + 1 == num_displays) { 181 if (primary_display_index + 1 == num_displays) {
166 primary_display_id_ = cached_displays_[0].id; 182 primary_display_id_ = cached_displays_[0].id;
167 } else { 183 } else {
168 primary_display_id_ = cached_displays_[primary_display_index + 1].id; 184 primary_display_id_ = cached_displays_[primary_display_index + 1].id;
169 } 185 }
170 186
171 delegate_->OnPrimaryDisplayChanged(primary_display_id_); 187 delegate_->OnPrimaryDisplayChanged(primary_display_id_);
172 } 188 }
173 189
190 void ScreenManagerOzone::ToggleMirrorMode() {
191 NOTIMPLEMENTED();
192 }
193
174 void ScreenManagerOzone::SetDisplayWorkArea(int64_t display_id, 194 void ScreenManagerOzone::SetDisplayWorkArea(int64_t display_id,
175 const gfx::Size& size, 195 const gfx::Size& size,
176 const gfx::Insets& insets) { 196 const gfx::Insets& insets) {
177 CachedDisplayIterator iter = GetCachedDisplayIterator(display_id); 197 CachedDisplayIterator iter = GetCachedDisplayIterator(display_id);
178 if (iter == cached_displays_.end()) { 198 if (iter == cached_displays_.end()) {
179 NOTREACHED() << display_id; 199 NOTREACHED() << display_id;
180 return; 200 return;
181 } 201 }
182 202
183 DisplayInfo& display_info = *iter; 203 DisplayInfo& display_info = *iter;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return false; 400 return false;
381 } 401 }
382 402
383 void ScreenManagerOzone::Create( 403 void ScreenManagerOzone::Create(
384 const service_manager::Identity& remote_identity, 404 const service_manager::Identity& remote_identity,
385 mojom::TestDisplayControllerRequest request) { 405 mojom::TestDisplayControllerRequest request) {
386 test_bindings_.AddBinding(this, std::move(request)); 406 test_bindings_.AddBinding(this, std::move(request));
387 } 407 }
388 408
389 } // namespace display 409 } // namespace display
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698