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

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

Issue 118283003: Make Widget::Show() creates active windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more ShowInactive() calls Created 6 years, 11 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 | « ui/views/controls/menu/menu_host.cc ('k') | ui/views/widget/widget.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 (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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 base::Bind(&NativeWidgetAura::CloseNow, 454 base::Bind(&NativeWidgetAura::CloseNow,
455 close_widget_factory_.GetWeakPtr())); 455 close_widget_factory_.GetWeakPtr()));
456 } 456 }
457 } 457 }
458 458
459 void NativeWidgetAura::CloseNow() { 459 void NativeWidgetAura::CloseNow() {
460 delete window_; 460 delete window_;
461 } 461 }
462 462
463 void NativeWidgetAura::Show() { 463 void NativeWidgetAura::Show() {
464 ShowWithWindowState(ui::SHOW_STATE_INACTIVE); 464 ShowWithWindowState(ui::SHOW_STATE_NORMAL);
465 } 465 }
466 466
467 void NativeWidgetAura::Hide() { 467 void NativeWidgetAura::Hide() {
468 if (window_) 468 if (window_)
469 window_->Hide(); 469 window_->Hide();
470 } 470 }
471 471
472 void NativeWidgetAura::ShowMaximizedWithBounds( 472 void NativeWidgetAura::ShowMaximizedWithBounds(
473 const gfx::Rect& restored_bounds) { 473 const gfx::Rect& restored_bounds) {
474 SetRestoreBounds(window_, restored_bounds); 474 SetRestoreBounds(window_, restored_bounds);
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 return aura::Env::GetInstance()->IsMouseButtonDown(); 1143 return aura::Env::GetInstance()->IsMouseButtonDown();
1144 } 1144 }
1145 1145
1146 // static 1146 // static
1147 bool NativeWidgetPrivate::IsTouchDown() { 1147 bool NativeWidgetPrivate::IsTouchDown() {
1148 return aura::Env::GetInstance()->is_touch_down(); 1148 return aura::Env::GetInstance()->is_touch_down();
1149 } 1149 }
1150 1150
1151 } // namespace internal 1151 } // namespace internal
1152 } // namespace views 1152 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_host.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698