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

Side by Side Diff: components/mus/ws/test_utils.h

Issue 2099893002: Mus: Fixes rendering of transparent containers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of FrameGenerator refactor, also addressing feedback. Created 4 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_
6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 PlatformDisplay* CreatePlatformDisplay() override; 219 PlatformDisplay* CreatePlatformDisplay() override;
220 220
221 private: 221 private:
222 int32_t* cursor_id_storage_; 222 int32_t* cursor_id_storage_;
223 223
224 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory); 224 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory);
225 }; 225 };
226 226
227 // ----------------------------------------------------------------------------- 227 // -----------------------------------------------------------------------------
228 228
229 // A stub implementation of FrameGeneratorDelegate.
230 class TestFrameGeneratorDelegate : public FrameGeneratorDelegate {
231 public:
232 explicit TestFrameGeneratorDelegate(std::unique_ptr<ServerWindow> root);
233 ~TestFrameGeneratorDelegate() override;
234
235 // FrameGeneratorDelegate:
236 ServerWindow* GetRootWindow() override;
237 void OnCompositorFrameDrawn() override {}
238 const ViewportMetrics& GetViewportMetrics() override;
239
240 private:
241 std::unique_ptr<ServerWindow> root_;
242 ViewportMetrics metrics_;
243
244 DISALLOW_COPY_AND_ASSIGN(TestFrameGeneratorDelegate);
245 };
246
247 // -----------------------------------------------------------------------------
248
229 class TestWindowManager : public mojom::WindowManager { 249 class TestWindowManager : public mojom::WindowManager {
230 public: 250 public:
231 TestWindowManager() 251 TestWindowManager()
232 : got_create_top_level_window_(false), 252 : got_create_top_level_window_(false),
233 change_id_(0u), 253 change_id_(0u),
234 on_accelerator_called_(false), 254 on_accelerator_called_(false),
235 on_accelerator_id_(0u) {} 255 on_accelerator_id_(0u) {}
236 ~TestWindowManager() override {} 256 ~TestWindowManager() override {}
237 257
238 bool did_call_create_top_level_window(uint32_t* change_id) { 258 bool did_call_create_top_level_window(uint32_t* change_id) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 530 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
511 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 531 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
512 ServerWindow* parent, 532 ServerWindow* parent,
513 ClientWindowId* client_id); 533 ClientWindowId* client_id);
514 534
515 } // namespace test 535 } // namespace test
516 } // namespace ws 536 } // namespace ws
517 } // namespace mus 537 } // namespace mus
518 538
519 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ 539 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698