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

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2784663003: mus: Rename mojom::Cursor to mojom::CursorType. (Closed)
Patch Set: Created 3 years, 8 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 | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/test/mus/test_window_tree.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 "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 SetWindowTree(std::move(window_tree)); 271 SetWindowTree(std::move(window_tree));
272 } 272 }
273 273
274 void WindowTreeClient::SetCanFocus(Window* window, bool can_focus) { 274 void WindowTreeClient::SetCanFocus(Window* window, bool can_focus) {
275 DCHECK(tree_); 275 DCHECK(tree_);
276 DCHECK(window); 276 DCHECK(window);
277 tree_->SetCanFocus(WindowMus::Get(window)->server_id(), can_focus); 277 tree_->SetCanFocus(WindowMus::Get(window)->server_id(), can_focus);
278 } 278 }
279 279
280 void WindowTreeClient::SetPredefinedCursor(WindowMus* window, 280 void WindowTreeClient::SetPredefinedCursor(WindowMus* window,
281 ui::mojom::Cursor old_cursor, 281 ui::mojom::CursorType old_cursor,
282 ui::mojom::Cursor new_cursor) { 282 ui::mojom::CursorType new_cursor) {
283 DCHECK(tree_); 283 DCHECK(tree_);
284 284
285 const uint32_t change_id = ScheduleInFlightChange( 285 const uint32_t change_id = ScheduleInFlightChange(
286 base::MakeUnique<InFlightPredefinedCursorChange>(window, old_cursor)); 286 base::MakeUnique<InFlightPredefinedCursorChange>(window, old_cursor));
287 tree_->SetPredefinedCursor(change_id, window->server_id(), new_cursor); 287 tree_->SetPredefinedCursor(change_id, window->server_id(), new_cursor);
288 } 288 }
289 289
290 void WindowTreeClient::SetWindowTextInputState(WindowMus* window, 290 void WindowTreeClient::SetWindowTextInputState(WindowMus* window,
291 mojo::TextInputStatePtr state) { 291 mojo::TextInputStatePtr state) {
292 DCHECK(tree_); 292 DCHECK(tree_);
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 InFlightFocusChange new_change(this, focus_synchronizer_.get(), 1246 InFlightFocusChange new_change(this, focus_synchronizer_.get(),
1247 focused_window); 1247 focused_window);
1248 if (ApplyServerChangeToExistingInFlightChange(new_change)) 1248 if (ApplyServerChangeToExistingInFlightChange(new_change))
1249 return; 1249 return;
1250 1250
1251 focus_synchronizer_->SetFocusFromServer(focused_window); 1251 focus_synchronizer_->SetFocusFromServer(focused_window);
1252 } 1252 }
1253 1253
1254 void WindowTreeClient::OnWindowPredefinedCursorChanged( 1254 void WindowTreeClient::OnWindowPredefinedCursorChanged(
1255 Id window_id, 1255 Id window_id,
1256 ui::mojom::Cursor cursor) { 1256 ui::mojom::CursorType cursor) {
1257 WindowMus* window = GetWindowByServerId(window_id); 1257 WindowMus* window = GetWindowByServerId(window_id);
1258 if (!window) 1258 if (!window)
1259 return; 1259 return;
1260 1260
1261 InFlightPredefinedCursorChange new_change(window, cursor); 1261 InFlightPredefinedCursorChange new_change(window, cursor);
1262 if (ApplyServerChangeToExistingInFlightChange(new_change)) 1262 if (ApplyServerChangeToExistingInFlightChange(new_change))
1263 return; 1263 return;
1264 1264
1265 window->SetPredefinedCursorFromServer(cursor); 1265 window->SetPredefinedCursorFromServer(cursor);
1266 } 1266 }
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 1648
1649 void WindowTreeClient::SetFrameDecorationValues( 1649 void WindowTreeClient::SetFrameDecorationValues(
1650 ui::mojom::FrameDecorationValuesPtr values) { 1650 ui::mojom::FrameDecorationValuesPtr values) {
1651 if (window_manager_internal_client_) { 1651 if (window_manager_internal_client_) {
1652 window_manager_internal_client_->WmSetFrameDecorationValues( 1652 window_manager_internal_client_->WmSetFrameDecorationValues(
1653 std::move(values)); 1653 std::move(values));
1654 } 1654 }
1655 } 1655 }
1656 1656
1657 void WindowTreeClient::SetNonClientCursor(Window* window, 1657 void WindowTreeClient::SetNonClientCursor(Window* window,
1658 ui::mojom::Cursor cursor_id) { 1658 ui::mojom::CursorType cursor_id) {
1659 if (window_manager_internal_client_) { 1659 if (window_manager_internal_client_) {
1660 window_manager_internal_client_->WmSetNonClientCursor( 1660 window_manager_internal_client_->WmSetNonClientCursor(
1661 WindowMus::Get(window)->server_id(), cursor_id); 1661 WindowMus::Get(window)->server_id(), cursor_id);
1662 } 1662 }
1663 } 1663 }
1664 1664
1665 void WindowTreeClient::AddAccelerators( 1665 void WindowTreeClient::AddAccelerators(
1666 std::vector<ui::mojom::WmAcceleratorPtr> accelerators, 1666 std::vector<ui::mojom::WmAcceleratorPtr> accelerators,
1667 const base::Callback<void(bool)>& callback) { 1667 const base::Callback<void(bool)>& callback) {
1668 if (window_manager_internal_client_) { 1668 if (window_manager_internal_client_) {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1915 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1916 this, capture_synchronizer_.get(), window)); 1916 this, capture_synchronizer_.get(), window));
1917 } 1917 }
1918 1918
1919 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1919 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1920 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1920 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1921 this, focus_synchronizer_.get(), window)); 1921 this, focus_synchronizer_.get(), window));
1922 } 1922 }
1923 1923
1924 } // namespace aura 1924 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/test/mus/test_window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698