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

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

Issue 2568303006: aura-mus: Implement Deactivate(). (Closed)
Patch Set: Prune comments and other debugging gunk. Created 3 years, 11 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 #include <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 mojom::MoveLoopSource source, 160 mojom::MoveLoopSource source,
161 const gfx::Point& cursor_location, 161 const gfx::Point& cursor_location,
162 const base::Callback<void(bool)>& on_done) override { 162 const base::Callback<void(bool)>& on_done) override {
163 // Don't care. 163 // Don't care.
164 } 164 }
165 void OnWmCancelMoveLoop(aura::Window* window) override {} 165 void OnWmCancelMoveLoop(aura::Window* window) override {}
166 void OnWmSetClientArea( 166 void OnWmSetClientArea(
167 aura::Window* window, 167 aura::Window* window,
168 const gfx::Insets& insets, 168 const gfx::Insets& insets,
169 const std::vector<gfx::Rect>& additional_client_areas) override {} 169 const std::vector<gfx::Rect>& additional_client_areas) override {}
170 void OnWmDeactivateWindow(aura::Window* window) override {
171 aura::client::GetFocusClient(root_)->FocusWindow(nullptr);
172 }
170 173
171 std::unique_ptr<display::ScreenBase> screen_; 174 std::unique_ptr<display::ScreenBase> screen_;
172 175
173 std::unique_ptr<aura::Env> aura_env_; 176 std::unique_ptr<aura::Env> aura_env_;
174 ::wm::WMState wm_state_; 177 ::wm::WMState wm_state_;
175 aura::PropertyConverter property_converter_; 178 aura::PropertyConverter property_converter_;
176 aura::test::TestFocusClient focus_client_; 179 aura::test::TestFocusClient focus_client_;
177 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_; 180 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_;
178 aura::Window* root_ = nullptr; 181 aura::Window* root_ = nullptr;
179 aura::WindowManagerClient* window_manager_client_ = nullptr; 182 aura::WindowManagerClient* window_manager_client_ = nullptr;
180 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; 183 std::unique_ptr<aura::WindowTreeClient> window_tree_client_;
181 std::unique_ptr<ui::Gpu> gpu_; 184 std::unique_ptr<ui::Gpu> gpu_;
182 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; 185 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_;
183 186
184 bool started_ = false; 187 bool started_ = false;
185 188
186 DISALLOW_COPY_AND_ASSIGN(TestWM); 189 DISALLOW_COPY_AND_ASSIGN(TestWM);
187 }; 190 };
188 191
189 } // namespace test 192 } // namespace test
190 } // namespace ui 193 } // namespace ui
191 194
192 MojoResult ServiceMain(MojoHandle service_request_handle) { 195 MojoResult ServiceMain(MojoHandle service_request_handle) {
193 service_manager::ServiceRunner runner(new ui::test::TestWM); 196 service_manager::ServiceRunner runner(new ui::test::TestWM);
194 return runner.Run(service_request_handle); 197 return runner.Run(service_request_handle);
195 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698