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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 } | 929 } |
930 | 930 |
931 bool DesktopNativeWidgetAura::IsTranslucentWindowOpacitySupported() const { | 931 bool DesktopNativeWidgetAura::IsTranslucentWindowOpacitySupported() const { |
932 return content_window_ && | 932 return content_window_ && |
933 desktop_window_tree_host_->IsTranslucentWindowOpacitySupported(); | 933 desktop_window_tree_host_->IsTranslucentWindowOpacitySupported(); |
934 } | 934 } |
935 | 935 |
936 void DesktopNativeWidgetAura::OnSizeConstraintsChanged() { | 936 void DesktopNativeWidgetAura::OnSizeConstraintsChanged() { |
937 content_window_->SetProperty(aura::client::kCanMaximizeKey, | 937 content_window_->SetProperty(aura::client::kCanMaximizeKey, |
938 GetWidget()->widget_delegate()->CanMaximize()); | 938 GetWidget()->widget_delegate()->CanMaximize()); |
939 content_window_->SetProperty(aura::client::kCanMinimizeKey, | |
940 GetWidget()->widget_delegate()->CanMinimize()); | |
941 content_window_->SetProperty(aura::client::kCanResizeKey, | 939 content_window_->SetProperty(aura::client::kCanResizeKey, |
942 GetWidget()->widget_delegate()->CanResize()); | 940 GetWidget()->widget_delegate()->CanResize()); |
943 desktop_window_tree_host_->SizeConstraintsChanged(); | 941 desktop_window_tree_host_->SizeConstraintsChanged(); |
944 } | 942 } |
945 | 943 |
946 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { | 944 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { |
947 OnEvent(native_event); | 945 OnEvent(native_event); |
948 } | 946 } |
949 | 947 |
950 //////////////////////////////////////////////////////////////////////////////// | 948 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 if (cursor_reference_count_ == 0) { | 1209 if (cursor_reference_count_ == 0) { |
1212 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1210 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1213 // for cleaning up |cursor_manager_|. | 1211 // for cleaning up |cursor_manager_|. |
1214 delete cursor_manager_; | 1212 delete cursor_manager_; |
1215 native_cursor_manager_ = NULL; | 1213 native_cursor_manager_ = NULL; |
1216 cursor_manager_ = NULL; | 1214 cursor_manager_ = NULL; |
1217 } | 1215 } |
1218 } | 1216 } |
1219 | 1217 |
1220 } // namespace views | 1218 } // namespace views |
OLD | NEW |