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

Side by Side Diff: components/mus/ws/window_tree_unittest.cc

Issue 1605773004: mus: Implement Window Server Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Original Review Comments Created 4 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
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 mus::mojom::WindowTreePtr tree, 114 mus::mojom::WindowTreePtr tree,
115 Id focused_window_id, 115 Id focused_window_id,
116 uint32_t access_policy) override { 116 uint32_t access_policy) override {
117 // TODO(sky): add test coverage of |focused_window_id|. 117 // TODO(sky): add test coverage of |focused_window_id|.
118 tracker_.OnEmbed(connection_id, std::move(root)); 118 tracker_.OnEmbed(connection_id, std::move(root));
119 } 119 }
120 void OnEmbeddedAppDisconnected(uint32_t window) override { 120 void OnEmbeddedAppDisconnected(uint32_t window) override {
121 tracker_.OnEmbeddedAppDisconnected(window); 121 tracker_.OnEmbeddedAppDisconnected(window);
122 } 122 }
123 void OnUnembed(Id window_id) override { tracker_.OnUnembed(window_id); } 123 void OnUnembed(Id window_id) override { tracker_.OnUnembed(window_id); }
124 void OnLostCapture(Id window_id) override {}
124 void OnTopLevelCreated(uint32_t change_id, 125 void OnTopLevelCreated(uint32_t change_id,
125 mojom::WindowDataPtr data) override { 126 mojom::WindowDataPtr data) override {
126 tracker_.OnTopLevelCreated(change_id, std::move(data)); 127 tracker_.OnTopLevelCreated(change_id, std::move(data));
127 } 128 }
128 void OnWindowBoundsChanged(uint32_t window, 129 void OnWindowBoundsChanged(uint32_t window,
129 mojo::RectPtr old_bounds, 130 mojo::RectPtr old_bounds,
130 mojo::RectPtr new_bounds) override { 131 mojo::RectPtr new_bounds) override {
131 tracker_.OnWindowBoundsChanged(window, std::move(old_bounds), 132 tracker_.OnWindowBoundsChanged(window, std::move(old_bounds),
132 std::move(new_bounds)); 133 std::move(new_bounds));
133 } 134 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // root-window is created). 306 // root-window is created).
306 mojom::ViewportMetrics metrics; 307 mojom::ViewportMetrics metrics;
307 metrics.size_in_pixels = mojo::Size::From(gfx::Size(400, 300)); 308 metrics.size_in_pixels = mojo::Size::From(gfx::Size(400, 300));
308 metrics.device_pixel_ratio = 1.f; 309 metrics.device_pixel_ratio = 1.f;
309 delegate->OnViewportMetricsChanged(mojom::ViewportMetrics(), metrics); 310 delegate->OnViewportMetricsChanged(mojom::ViewportMetrics(), metrics);
310 } 311 }
311 void SchedulePaint(const ServerWindow* window, 312 void SchedulePaint(const ServerWindow* window,
312 const gfx::Rect& bounds) override {} 313 const gfx::Rect& bounds) override {}
313 void SetViewportSize(const gfx::Size& size) override {} 314 void SetViewportSize(const gfx::Size& size) override {}
314 void SetTitle(const base::string16& title) override {} 315 void SetTitle(const base::string16& title) override {}
316 void SetCapture() override {}
317 void ReleaseCapture() override {}
315 void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; } 318 void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; }
316 const mojom::ViewportMetrics& GetViewportMetrics() override { 319 const mojom::ViewportMetrics& GetViewportMetrics() override {
317 return display_metrices_; 320 return display_metrices_;
318 } 321 }
319 void UpdateTextInputState(const ui::TextInputState& state) override {} 322 void UpdateTextInputState(const ui::TextInputState& state) override {}
320 void SetImeVisibility(bool visible) override {} 323 void SetImeVisibility(bool visible) override {}
321 bool IsFramePending() const override { return false; } 324 bool IsFramePending() const override { return false; }
322 325
323 private: 326 private:
324 mojom::ViewportMetrics display_metrices_; 327 mojom::ViewportMetrics display_metrices_;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 SingleChangeToDescription(*embed_connection->tracker()->changes())); 862 SingleChangeToDescription(*embed_connection->tracker()->changes()));
860 863
861 // Set the visibility from the child using the client assigned id. 864 // Set the visibility from the child using the client assigned id.
862 ASSERT_TRUE(window_tree_connection->SetWindowVisibility( 865 ASSERT_TRUE(window_tree_connection->SetWindowVisibility(
863 embed_window_id2_in_child, false)); 866 embed_window_id2_in_child, false));
864 EXPECT_FALSE(embed_window->visible()); 867 EXPECT_FALSE(embed_window->visible());
865 } 868 }
866 869
867 } // namespace ws 870 } // namespace ws
868 } // namespace mus 871 } // namespace mus
OLDNEW
« components/mus/ws/window_tree_impl.cc ('K') | « components/mus/ws/window_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698