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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2778823002: Simplify WindowManager::OnWmSetBounds (Closed)
Patch Set: Update expectations for DragTestInteractive.DragTest Created 3 years, 8 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 | « ash/mus/window_manager.h ('k') | mash/simple_wm/simple_wm.h » ('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 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 "ash/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 aura::PropertyConverter* WindowManager::GetPropertyConverter() { 310 aura::PropertyConverter* WindowManager::GetPropertyConverter() {
311 return property_converter_.get(); 311 return property_converter_.get();
312 } 312 }
313 313
314 void WindowManager::SetWindowManagerClient(aura::WindowManagerClient* client) { 314 void WindowManager::SetWindowManagerClient(aura::WindowManagerClient* client) {
315 window_manager_client_ = client; 315 window_manager_client_ = client;
316 ash::Shell::set_window_manager_client(client); 316 ash::Shell::set_window_manager_client(client);
317 } 317 }
318 318
319 bool WindowManager::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) { 319 void WindowManager::OnWmSetBounds(aura::Window* window,
320 const gfx::Rect& bounds) {
320 // TODO(sky): this indirectly sets bounds, which is against what 321 // TODO(sky): this indirectly sets bounds, which is against what
321 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this. 322 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this.
322 WmWindow::Get(window)->SetBounds(*bounds); 323 WmWindow::Get(window)->SetBounds(bounds);
323 *bounds = window->bounds();
324 return true;
325 } 324 }
326 325
327 bool WindowManager::OnWmSetProperty( 326 bool WindowManager::OnWmSetProperty(
328 aura::Window* window, 327 aura::Window* window,
329 const std::string& name, 328 const std::string& name,
330 std::unique_ptr<std::vector<uint8_t>>* new_data) { 329 std::unique_ptr<std::vector<uint8_t>>* new_data) {
331 if (property_converter_->IsTransportNameRegistered(name)) 330 if (property_converter_->IsTransportNameRegistered(name))
332 return true; 331 return true;
333 DVLOG(1) << "unknown property changed, ignoring " << name; 332 DVLOG(1) << "unknown property changed, ignoring " << name;
334 return false; 333 return false;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 bool WindowManager::IsWindowActive(aura::Window* window) { 530 bool WindowManager::IsWindowActive(aura::Window* window) {
532 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; 531 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window;
533 } 532 }
534 533
535 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 534 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
536 Shell::GetInstance()->activation_client()->DeactivateWindow(window); 535 Shell::GetInstance()->activation_client()->DeactivateWindow(window);
537 } 536 }
538 537
539 } // namespace mus 538 } // namespace mus
540 } // namespace ash 539 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.h ('k') | mash/simple_wm/simple_wm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698