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

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

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Determine external window mode in mus-ws based on if a WM is connected Created 4 years 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>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 int64_t AddDisplay(const display::ViewportMetrics& metrics); 59 int64_t AddDisplay(const display::ViewportMetrics& metrics);
60 60
61 // Calls OnDisplayModified() on delegate. 61 // Calls OnDisplayModified() on delegate.
62 void ModifyDisplay(int64_t id, const display::ViewportMetrics& metrics); 62 void ModifyDisplay(int64_t id, const display::ViewportMetrics& metrics);
63 63
64 // Calls OnDisplayRemoved() on delegate. 64 // Calls OnDisplayRemoved() on delegate.
65 void RemoveDisplay(int64_t id); 65 void RemoveDisplay(int64_t id);
66 66
67 // display::PlatformScreen: 67 // display::PlatformScreen:
68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} 68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {}
69 void Init(display::PlatformScreenDelegate* delegate) override; 69 void Init(display::PlatformScreenDelegate* delegate,
70 bool external_window_mode_) override;
tonikitoo 2016/11/22 03:07:39 nit: trailing "_"
Tom (Use chromium acct) 2016/11/22 19:19:48 Done.
70 void RequestCloseDisplay(int64_t display_id) override {} 71 void RequestCloseDisplay(int64_t display_id) override {}
71 int64_t GetPrimaryDisplayId() const override; 72 int64_t GetPrimaryDisplayId() const override;
72 73
73 private: 74 private:
74 display::PlatformScreenDelegate* delegate_; 75 display::PlatformScreenDelegate* delegate_;
75 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; 76 int64_t primary_display_id_ = display::Display::kInvalidDisplayID;
76 std::set<int64_t> display_ids_; 77 std::set<int64_t> display_ids_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(TestPlatformScreen); 79 DISALLOW_COPY_AND_ASSIGN(TestPlatformScreen);
79 }; 80 };
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 557 }
557 TestWindowTreeBinding* last_binding() { 558 TestWindowTreeBinding* last_binding() {
558 return bindings_.empty() ? nullptr : bindings_.back(); 559 return bindings_.empty() ? nullptr : bindings_.back();
559 } 560 }
560 561
561 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } 562 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; }
562 563
563 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } 564 bool got_on_no_more_displays() const { return got_on_no_more_displays_; }
564 565
565 // WindowServerDelegate: 566 // WindowServerDelegate:
566 void StartDisplayInit() override; 567 void StartDisplayInit(bool window_manager_connected) override;
567 void OnNoMoreDisplays() override; 568 void OnNoMoreDisplays() override;
568 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( 569 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding(
569 BindingType type, 570 BindingType type,
570 ws::WindowServer* window_server, 571 ws::WindowServer* window_server,
571 ws::WindowTree* tree, 572 ws::WindowTree* tree,
572 mojom::WindowTreeRequest* tree_request, 573 mojom::WindowTreeRequest* tree_request,
573 mojom::WindowTreeClientPtr* client) override; 574 mojom::WindowTreeClientPtr* client) override;
574 bool IsTestConfig() const override; 575 bool IsTestConfig() const override;
575 void UpdateTouchTransforms() override {} 576 void UpdateTouchTransforms() override {}
576 577
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 694 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
694 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 695 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
695 ServerWindow* parent, 696 ServerWindow* parent,
696 ClientWindowId* client_id); 697 ClientWindowId* client_id);
697 698
698 } // namespace test 699 } // namespace test
699 } // namespace ws 700 } // namespace ws
700 } // namespace ui 701 } // namespace ui
701 702
702 #endif // SERVICES_UI_WS_TEST_UTILS_H_ 703 #endif // SERVICES_UI_WS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698