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

Side by Side Diff: views/widget/native_widget_aura.cc

Issue 8468029: Fix NWAura to use property to get restored bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/window.h ('k') | views/widget/widget_unittest.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/native_widget_aura.h" 5 #include "views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/desktop.h" 9 #include "ui/aura/desktop.h"
10 #include "ui/aura/desktop_observer.h" 10 #include "ui/aura/desktop_observer.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { 318 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const {
319 return window_->GetScreenBounds(); 319 return window_->GetScreenBounds();
320 } 320 }
321 321
322 gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const { 322 gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const {
323 // In Aura, the entire window is the client area. 323 // In Aura, the entire window is the client area.
324 return window_->GetScreenBounds(); 324 return window_->GetScreenBounds();
325 } 325 }
326 326
327 gfx::Rect NativeWidgetAura::GetRestoredBounds() const { 327 gfx::Rect NativeWidgetAura::GetRestoredBounds() const {
328 return window_->restore_bounds(); 328 gfx::Rect* restore_bounds = reinterpret_cast<gfx::Rect*>(
329 window_->GetProperty(aura::kRestoreBoundsKey));
330 return restore_bounds ? *restore_bounds : window_->bounds();
329 } 331 }
330 332
331 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) { 333 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
332 window_->SetBounds(bounds); 334 window_->SetBounds(bounds);
333 } 335 }
334 336
335 void NativeWidgetAura::SetSize(const gfx::Size& size) { 337 void NativeWidgetAura::SetSize(const gfx::Size& size) {
336 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size)); 338 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size));
337 } 339 }
338 340
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 NOTIMPLEMENTED(); 724 NOTIMPLEMENTED();
723 } 725 }
724 726
725 // static 727 // static
726 bool NativeWidgetPrivate::IsMouseButtonDown() { 728 bool NativeWidgetPrivate::IsMouseButtonDown() {
727 return aura::Desktop::GetInstance()->IsMouseButtonDown(); 729 return aura::Desktop::GetInstance()->IsMouseButtonDown();
728 } 730 }
729 731
730 } // namespace internal 732 } // namespace internal
731 } // namespace views 733 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698