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

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

Issue 22394003: Maximize window in the display to be restored. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check null Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_unittest.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 void NativeWidgetAura::Show() { 436 void NativeWidgetAura::Show() {
437 ShowWithWindowState(ui::SHOW_STATE_INACTIVE); 437 ShowWithWindowState(ui::SHOW_STATE_INACTIVE);
438 } 438 }
439 439
440 void NativeWidgetAura::Hide() { 440 void NativeWidgetAura::Hide() {
441 window_->Hide(); 441 window_->Hide();
442 } 442 }
443 443
444 void NativeWidgetAura::ShowMaximizedWithBounds( 444 void NativeWidgetAura::ShowMaximizedWithBounds(
445 const gfx::Rect& restored_bounds) { 445 const gfx::Rect& restored_bounds) {
446 SetRestoreBounds(window_, restored_bounds);
446 ShowWithWindowState(ui::SHOW_STATE_MAXIMIZED); 447 ShowWithWindowState(ui::SHOW_STATE_MAXIMIZED);
447 SetRestoreBounds(window_, restored_bounds);
448 } 448 }
449 449
450 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { 450 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
451 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN) 451 if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN)
452 window_->SetProperty(aura::client::kShowStateKey, state); 452 window_->SetProperty(aura::client::kShowStateKey, state);
453 window_->Show(); 453 window_->Show();
454 if (can_activate_) { 454 if (can_activate_) {
455 if (state != ui::SHOW_STATE_INACTIVE) 455 if (state != ui::SHOW_STATE_INACTIVE)
456 Activate(); 456 Activate();
457 // SetInitialFocus() should be always be called, even for 457 // SetInitialFocus() should be always be called, even for
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 return aura::Env::GetInstance()->is_mouse_button_down(); 1069 return aura::Env::GetInstance()->is_mouse_button_down();
1070 } 1070 }
1071 1071
1072 // static 1072 // static
1073 bool NativeWidgetPrivate::IsTouchDown() { 1073 bool NativeWidgetPrivate::IsTouchDown() {
1074 return aura::Env::GetInstance()->is_touch_down(); 1074 return aura::Env::GetInstance()->is_touch_down();
1075 } 1075 }
1076 1076
1077 } // namespace internal 1077 } // namespace internal
1078 } // namespace views 1078 } // namespace views
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698