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

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

Issue 8202026: views: Some more layer change, and add/update some tests for layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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
« ui/aura/window.cc ('K') | « views/widget/native_widget_gtk.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) 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/widget.h" 5 #include "views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/l10n/l10n_font_util.h" 10 #include "ui/base/l10n/l10n_font_util.h"
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(focused_view, 863 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(focused_view,
864 GetNativeView()); 864 GetNativeView());
865 } 865 }
866 866
867 void Widget::OnNativeBlur(gfx::NativeView focused_view) { 867 void Widget::OnNativeBlur(gfx::NativeView focused_view) {
868 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(GetNativeView(), 868 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(GetNativeView(),
869 focused_view); 869 focused_view);
870 } 870 }
871 871
872 void Widget::OnNativeWidgetVisibilityChanged(bool visible) { 872 void Widget::OnNativeWidgetVisibilityChanged(bool visible) {
873 GetRootView()->PropagateVisibilityNotifications(GetRootView(), visible); 873 View* root = GetRootView();
874 root->PropagateVisibilityNotifications(root, visible);
874 FOR_EACH_OBSERVER(Observer, observers_, 875 FOR_EACH_OBSERVER(Observer, observers_,
875 OnWidgetVisibilityChanged(this, visible)); 876 OnWidgetVisibilityChanged(this, visible));
877 if (GetCompositor() && root->layer())
878 root->layer()->SetVisible(visible);
876 } 879 }
877 880
878 void Widget::OnNativeWidgetCreated() { 881 void Widget::OnNativeWidgetCreated() {
879 if (is_top_level()) 882 if (is_top_level())
880 focus_manager_.reset(FocusManagerFactory::Create(this)); 883 focus_manager_.reset(FocusManagerFactory::Create(this));
881 884
882 native_widget_->SetAccessibleRole( 885 native_widget_->SetAccessibleRole(
883 widget_delegate_->GetAccessibleWindowRole()); 886 widget_delegate_->GetAccessibleWindowRole());
884 native_widget_->SetAccessibleState( 887 native_widget_->SetAccessibleState(
885 widget_delegate_->GetAccessibleWindowState()); 888 widget_delegate_->GetAccessibleWindowState());
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1186
1184 //////////////////////////////////////////////////////////////////////////////// 1187 ////////////////////////////////////////////////////////////////////////////////
1185 // internal::NativeWidgetPrivate, NativeWidget implementation: 1188 // internal::NativeWidgetPrivate, NativeWidget implementation:
1186 1189
1187 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1190 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1188 return this; 1191 return this;
1189 } 1192 }
1190 1193
1191 } // namespace internal 1194 } // namespace internal
1192 } // namespace views 1195 } // namespace views
OLDNEW
« ui/aura/window.cc ('K') | « views/widget/native_widget_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698