| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); | 154 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); |
| 155 if (params.type != Widget::InitParams::TYPE_TOOLTIP && | 155 if (params.type != Widget::InitParams::TYPE_TOOLTIP && |
| 156 params.type != Widget::InitParams::TYPE_POPUP) { | 156 params.type != Widget::InitParams::TYPE_POPUP) { |
| 157 aura::client::SetDragDropDelegate(window_, this); | 157 aura::client::SetDragDropDelegate(window_, this); |
| 158 } | 158 } |
| 159 | 159 |
| 160 aura::client::SetActivationDelegate(window_, this); | 160 aura::client::SetActivationDelegate(window_, this); |
| 161 | 161 |
| 162 window_->SetProperty(aura::client::kCanMaximizeKey, | 162 window_->SetProperty(aura::client::kCanMaximizeKey, |
| 163 GetWidget()->widget_delegate()->CanMaximize()); | 163 GetWidget()->widget_delegate()->CanMaximize()); |
| 164 window_->SetProperty(aura::client::kCanResizeKey, |
| 165 GetWidget()->widget_delegate()->CanResize()); |
| 164 } | 166 } |
| 165 | 167 |
| 166 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 168 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
| 167 return NULL; | 169 return NULL; |
| 168 } | 170 } |
| 169 | 171 |
| 170 bool NativeWidgetAura::ShouldUseNativeFrame() const { | 172 bool NativeWidgetAura::ShouldUseNativeFrame() const { |
| 171 // There is only one frame type for aura. | 173 // There is only one frame type for aura. |
| 172 return false; | 174 return false; |
| 173 } | 175 } |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 return aura::Env::GetInstance()->is_mouse_button_down(); | 1004 return aura::Env::GetInstance()->is_mouse_button_down(); |
| 1003 } | 1005 } |
| 1004 | 1006 |
| 1005 // static | 1007 // static |
| 1006 bool NativeWidgetPrivate::IsTouchDown() { | 1008 bool NativeWidgetPrivate::IsTouchDown() { |
| 1007 return aura::Env::GetInstance()->is_touch_down(); | 1009 return aura::Env::GetInstance()->is_touch_down(); |
| 1008 } | 1010 } |
| 1009 | 1011 |
| 1010 } // namespace internal | 1012 } // namespace internal |
| 1011 } // namespace views | 1013 } // namespace views |
| OLD | NEW |