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

Side by Side Diff: services/ui/ws/server_window.cc

Issue 2378883002: mus ws: Consistently use mojom::Cursor instead of int32_t. (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ws/server_window.h" 5 #include "services/ui/ws/server_window.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, 281 FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
282 OnWindowOpacityChanged(this, old_opacity, opacity_)); 282 OnWindowOpacityChanged(this, old_opacity, opacity_));
283 } 283 }
284 284
285 void ServerWindow::SetPredefinedCursor(ui::mojom::Cursor value) { 285 void ServerWindow::SetPredefinedCursor(ui::mojom::Cursor value) {
286 if (value == cursor_id_) 286 if (value == cursor_id_)
287 return; 287 return;
288 cursor_id_ = value; 288 cursor_id_ = value;
289 FOR_EACH_OBSERVER( 289 FOR_EACH_OBSERVER(
290 ServerWindowObserver, observers_, 290 ServerWindowObserver, observers_,
291 OnWindowPredefinedCursorChanged(this, static_cast<int32_t>(value))); 291 OnWindowPredefinedCursorChanged(this, value));
292 } 292 }
293 293
294 void ServerWindow::SetNonClientCursor(ui::mojom::Cursor value) { 294 void ServerWindow::SetNonClientCursor(ui::mojom::Cursor value) {
295 if (value == non_client_cursor_id_) 295 if (value == non_client_cursor_id_)
296 return; 296 return;
297 non_client_cursor_id_ = value; 297 non_client_cursor_id_ = value;
298 FOR_EACH_OBSERVER( 298 FOR_EACH_OBSERVER(
299 ServerWindowObserver, observers_, 299 ServerWindowObserver, observers_,
300 OnWindowNonClientCursorChanged(this, static_cast<int32_t>(value))); 300 OnWindowNonClientCursorChanged(this, value));
301 } 301 }
302 302
303 void ServerWindow::SetTransform(const gfx::Transform& transform) { 303 void ServerWindow::SetTransform(const gfx::Transform& transform) {
304 if (transform_ == transform) 304 if (transform_ == transform)
305 return; 305 return;
306 306
307 transform_ = transform; 307 transform_ = transform;
308 delegate_->OnScheduleWindowPaint(this); 308 delegate_->OnScheduleWindowPaint(this);
309 } 309 }
310 310
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 } 462 }
463 463
464 // static 464 // static
465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { 465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) {
466 return &window->stacking_target_; 466 return &window->stacking_target_;
467 } 467 }
468 468
469 } // namespace ws 469 } // namespace ws
470 470
471 } // namespace ui 471 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698