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

Side by Side Diff: ash/aura/wm_window_aura.cc

Issue 2095793002: Convert determining restore bounds to use ash/common type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak Created 4 years, 6 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 | « no previous file | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('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 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 "ash/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 6
7 #include "ash/aura/aura_layout_manager_adapter.h" 7 #include "ash/aura/aura_layout_manager_adapter.h"
8 #include "ash/aura/wm_root_window_controller_aura.h" 8 #include "ash/aura/wm_root_window_controller_aura.h"
9 #include "ash/aura/wm_shell_aura.h" 9 #include "ash/aura/wm_shell_aura.h"
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 void WmWindowAura::ClearRestoreBounds() { 421 void WmWindowAura::ClearRestoreBounds() {
422 window_->ClearProperty(aura::client::kRestoreBoundsKey); 422 window_->ClearProperty(aura::client::kRestoreBoundsKey);
423 } 423 }
424 424
425 void WmWindowAura::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { 425 void WmWindowAura::SetRestoreBoundsInScreen(const gfx::Rect& bounds) {
426 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); 426 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds));
427 } 427 }
428 428
429 gfx::Rect WmWindowAura::GetRestoreBoundsInScreen() const { 429 gfx::Rect WmWindowAura::GetRestoreBoundsInScreen() const {
430 return *window_->GetProperty(aura::client::kRestoreBoundsKey); 430 gfx::Rect* bounds = window_->GetProperty(aura::client::kRestoreBoundsKey);
431 return bounds ? *bounds : gfx::Rect();
431 } 432 }
432 433
433 bool WmWindowAura::Contains(const WmWindow* other) const { 434 bool WmWindowAura::Contains(const WmWindow* other) const {
434 return other 435 return other
435 ? window_->Contains( 436 ? window_->Contains(
436 static_cast<const WmWindowAura*>(other)->window_) 437 static_cast<const WmWindowAura*>(other)->window_)
437 : false; 438 : false;
438 } 439 }
439 440
440 void WmWindowAura::SetShowState(ui::WindowShowState show_state) { 441 void WmWindowAura::SetShowState(ui::WindowShowState show_state) {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 bool visible) { 699 bool visible) {
699 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 700 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
700 OnWindowVisibilityChanging(this, visible)); 701 OnWindowVisibilityChanging(this, visible));
701 } 702 }
702 703
703 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { 704 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) {
704 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); 705 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this));
705 } 706 }
706 707
707 } // namespace ash 708 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698