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()); | |
oshima
2014/09/30 16:43:07
q: is this used in desktop aura?
pkotwicz
2014/10/01 14:45:03
It is not used in desktop aura, but it makes sense
oshima
2014/10/01 17:26:55
If it's not used, I'd recommend to add TODO instea
sky
2014/10/01 20:00:27
Depends upon what you mean by used. kCanMinimizeKe
| |
939 content_window_->SetProperty(aura::client::kCanResizeKey, | 941 content_window_->SetProperty(aura::client::kCanResizeKey, |
940 GetWidget()->widget_delegate()->CanResize()); | 942 GetWidget()->widget_delegate()->CanResize()); |
941 desktop_window_tree_host_->SizeConstraintsChanged(); | 943 desktop_window_tree_host_->SizeConstraintsChanged(); |
942 } | 944 } |
943 | 945 |
944 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { | 946 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { |
945 OnEvent(native_event); | 947 OnEvent(native_event); |
946 } | 948 } |
947 | 949 |
948 //////////////////////////////////////////////////////////////////////////////// | 950 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1209 if (cursor_reference_count_ == 0) { | 1211 if (cursor_reference_count_ == 0) { |
1210 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1212 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1211 // for cleaning up |cursor_manager_|. | 1213 // for cleaning up |cursor_manager_|. |
1212 delete cursor_manager_; | 1214 delete cursor_manager_; |
1213 native_cursor_manager_ = NULL; | 1215 native_cursor_manager_ = NULL; |
1214 cursor_manager_ = NULL; | 1216 cursor_manager_ = NULL; |
1215 } | 1217 } |
1216 } | 1218 } |
1217 | 1219 |
1218 } // namespace views | 1220 } // namespace views |
OLD | NEW |