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

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

Issue 2548513002: Update bool WindowManager::OnWmSetBounds() to match with its desirable behavior. (Closed)
Patch Set: revert ui::window to aura::window. 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 "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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 aura::PropertyConverter* WindowManager::GetPropertyConverter() { 363 aura::PropertyConverter* WindowManager::GetPropertyConverter() {
364 return property_converter_.get(); 364 return property_converter_.get();
365 } 365 }
366 366
367 void WindowManager::SetWindowManagerClient(aura::WindowManagerClient* client) { 367 void WindowManager::SetWindowManagerClient(aura::WindowManagerClient* client) {
368 window_manager_client_ = client; 368 window_manager_client_ = client;
369 } 369 }
370 370
371 bool WindowManager::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) { 371 void WindowManager::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) {
372 // TODO(sky): this indirectly sets bounds, which is against what 372 // TODO(sky): this indirectly sets bounds, which is against what
373 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this. 373 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this.
374 WmWindowMus::Get(window)->SetBounds(*bounds); 374 WmWindowMus::Get(window)->SetBounds(*bounds);
375 *bounds = window->bounds(); 375 *bounds = window->bounds();
376 return true;
377 } 376 }
378 377
379 bool WindowManager::OnWmSetProperty( 378 bool WindowManager::OnWmSetProperty(
380 aura::Window* window, 379 aura::Window* window,
381 const std::string& name, 380 const std::string& name,
382 std::unique_ptr<std::vector<uint8_t>>* new_data) { 381 std::unique_ptr<std::vector<uint8_t>>* new_data) {
383 // TODO(sky): constrain this to set of keys we know about, and allowed values. 382 // TODO(sky): constrain this to set of keys we know about, and allowed values.
384 if (name == ui::mojom::WindowManager::kWindowIgnoredByShelf_Property) { 383 if (name == ui::mojom::WindowManager::kWindowIgnoredByShelf_Property) {
385 wm::WindowState* window_state = 384 wm::WindowState* window_state =
386 static_cast<WmWindow*>(WmWindowMus::Get(window))->GetWindowState(); 385 static_cast<WmWindow*>(WmWindowMus::Get(window))->GetWindowState();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 502
504 void WindowManager::OnWindowInitialized(aura::Window* window) { 503 void WindowManager::OnWindowInitialized(aura::Window* window) {
505 // This ensures WmWindowAura won't be called before WmWindowMus. This is 504 // This ensures WmWindowAura won't be called before WmWindowMus. This is
506 // important as if WmWindowAura::Get() is called first, then WmWindowAura 505 // important as if WmWindowAura::Get() is called first, then WmWindowAura
507 // would be created, not WmWindowMus. 506 // would be created, not WmWindowMus.
508 WmWindowMus::Get(window); 507 WmWindowMus::Get(window);
509 } 508 }
510 509
511 } // namespace mus 510 } // namespace mus
512 } // namespace ash 511 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698