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

Side by Side Diff: ui/aura/test/mus/test_window_tree.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/mus/test_window_tree.h" 5 #include "ui/aura/test/mus/test_window_tree.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace aura { 9 namespace aura {
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 void TestWindowTree::OnChangeReceived(uint32_t change_id, 109 void TestWindowTree::OnChangeReceived(uint32_t change_id,
110 WindowTreeChangeType type) { 110 WindowTreeChangeType type) {
111 changes_.push_back({type, change_id}); 111 changes_.push_back({type, change_id});
112 } 112 }
113 113
114 void TestWindowTree::NewWindow( 114 void TestWindowTree::NewWindow(
115 uint32_t change_id, 115 uint32_t change_id,
116 uint32_t window_id, 116 uint32_t window_id,
117 const base::Optional<std::unordered_map<std::string, std::vector<uint8_t>>>& 117 const base::Optional<std::unordered_map<std::string, std::vector<uint8_t>>>&
118 properties) { 118 properties,
119 const cc::LocalFrameId& local_frame_id) {
119 last_new_window_properties_ = properties; 120 last_new_window_properties_ = properties;
120 OnChangeReceived(change_id, WindowTreeChangeType::NEW_WINDOW); 121 OnChangeReceived(change_id, WindowTreeChangeType::NEW_WINDOW);
121 } 122 }
122 123
123 void TestWindowTree::NewTopLevelWindow( 124 void TestWindowTree::NewTopLevelWindow(
124 uint32_t change_id, 125 uint32_t change_id,
125 uint32_t window_id, 126 uint32_t window_id,
126 const std::unordered_map<std::string, std::vector<uint8_t>>& properties) { 127 const std::unordered_map<std::string, std::vector<uint8_t>>& properties) {
127 last_new_window_properties_.emplace(properties); 128 last_new_window_properties_.emplace(properties);
128 window_id_ = window_id; 129 window_id_ = window_id;
129 OnChangeReceived(change_id, WindowTreeChangeType::NEW_TOP_LEVEL); 130 OnChangeReceived(change_id, WindowTreeChangeType::NEW_TOP_LEVEL);
130 } 131 }
131 132
132 void TestWindowTree::DeleteWindow(uint32_t change_id, uint32_t window_id) { 133 void TestWindowTree::DeleteWindow(uint32_t change_id, uint32_t window_id) {
133 OnChangeReceived(change_id); 134 OnChangeReceived(change_id);
134 } 135 }
135 136
136 void TestWindowTree::SetWindowBounds(uint32_t change_id, 137 void TestWindowTree::SetWindowBounds(uint32_t change_id,
137 uint32_t window_id, 138 uint32_t window_id,
138 const gfx::Rect& bounds) { 139 const gfx::Rect& bounds,
140 const cc::LocalFrameId& local_frame_id) {
139 OnChangeReceived(change_id, WindowTreeChangeType::BOUNDS); 141 OnChangeReceived(change_id, WindowTreeChangeType::BOUNDS);
140 } 142 }
141 143
142 void TestWindowTree::SetClientArea( 144 void TestWindowTree::SetClientArea(
143 uint32_t window_id, 145 uint32_t window_id,
144 const gfx::Insets& insets, 146 const gfx::Insets& insets,
145 const base::Optional<std::vector<gfx::Rect>>& additional_client_areas) { 147 const base::Optional<std::vector<gfx::Rect>>& additional_client_areas) {
146 last_client_area_ = insets; 148 last_client_area_ = insets;
147 } 149 }
148 150
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 void TestWindowTree::PerformWindowMove(uint32_t change_id, 294 void TestWindowTree::PerformWindowMove(uint32_t change_id,
293 uint32_t window_id, 295 uint32_t window_id,
294 ui::mojom::MoveLoopSource source, 296 ui::mojom::MoveLoopSource source,
295 const gfx::Point& cursor_location) { 297 const gfx::Point& cursor_location) {
296 OnChangeReceived(change_id); 298 OnChangeReceived(change_id);
297 } 299 }
298 300
299 void TestWindowTree::CancelWindowMove(uint32_t window_id) {} 301 void TestWindowTree::CancelWindowMove(uint32_t window_id) {}
300 302
301 } // namespace aura 303 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698