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

Side by Side Diff: services/ui/public/cpp/tests/window_server_test_base.cc

Issue 2548513002: Update bool WindowManager::OnWmSetBounds() to match with its desirable behavior. (Closed)
Patch Set: Remove if condition statetment in Window::SetBounds(const gfx::Rect& new_bounds). 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 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 "services/ui/public/cpp/tests/window_server_test_base.h" 5 #include "services/ui/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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DeleteWindowTreeClient(root->window_tree()); 111 DeleteWindowTreeClient(root->window_tree());
112 } 112 }
113 113
114 void WindowServerTestBase::OnPointerEventObserved(const ui::PointerEvent& event, 114 void WindowServerTestBase::OnPointerEventObserved(const ui::PointerEvent& event,
115 Window* target) {} 115 Window* target) {}
116 116
117 void WindowServerTestBase::SetWindowManagerClient(WindowManagerClient* client) { 117 void WindowServerTestBase::SetWindowManagerClient(WindowManagerClient* client) {
118 window_manager_client_ = client; 118 window_manager_client_ = client;
119 } 119 }
120 120
121 bool WindowServerTestBase::OnWmSetBounds(Window* window, gfx::Rect* bounds) { 121 void WindowServerTestBase::OnWmSetBounds(Window* window,
122 return window_manager_delegate_ 122 const gfx::Rect& bounds) {}
123 ? window_manager_delegate_->OnWmSetBounds(window, bounds)
124 : true;
125 }
126 123
127 bool WindowServerTestBase::OnWmSetProperty( 124 bool WindowServerTestBase::OnWmSetProperty(
128 Window* window, 125 Window* window,
129 const std::string& name, 126 const std::string& name,
130 std::unique_ptr<std::vector<uint8_t>>* new_data) { 127 std::unique_ptr<std::vector<uint8_t>>* new_data) {
131 return window_manager_delegate_ 128 return window_manager_delegate_
132 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data) 129 ? window_manager_delegate_->OnWmSetProperty(window, name, new_data)
133 : true; 130 : true;
134 } 131 }
135 132
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 189 }
193 190
194 void WindowServerTestBase::Create( 191 void WindowServerTestBase::Create(
195 const service_manager::Identity& remote_identity, 192 const service_manager::Identity& remote_identity,
196 mojom::WindowTreeClientRequest request) { 193 mojom::WindowTreeClientRequest request) {
197 window_tree_clients_.insert( 194 window_tree_clients_.insert(
198 base::MakeUnique<WindowTreeClient>(this, nullptr, std::move(request))); 195 base::MakeUnique<WindowTreeClient>(this, nullptr, std::move(request)));
199 } 196 }
200 197
201 } // namespace ui 198 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698