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

Side by Side Diff: services/ui/public/cpp/window_tree_client.cc

Issue 2478383002: Remove SurfaceSequence from mus client code. (Closed)
Patch Set: Only cleanup. Created 4 years, 1 month 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 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/public/cpp/window_tree_client.h" 5 #include "services/ui/public/cpp/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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 void WindowTreeClient::AttachCompositorFrameSink( 352 void WindowTreeClient::AttachCompositorFrameSink(
353 Id window_id, 353 Id window_id,
354 mojom::CompositorFrameSinkType type, 354 mojom::CompositorFrameSinkType type,
355 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, 355 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink,
356 cc::mojom::MojoCompositorFrameSinkClientPtr client) { 356 cc::mojom::MojoCompositorFrameSinkClientPtr client) {
357 DCHECK(tree_); 357 DCHECK(tree_);
358 tree_->AttachCompositorFrameSink( 358 tree_->AttachCompositorFrameSink(
359 window_id, type, std::move(compositor_frame_sink), std::move(client)); 359 window_id, type, std::move(compositor_frame_sink), std::move(client));
360 } 360 }
361 361
362 void WindowTreeClient::OnWindowSurfaceDetached(
363 Id window_id,
364 const cc::SurfaceSequence& sequence) {
365 DCHECK(tree_);
366 tree_->OnWindowSurfaceDetached(window_id, sequence);
367 }
368
369 void WindowTreeClient::LocalSetCapture(Window* window) { 362 void WindowTreeClient::LocalSetCapture(Window* window) {
370 if (capture_window_ == window) 363 if (capture_window_ == window)
371 return; 364 return;
372 Window* lost_capture = capture_window_; 365 Window* lost_capture = capture_window_;
373 capture_window_ = window; 366 capture_window_ = window;
374 if (lost_capture) { 367 if (lost_capture) {
375 for (auto& observer : *WindowPrivate(lost_capture).observers()) 368 for (auto& observer : *WindowPrivate(lost_capture).observers())
376 observer.OnWindowLostCapture(lost_capture); 369 observer.OnWindowLostCapture(lost_capture);
377 } 370 }
378 for (auto& observer : observers_) 371 for (auto& observer : observers_)
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 InFlightPredefinedCursorChange new_change(window, cursor); 1082 InFlightPredefinedCursorChange new_change(window, cursor);
1090 if (ApplyServerChangeToExistingInFlightChange(new_change)) 1083 if (ApplyServerChangeToExistingInFlightChange(new_change))
1091 return; 1084 return;
1092 1085
1093 WindowPrivate(window).LocalSetPredefinedCursor(cursor); 1086 WindowPrivate(window).LocalSetPredefinedCursor(cursor);
1094 } 1087 }
1095 1088
1096 void WindowTreeClient::OnWindowSurfaceChanged( 1089 void WindowTreeClient::OnWindowSurfaceChanged(
1097 Id window_id, 1090 Id window_id,
1098 const cc::SurfaceId& surface_id, 1091 const cc::SurfaceId& surface_id,
1099 const cc::SurfaceSequence& surface_sequence,
1100 const gfx::Size& frame_size, 1092 const gfx::Size& frame_size,
1101 float device_scale_factor) { 1093 float device_scale_factor) {
1102 Window* window = GetWindowByServerId(window_id); 1094 Window* window = GetWindowByServerId(window_id);
1103 if (!window) 1095 if (!window)
1104 return; 1096 return;
1105 std::unique_ptr<SurfaceInfo> surface_info(base::MakeUnique<SurfaceInfo>()); 1097 std::unique_ptr<SurfaceInfo> surface_info(base::MakeUnique<SurfaceInfo>());
1106 surface_info->surface_id = surface_id; 1098 surface_info->surface_id = surface_id;
1107 surface_info->surface_sequence = surface_sequence;
1108 surface_info->frame_size = frame_size; 1099 surface_info->frame_size = frame_size;
1109 surface_info->device_scale_factor = device_scale_factor; 1100 surface_info->device_scale_factor = device_scale_factor;
1110 WindowPrivate(window).LocalSetSurfaceId(std::move(surface_info)); 1101 WindowPrivate(window).LocalSetSurfaceId(std::move(surface_info));
1111 } 1102 }
1112 1103
1113 void WindowTreeClient::OnDragDropStart( 1104 void WindowTreeClient::OnDragDropStart(
1114 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) { 1105 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) {
1115 mime_drag_data_ = std::move(mime_data); 1106 mime_drag_data_ = std::move(mime_data);
1116 } 1107 }
1117 1108
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 Window* window, 1420 Window* window,
1430 const gfx::Vector2d& offset, 1421 const gfx::Vector2d& offset,
1431 const gfx::Insets& hit_area) { 1422 const gfx::Insets& hit_area) {
1432 if (window_manager_internal_client_) { 1423 if (window_manager_internal_client_) {
1433 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1424 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1434 server_id(window), offset.x(), offset.y(), hit_area); 1425 server_id(window), offset.x(), offset.y(), hit_area);
1435 } 1426 }
1436 } 1427 }
1437 1428
1438 } // namespace ui 1429 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_tree_client.h ('k') | services/ui/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698