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 "views/widget/native_widget_views.h" | 5 #include "views/widget/native_widget_views.h" |
6 | 6 |
7 #include "ui/gfx/compositor/compositor.h" | 7 #include "ui/gfx/compositor/compositor.h" |
8 #include "views/desktop/desktop_window_view.h" | 8 #include "views/desktop/desktop_window_view.h" |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 #include "views/views_delegate.h" | 10 #include "views/views_delegate.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 176 } |
177 | 177 |
178 const ui::Compositor* NativeWidgetViews::GetCompositor() const { | 178 const ui::Compositor* NativeWidgetViews::GetCompositor() const { |
179 return hosting_widget_->GetCompositor(); | 179 return hosting_widget_->GetCompositor(); |
180 } | 180 } |
181 | 181 |
182 ui::Compositor* NativeWidgetViews::GetCompositor() { | 182 ui::Compositor* NativeWidgetViews::GetCompositor() { |
183 return hosting_widget_->GetCompositor(); | 183 return hosting_widget_->GetCompositor(); |
184 } | 184 } |
185 | 185 |
186 void NativeWidgetViews::MarkLayerDirty() { | 186 void NativeWidgetViews::CalculateOffsetToAncestorWithLayer( |
187 view_->MarkLayerDirty(); | 187 gfx::Point* offset, |
188 } | 188 ui::Layer** layer_parent) { |
189 | 189 view_->CalculateOffsetToAncestorWithLayer(offset, layer_parent); |
190 void NativeWidgetViews::CalculateOffsetToAncestorWithLayer(gfx::Point* offset, | |
191 View** ancestor) { | |
192 view_->CalculateOffsetToAncestorWithLayer(offset, ancestor); | |
193 } | 190 } |
194 | 191 |
195 void NativeWidgetViews::ViewRemoved(View* view) { | 192 void NativeWidgetViews::ViewRemoved(View* view) { |
196 internal::NativeWidgetPrivate* parent = GetParentNativeWidget(); | 193 internal::NativeWidgetPrivate* parent = GetParentNativeWidget(); |
197 if (parent) | 194 if (parent) |
198 parent->ViewRemoved(view); | 195 parent->ViewRemoved(view); |
199 } | 196 } |
200 | 197 |
201 void NativeWidgetViews::SetNativeWindowProperty(const char* name, void* value) { | 198 void NativeWidgetViews::SetNativeWindowProperty(const char* name, void* value) { |
202 if (value) | 199 if (value) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 return false; | 460 return false; |
464 } | 461 } |
465 | 462 |
466 void NativeWidgetViews::RunShellDrag(View* view, | 463 void NativeWidgetViews::RunShellDrag(View* view, |
467 const ui::OSExchangeData& data, | 464 const ui::OSExchangeData& data, |
468 int operation) { | 465 int operation) { |
469 GetParentNativeWidget()->RunShellDrag(view, data, operation); | 466 GetParentNativeWidget()->RunShellDrag(view, data, operation); |
470 } | 467 } |
471 | 468 |
472 void NativeWidgetViews::SchedulePaintInRect(const gfx::Rect& rect) { | 469 void NativeWidgetViews::SchedulePaintInRect(const gfx::Rect& rect) { |
473 view_->SchedulePaintInternal(rect); | 470 view_->SchedulePaintInRect(rect); |
474 } | 471 } |
475 | 472 |
476 void NativeWidgetViews::SetCursor(gfx::NativeCursor cursor) { | 473 void NativeWidgetViews::SetCursor(gfx::NativeCursor cursor) { |
477 view_->set_cursor(cursor); | 474 view_->set_cursor(cursor); |
478 GetParentNativeWidget()->SetCursor(cursor); | 475 GetParentNativeWidget()->SetCursor(cursor); |
479 } | 476 } |
480 | 477 |
481 void NativeWidgetViews::ClearNativeFocus() { | 478 void NativeWidgetViews::ClearNativeFocus() { |
482 GetParentNativeWidget()->ClearNativeFocus(); | 479 GetParentNativeWidget()->ClearNativeFocus(); |
483 } | 480 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 516 |
520 const internal::NativeWidgetPrivate* | 517 const internal::NativeWidgetPrivate* |
521 NativeWidgetViews::GetParentNativeWidget() const { | 518 NativeWidgetViews::GetParentNativeWidget() const { |
522 const Widget* containing_widget = view_ ? view_->GetWidget() : NULL; | 519 const Widget* containing_widget = view_ ? view_->GetWidget() : NULL; |
523 return containing_widget ? static_cast<const internal::NativeWidgetPrivate*>( | 520 return containing_widget ? static_cast<const internal::NativeWidgetPrivate*>( |
524 containing_widget->native_widget()) : | 521 containing_widget->native_widget()) : |
525 NULL; | 522 NULL; |
526 } | 523 } |
527 | 524 |
528 } // namespace views | 525 } // namespace views |
OLD | NEW |