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

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

Issue 2610723002: Unify SurfaceInfo (Closed)
Patch Set: Cleanup offscreen canvas Created 3 years, 11 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') | no next file » | 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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1215
1216 InFlightPredefinedCursorChange new_change(window, cursor); 1216 InFlightPredefinedCursorChange new_change(window, cursor);
1217 if (ApplyServerChangeToExistingInFlightChange(new_change)) 1217 if (ApplyServerChangeToExistingInFlightChange(new_change))
1218 return; 1218 return;
1219 1219
1220 window->SetPredefinedCursorFromServer(cursor); 1220 window->SetPredefinedCursorFromServer(cursor);
1221 } 1221 }
1222 1222
1223 void WindowTreeClient::OnWindowSurfaceChanged( 1223 void WindowTreeClient::OnWindowSurfaceChanged(
1224 Id window_id, 1224 Id window_id,
1225 const cc::SurfaceId& surface_id, 1225 const cc::SurfaceInfo& surface_info) {
1226 const gfx::Size& frame_size,
1227 float device_scale_factor) {
1228 WindowMus* window = GetWindowByServerId(window_id); 1226 WindowMus* window = GetWindowByServerId(window_id);
1229 if (!window) 1227 if (!window)
1230 return; 1228 return;
1231 std::unique_ptr<SurfaceInfo> surface_info(base::MakeUnique<SurfaceInfo>()); 1229 window->SetSurfaceInfoFromServer(surface_info);
1232 surface_info->surface_id = surface_id;
1233 surface_info->frame_size = frame_size;
1234 surface_info->device_scale_factor = device_scale_factor;
1235 window->SetSurfaceIdFromServer(std::move(surface_info));
1236 } 1230 }
1237 1231
1238 void WindowTreeClient::OnDragDropStart( 1232 void WindowTreeClient::OnDragDropStart(
1239 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) { 1233 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) {
1240 drag_drop_controller_->OnDragDropStart(mojo::UnorderedMapToMap(mime_data)); 1234 drag_drop_controller_->OnDragDropStart(mojo::UnorderedMapToMap(mime_data));
1241 } 1235 }
1242 1236
1243 void WindowTreeClient::OnDragEnter(Id window_id, 1237 void WindowTreeClient::OnDragEnter(Id window_id,
1244 uint32_t key_state, 1238 uint32_t key_state,
1245 const gfx::Point& position, 1239 const gfx::Point& position,
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1692 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1699 this, capture_synchronizer_.get(), window)); 1693 this, capture_synchronizer_.get(), window));
1700 } 1694 }
1701 1695
1702 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1696 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1703 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1697 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1704 this, focus_synchronizer_.get(), window)); 1698 this, focus_synchronizer_.get(), window));
1705 } 1699 }
1706 1700
1707 } // namespace aura 1701 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698