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

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
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 ui::Compositor* compositor = GetCompositor();
878 if (compositor && root->layer())
Ben Goodger (Google) 2011/10/09 20:03:51 if (GetCompositor() && root->layer())
sadrul 2011/10/10 00:02:18 Done.
879 root->layer()->SetVisible(visible);
876 } 880 }
877 881
878 void Widget::OnNativeWidgetCreated() { 882 void Widget::OnNativeWidgetCreated() {
879 if (is_top_level()) 883 if (is_top_level())
880 focus_manager_.reset(FocusManagerFactory::Create(this)); 884 focus_manager_.reset(FocusManagerFactory::Create(this));
881 885
882 native_widget_->SetAccessibleRole( 886 native_widget_->SetAccessibleRole(
883 widget_delegate_->GetAccessibleWindowRole()); 887 widget_delegate_->GetAccessibleWindowRole());
884 native_widget_->SetAccessibleState( 888 native_widget_->SetAccessibleState(
885 widget_delegate_->GetAccessibleWindowState()); 889 widget_delegate_->GetAccessibleWindowState());
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1187
1184 //////////////////////////////////////////////////////////////////////////////// 1188 ////////////////////////////////////////////////////////////////////////////////
1185 // internal::NativeWidgetPrivate, NativeWidget implementation: 1189 // internal::NativeWidgetPrivate, NativeWidget implementation:
1186 1190
1187 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1191 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1188 return this; 1192 return this;
1189 } 1193 }
1190 1194
1191 } // namespace internal 1195 } // namespace internal
1192 } // namespace views 1196 } // namespace views
OLDNEW
« views/controls/native_control_gtk.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