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

Side by Side Diff: services/ui/ws/test_utils.h

Issue 2759933007: [mus]Add FrameGenerator::SetHighContrastMode(bool) (Closed)
Patch Set: Addressed nit and removed instances of FrameGeneratorDelegate Created 3 years, 9 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 SERVICES_UI_WS_TEST_UTILS_H_ 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_
6 #define SERVICES_UI_WS_TEST_UTILS_H_ 6 #define SERVICES_UI_WS_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "services/ui/display/screen_manager.h" 16 #include "services/ui/display/screen_manager.h"
17 #include "services/ui/display/viewport_metrics.h" 17 #include "services/ui/display/viewport_metrics.h"
18 #include "services/ui/public/interfaces/display_manager.mojom.h" 18 #include "services/ui/public/interfaces/display_manager.mojom.h"
19 #include "services/ui/public/interfaces/window_tree.mojom.h" 19 #include "services/ui/public/interfaces/window_tree.mojom.h"
20 #include "services/ui/ws/display.h" 20 #include "services/ui/ws/display.h"
21 #include "services/ui/ws/display_binding.h" 21 #include "services/ui/ws/display_binding.h"
22 #include "services/ui/ws/drag_controller.h" 22 #include "services/ui/ws/drag_controller.h"
23 #include "services/ui/ws/event_dispatcher.h" 23 #include "services/ui/ws/event_dispatcher.h"
24 #include "services/ui/ws/frame_generator_delegate.h"
25 #include "services/ui/ws/platform_display.h" 24 #include "services/ui/ws/platform_display.h"
26 #include "services/ui/ws/platform_display_factory.h" 25 #include "services/ui/ws/platform_display_factory.h"
27 #include "services/ui/ws/test_change_tracker.h" 26 #include "services/ui/ws/test_change_tracker.h"
28 #include "services/ui/ws/user_activity_monitor.h" 27 #include "services/ui/ws/user_activity_monitor.h"
29 #include "services/ui/ws/user_id.h" 28 #include "services/ui/ws/user_id.h"
30 #include "services/ui/ws/window_manager_state.h" 29 #include "services/ui/ws/window_manager_state.h"
31 #include "services/ui/ws/window_manager_window_tree_factory_set.h" 30 #include "services/ui/ws/window_manager_window_tree_factory_set.h"
32 #include "services/ui/ws/window_server_delegate.h" 31 #include "services/ui/ws/window_server_delegate.h"
33 #include "services/ui/ws/window_tree.h" 32 #include "services/ui/ws/window_tree.h"
34 #include "services/ui/ws/window_tree_binding.h" 33 #include "services/ui/ws/window_tree_binding.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 const display::ViewportMetrics& metrics) override; 281 const display::ViewportMetrics& metrics) override;
283 282
284 private: 283 private:
285 mojom::Cursor* cursor_storage_; 284 mojom::Cursor* cursor_storage_;
286 285
287 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory); 286 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory);
288 }; 287 };
289 288
290 // ----------------------------------------------------------------------------- 289 // -----------------------------------------------------------------------------
291 290
292 // A stub implementation of FrameGeneratorDelegate.
293 class TestFrameGeneratorDelegate : public FrameGeneratorDelegate {
294 public:
295 TestFrameGeneratorDelegate();
296 ~TestFrameGeneratorDelegate() override;
297
298 // FrameGeneratorDelegate:
299 bool IsInHighContrastMode() override;
300
301 DISALLOW_COPY_AND_ASSIGN(TestFrameGeneratorDelegate);
302 };
303
304 // -----------------------------------------------------------------------------
305
306 class TestWindowManager : public mojom::WindowManager { 291 class TestWindowManager : public mojom::WindowManager {
307 public: 292 public:
308 TestWindowManager() 293 TestWindowManager()
309 : got_create_top_level_window_(false), 294 : got_create_top_level_window_(false),
310 change_id_(0u), 295 change_id_(0u),
311 on_accelerator_called_(false), 296 on_accelerator_called_(false),
312 on_accelerator_id_(0u) {} 297 on_accelerator_id_(0u) {}
313 ~TestWindowManager() override {} 298 ~TestWindowManager() override {}
314 299
315 bool did_call_create_top_level_window(uint32_t* change_id) { 300 bool did_call_create_top_level_window(uint32_t* change_id) {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 671 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
687 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 672 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
688 ServerWindow* parent, 673 ServerWindow* parent,
689 ClientWindowId* client_id = nullptr); 674 ClientWindowId* client_id = nullptr);
690 675
691 } // namespace test 676 } // namespace test
692 } // namespace ws 677 } // namespace ws
693 } // namespace ui 678 } // namespace ui
694 679
695 #endif // SERVICES_UI_WS_TEST_UTILS_H_ 680 #endif // SERVICES_UI_WS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698