| OLD | NEW |
| 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/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 wm_transition = wm::ANIMATE_NONE; | 927 wm_transition = wm::ANIMATE_NONE; |
| 928 break; | 928 break; |
| 929 } | 929 } |
| 930 wm::SetWindowVisibilityAnimationTransition(content_window_, wm_transition); | 930 wm::SetWindowVisibilityAnimationTransition(content_window_, wm_transition); |
| 931 } | 931 } |
| 932 | 932 |
| 933 ui::NativeTheme* DesktopNativeWidgetAura::GetNativeTheme() const { | 933 ui::NativeTheme* DesktopNativeWidgetAura::GetNativeTheme() const { |
| 934 return DesktopWindowTreeHost::GetNativeTheme(content_window_); | 934 return DesktopWindowTreeHost::GetNativeTheme(content_window_); |
| 935 } | 935 } |
| 936 | 936 |
| 937 void DesktopNativeWidgetAura::OnRootViewLayout() { | |
| 938 if (content_window_) | |
| 939 desktop_window_tree_host_->OnRootViewLayout(); | |
| 940 } | |
| 941 | |
| 942 bool DesktopNativeWidgetAura::IsTranslucentWindowOpacitySupported() const { | 937 bool DesktopNativeWidgetAura::IsTranslucentWindowOpacitySupported() const { |
| 943 return content_window_ && | 938 return content_window_ && |
| 944 desktop_window_tree_host_->IsTranslucentWindowOpacitySupported(); | 939 desktop_window_tree_host_->IsTranslucentWindowOpacitySupported(); |
| 945 } | 940 } |
| 946 | 941 |
| 947 void DesktopNativeWidgetAura::OnSizeConstraintsChanged() { | 942 void DesktopNativeWidgetAura::OnSizeConstraintsChanged() { |
| 948 content_window_->SetProperty(aura::client::kCanMaximizeKey, | 943 content_window_->SetProperty(aura::client::kCanMaximizeKey, |
| 949 GetWidget()->widget_delegate()->CanMaximize()); | 944 GetWidget()->widget_delegate()->CanMaximize()); |
| 950 content_window_->SetProperty(aura::client::kCanMinimizeKey, | 945 content_window_->SetProperty(aura::client::kCanMinimizeKey, |
| 951 GetWidget()->widget_delegate()->CanMinimize()); | 946 GetWidget()->widget_delegate()->CanMinimize()); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 if (cursor_reference_count_ == 0) { | 1186 if (cursor_reference_count_ == 0) { |
| 1192 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1187 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1193 // for cleaning up |cursor_manager_|. | 1188 // for cleaning up |cursor_manager_|. |
| 1194 delete cursor_manager_; | 1189 delete cursor_manager_; |
| 1195 native_cursor_manager_ = NULL; | 1190 native_cursor_manager_ = NULL; |
| 1196 cursor_manager_ = NULL; | 1191 cursor_manager_ = NULL; |
| 1197 } | 1192 } |
| 1198 } | 1193 } |
| 1199 | 1194 |
| 1200 } // namespace views | 1195 } // namespace views |
| OLD | NEW |