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

Side by Side Diff: components/mus/public/cpp/tests/window_server_test_base.cc

Issue 2060513002: Tab dragging as implemented as a mus API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Thread move loop source through api. 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/public/cpp/tests/window_server_test_base.h" 5 #include "components/mus/public/cpp/tests/window_server_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const display::Display& display) { 130 const display::Display& display) {
131 if (window_manager_delegate_) 131 if (window_manager_delegate_)
132 window_manager_delegate_->OnWmNewDisplay(window, display); 132 window_manager_delegate_->OnWmNewDisplay(window, display);
133 } 133 }
134 134
135 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) { 135 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) {
136 if (window_manager_delegate_) 136 if (window_manager_delegate_)
137 window_manager_delegate_->OnAccelerator(id, event); 137 window_manager_delegate_->OnAccelerator(id, event);
138 } 138 }
139 139
140 void WindowServerTestBase::OnWmPerformMoveLoop(
141 ::mus::Window* window,
142 ::mus::mojom::MoveLoopSource source,
143 const gfx::Point& cursor_location,
144 const base::Callback<void(bool)>& on_done) {
145 if (window_manager_delegate_) {
146 window_manager_delegate_->OnWmPerformMoveLoop(window, source,
147 cursor_location, on_done);
148 }
149 }
150
151 void WindowServerTestBase::OnWmCancelMoveLoop(::mus::Window* window) {
152 if (window_manager_delegate_)
153 window_manager_delegate_->OnWmCancelMoveLoop(window);
154 }
155
140 void WindowServerTestBase::Create(shell::Connection* connection, 156 void WindowServerTestBase::Create(shell::Connection* connection,
141 mojom::WindowTreeClientRequest request) { 157 mojom::WindowTreeClientRequest request) {
142 new WindowTreeClient(this, nullptr, std::move(request)); 158 new WindowTreeClient(this, nullptr, std::move(request));
143 } 159 }
144 160
145 } // namespace mus 161 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698