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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_change_observer.h" | 10 #include "ui/aura/client/activation_change_observer.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); | 230 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); |
231 if (params.type != Widget::InitParams::TYPE_TOOLTIP && | 231 if (params.type != Widget::InitParams::TYPE_TOOLTIP && |
232 params.type != Widget::InitParams::TYPE_POPUP) { | 232 params.type != Widget::InitParams::TYPE_POPUP) { |
233 aura::client::SetDragDropDelegate(window_, this); | 233 aura::client::SetDragDropDelegate(window_, this); |
234 } | 234 } |
235 | 235 |
236 aura::client::SetActivationDelegate(window_, this); | 236 aura::client::SetActivationDelegate(window_, this); |
237 | 237 |
238 if (desktop_helper_.get()) | 238 if (desktop_helper_.get()) |
239 desktop_helper_->PostInitialize(); | 239 desktop_helper_->PostInitialize(); |
| 240 |
| 241 window_->SetProperty(aura::client::kCanMaximizeKey, |
| 242 GetWidget()->widget_delegate()->CanMaximize()); |
240 } | 243 } |
241 | 244 |
242 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 245 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
243 return NULL; | 246 return NULL; |
244 } | 247 } |
245 | 248 |
246 bool NativeWidgetAura::ShouldUseNativeFrame() const { | 249 bool NativeWidgetAura::ShouldUseNativeFrame() const { |
247 // There is only one frame type for aura. | 250 // There is only one frame type for aura. |
248 return false; | 251 return false; |
249 } | 252 } |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 return aura::Env::GetInstance()->is_mouse_button_down(); | 1069 return aura::Env::GetInstance()->is_mouse_button_down(); |
1067 } | 1070 } |
1068 | 1071 |
1069 // static | 1072 // static |
1070 bool NativeWidgetPrivate::IsTouchDown() { | 1073 bool NativeWidgetPrivate::IsTouchDown() { |
1071 return aura::Env::GetInstance()->is_touch_down(); | 1074 return aura::Env::GetInstance()->is_touch_down(); |
1072 } | 1075 } |
1073 | 1076 |
1074 } // namespace internal | 1077 } // namespace internal |
1075 } // namespace views | 1078 } // namespace views |
OLD | NEW |