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

Side by Side Diff: services/ui/test_wm/test_wm.cc

Issue 2434923002: Handle modified displays in mustash. (Closed)
Patch Set: Fix PlatformScreenStub for tests. Created 4 years, 2 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
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "mojo/public/cpp/bindings/binding.h" 8 #include "mojo/public/cpp/bindings/binding.h"
9 #include "services/service_manager/public/c/main.h" 9 #include "services/service_manager/public/c/main.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 root_ = window; 83 root_ = window;
84 DCHECK(window_manager_client_); 84 DCHECK(window_manager_client_);
85 window_manager_client_->AddActivationParent(root_); 85 window_manager_client_->AddActivationParent(root_);
86 ui::mojom::FrameDecorationValuesPtr frame_decoration_values = 86 ui::mojom::FrameDecorationValuesPtr frame_decoration_values =
87 ui::mojom::FrameDecorationValues::New(); 87 ui::mojom::FrameDecorationValues::New();
88 frame_decoration_values->max_title_bar_button_width = 0; 88 frame_decoration_values->max_title_bar_button_width = 0;
89 window_manager_client_->SetFrameDecorationValues( 89 window_manager_client_->SetFrameDecorationValues(
90 std::move(frame_decoration_values)); 90 std::move(frame_decoration_values));
91 } 91 }
92 void OnWmDisplayRemoved(ui::Window* window) override { window->Destroy(); } 92 void OnWmDisplayRemoved(ui::Window* window) override { window->Destroy(); }
93 void OnWmDisplayModified(const display::Display& display) override {}
93 void OnWmPerformMoveLoop(Window* window, 94 void OnWmPerformMoveLoop(Window* window,
94 mojom::MoveLoopSource source, 95 mojom::MoveLoopSource source,
95 const gfx::Point& cursor_location, 96 const gfx::Point& cursor_location,
96 const base::Callback<void(bool)>& on_done) override { 97 const base::Callback<void(bool)>& on_done) override {
97 // Don't care. 98 // Don't care.
98 } 99 }
99 void OnWmCancelMoveLoop(Window* window) override {} 100 void OnWmCancelMoveLoop(Window* window) override {}
100 101
101 ui::Window* root_ = nullptr; 102 ui::Window* root_ = nullptr;
102 ui::WindowManagerClient* window_manager_client_ = nullptr; 103 ui::WindowManagerClient* window_manager_client_ = nullptr;
103 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; 104 std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(TestWM); 106 DISALLOW_COPY_AND_ASSIGN(TestWM);
106 }; 107 };
107 108
108 } // namespace test 109 } // namespace test
109 } // namespace ui 110 } // namespace ui
110 111
111 MojoResult ServiceMain(MojoHandle service_request_handle) { 112 MojoResult ServiceMain(MojoHandle service_request_handle) {
112 service_manager::ServiceRunner runner(new ui::test::TestWM); 113 service_manager::ServiceRunner runner(new ui::test::TestWM);
113 return runner.Run(service_request_handle); 114 return runner.Run(service_request_handle);
114 } 115 }
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698