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

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

Issue 1746013002: Hide/show widget on Windows screen lock/unlock Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 4 years, 9 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/widget/widget.h ('k') | ui/views/win/hwnd_message_handler.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) 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/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 void Widget::OnNativeWidgetVisibilityChanged(bool visible) { 1061 void Widget::OnNativeWidgetVisibilityChanged(bool visible) {
1062 View* root = GetRootView(); 1062 View* root = GetRootView();
1063 if (root) 1063 if (root)
1064 root->PropagateVisibilityNotifications(root, visible); 1064 root->PropagateVisibilityNotifications(root, visible);
1065 FOR_EACH_OBSERVER(WidgetObserver, observers_, 1065 FOR_EACH_OBSERVER(WidgetObserver, observers_,
1066 OnWidgetVisibilityChanged(this, visible)); 1066 OnWidgetVisibilityChanged(this, visible));
1067 if (GetCompositor() && root && root->layer()) 1067 if (GetCompositor() && root && root->layer())
1068 root->layer()->SetVisible(visible); 1068 root->layer()->SetVisible(visible);
1069 } 1069 }
1070 1070
1071 void Widget::OnSoftVisibilityChanged(bool visible) {
1072 if (View* root = GetRootView())
1073 root->PropagateSoftVisibilityChanged(visible);
1074 }
1075
1071 void Widget::OnNativeWidgetCreated(bool desktop_widget) { 1076 void Widget::OnNativeWidgetCreated(bool desktop_widget) {
1072 if (is_top_level()) 1077 if (is_top_level())
1073 focus_manager_.reset(FocusManagerFactory::Create(this, desktop_widget)); 1078 focus_manager_.reset(FocusManagerFactory::Create(this, desktop_widget));
1074 1079
1075 native_widget_->InitModalType(widget_delegate_->GetModalType()); 1080 native_widget_->InitModalType(widget_delegate_->GetModalType());
1076 1081
1077 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetCreated(this)); 1082 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetCreated(this));
1078 } 1083 }
1079 1084
1080 void Widget::OnNativeWidgetDestroying() { 1085 void Widget::OnNativeWidgetDestroying() {
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1496
1492 //////////////////////////////////////////////////////////////////////////////// 1497 ////////////////////////////////////////////////////////////////////////////////
1493 // internal::NativeWidgetPrivate, NativeWidget implementation: 1498 // internal::NativeWidgetPrivate, NativeWidget implementation:
1494 1499
1495 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1500 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1496 return this; 1501 return this;
1497 } 1502 }
1498 1503
1499 } // namespace internal 1504 } // namespace internal
1500 } // namespace views 1505 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | ui/views/win/hwnd_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698