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

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

Issue 99553008: Fix regression where the active window header was not used for apps on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/window/non_client_view.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/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 993
994 void Widget::OnNativeWidgetActivationChanged(bool active) { 994 void Widget::OnNativeWidgetActivationChanged(bool active) {
995 // On windows we may end up here before we've completed initialization (from 995 // On windows we may end up here before we've completed initialization (from
996 // an WM_NCACTIVATE). If that happens the WidgetDelegate likely doesn't know 996 // an WM_NCACTIVATE). If that happens the WidgetDelegate likely doesn't know
997 // the Widget and will crash attempting to access it. 997 // the Widget and will crash attempting to access it.
998 if (!active && native_widget_initialized_) 998 if (!active && native_widget_initialized_)
999 SaveWindowPlacement(); 999 SaveWindowPlacement();
1000 1000
1001 FOR_EACH_OBSERVER(WidgetObserver, observers_, 1001 FOR_EACH_OBSERVER(WidgetObserver, observers_,
1002 OnWidgetActivationChanged(this, active)); 1002 OnWidgetActivationChanged(this, active));
1003
1004 if (IsVisible() && non_client_view())
1005 non_client_view()->frame_view()->SchedulePaint();
1003 } 1006 }
1004 1007
1005 void Widget::OnNativeFocus(gfx::NativeView old_focused_view) { 1008 void Widget::OnNativeFocus(gfx::NativeView old_focused_view) {
1006 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(old_focused_view, 1009 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(old_focused_view,
1007 GetNativeView()); 1010 GetNativeView());
1008 } 1011 }
1009 1012
1010 void Widget::OnNativeBlur(gfx::NativeView new_focused_view) { 1013 void Widget::OnNativeBlur(gfx::NativeView new_focused_view) {
1011 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(GetNativeView(), 1014 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(GetNativeView(),
1012 new_focused_view); 1015 new_focused_view);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 1424
1422 //////////////////////////////////////////////////////////////////////////////// 1425 ////////////////////////////////////////////////////////////////////////////////
1423 // internal::NativeWidgetPrivate, NativeWidget implementation: 1426 // internal::NativeWidgetPrivate, NativeWidget implementation:
1424 1427
1425 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1428 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1426 return this; 1429 return this;
1427 } 1430 }
1428 1431
1429 } // namespace internal 1432 } // namespace internal
1430 } // namespace views 1433 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698