| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/drag_drop_client.h" | 10 #include "ui/aura/client/drag_drop_client.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 tooltip_manager_.reset(new views::TooltipManagerAura(this)); | 161 tooltip_manager_.reset(new views::TooltipManagerAura(this)); |
| 162 } | 162 } |
| 163 | 163 |
| 164 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); | 164 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); |
| 165 if (params.type != Widget::InitParams::TYPE_TOOLTIP && | 165 if (params.type != Widget::InitParams::TYPE_TOOLTIP && |
| 166 params.type != Widget::InitParams::TYPE_POPUP) { | 166 params.type != Widget::InitParams::TYPE_POPUP) { |
| 167 window_->SetProperty(aura::kDragDropDelegateKey, | 167 window_->SetProperty(aura::kDragDropDelegateKey, |
| 168 static_cast<aura::WindowDragDropDelegate*>(this)); | 168 static_cast<aura::WindowDragDropDelegate*>(this)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 if (window_type == Widget::InitParams::TYPE_MENU) | 171 if (window_type == Widget::InitParams::TYPE_MENU || |
| 172 window_type == Widget::InitParams::TYPE_TOOLTIP) |
| 172 window_->SetIntProperty(aura::kShadowTypeKey, | 173 window_->SetIntProperty(aura::kShadowTypeKey, |
| 173 aura::SHADOW_TYPE_RECTANGULAR); | 174 aura::SHADOW_TYPE_RECTANGULAR); |
| 174 } | 175 } |
| 175 | 176 |
| 176 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 177 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
| 177 return NULL; | 178 return NULL; |
| 178 } | 179 } |
| 179 | 180 |
| 180 void NativeWidgetAura::UpdateFrameAfterFrameChange() { | 181 void NativeWidgetAura::UpdateFrameAfterFrameChange() { |
| 181 // We don't support changing the frame type. | 182 // We don't support changing the frame type. |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 } | 790 } |
| 790 } | 791 } |
| 791 | 792 |
| 792 // static | 793 // static |
| 793 bool NativeWidgetPrivate::IsMouseButtonDown() { | 794 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 794 return aura::Desktop::GetInstance()->IsMouseButtonDown(); | 795 return aura::Desktop::GetInstance()->IsMouseButtonDown(); |
| 795 } | 796 } |
| 796 | 797 |
| 797 } // namespace internal | 798 } // namespace internal |
| 798 } // namespace views | 799 } // namespace views |
| OLD | NEW |