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_client.h" | 10 #include "ui/aura/client/activation_client.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 const ui::Compositor* NativeWidgetAura::GetCompositor() const { | 214 const ui::Compositor* NativeWidgetAura::GetCompositor() const { |
215 return window_->layer()->GetCompositor(); | 215 return window_->layer()->GetCompositor(); |
216 } | 216 } |
217 | 217 |
218 ui::Compositor* NativeWidgetAura::GetCompositor() { | 218 ui::Compositor* NativeWidgetAura::GetCompositor() { |
219 return window_->layer()->GetCompositor(); | 219 return window_->layer()->GetCompositor(); |
220 } | 220 } |
221 | 221 |
222 gfx::Vector2d NativeWidgetAura::CalculateOffsetToAncestorWithLayer( | 222 ui::Layer* NativeWidgetAura::GetLayer() { |
223 ui::Layer** layer_parent) { | 223 return window_->layer(); |
224 if (layer_parent) | |
225 *layer_parent = window_->layer(); | |
226 return gfx::Vector2d(); | |
227 } | 224 } |
228 | 225 |
229 void NativeWidgetAura::ViewRemoved(View* view) { | 226 void NativeWidgetAura::ViewRemoved(View* view) { |
230 DCHECK(drop_helper_.get() != NULL); | 227 DCHECK(drop_helper_.get() != NULL); |
231 drop_helper_->ResetTargetViewIfEquals(view); | 228 drop_helper_->ResetTargetViewIfEquals(view); |
232 } | 229 } |
233 | 230 |
234 void NativeWidgetAura::SetNativeWindowProperty(const char* name, void* value) { | 231 void NativeWidgetAura::SetNativeWindowProperty(const char* name, void* value) { |
235 if (window_) | 232 if (window_) |
236 window_->SetNativeWindowProperty(name, value); | 233 window_->SetNativeWindowProperty(name, value); |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 return aura::Env::GetInstance()->is_mouse_button_down(); | 1032 return aura::Env::GetInstance()->is_mouse_button_down(); |
1036 } | 1033 } |
1037 | 1034 |
1038 // static | 1035 // static |
1039 bool NativeWidgetPrivate::IsTouchDown() { | 1036 bool NativeWidgetPrivate::IsTouchDown() { |
1040 return aura::Env::GetInstance()->is_touch_down(); | 1037 return aura::Env::GetInstance()->is_touch_down(); |
1041 } | 1038 } |
1042 | 1039 |
1043 } // namespace internal | 1040 } // namespace internal |
1044 } // namespace views | 1041 } // namespace views |
OLD | NEW |