| 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/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ui/aura/client/stacking_client.h" | 8 #include "ui/aura/client/stacking_client.h" |
| 9 #include "ui/aura/focus_manager.h" | 9 #include "ui/aura/focus_manager.h" |
| 10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
| 11 #include "ui/aura/root_window_host.h" | 11 #include "ui/aura/root_window_host.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/aura/window_property.h" | 13 #include "ui/aura/window_property.h" |
| 14 #include "ui/base/hit_test.h" | 14 #include "ui/base/hit_test.h" |
| 15 #include "ui/compositor/layer.h" | 15 #include "ui/compositor/layer.h" |
| 16 #include "ui/gfx/canvas.h" | 16 #include "ui/gfx/canvas.h" |
| 17 #include "ui/native_theme/native_theme.h" | 17 #include "ui/native_theme/native_theme.h" |
| 18 #include "ui/views/drag_utils.h" |
| 18 #include "ui/views/ime/input_method.h" | 19 #include "ui/views/ime/input_method.h" |
| 19 #include "ui/views/widget/desktop_aura/desktop_root_window_host.h" | 20 #include "ui/views/widget/desktop_aura/desktop_root_window_host.h" |
| 20 #include "ui/views/widget/native_widget_aura_window_observer.h" | 21 #include "ui/views/widget/native_widget_aura_window_observer.h" |
| 21 #include "ui/views/widget/widget.h" | 22 #include "ui/views/widget/widget.h" |
| 22 #include "ui/views/widget/widget_aura_utils.h" | 23 #include "ui/views/widget/widget_aura_utils.h" |
| 23 | 24 |
| 24 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, | 25 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, |
| 25 views::DesktopNativeWidgetAura*); | 26 views::DesktopNativeWidgetAura*); |
| 26 | 27 |
| 27 namespace views { | 28 namespace views { |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 365 } |
| 365 | 366 |
| 366 void DesktopNativeWidgetAura::FlashFrame(bool flash_frame) { | 367 void DesktopNativeWidgetAura::FlashFrame(bool flash_frame) { |
| 367 desktop_root_window_host_->FlashFrame(flash_frame); | 368 desktop_root_window_host_->FlashFrame(flash_frame); |
| 368 } | 369 } |
| 369 | 370 |
| 370 bool DesktopNativeWidgetAura::IsAccessibleWidget() const { | 371 bool DesktopNativeWidgetAura::IsAccessibleWidget() const { |
| 371 return false; | 372 return false; |
| 372 } | 373 } |
| 373 | 374 |
| 374 void DesktopNativeWidgetAura::RunShellDrag(View* view, | 375 void DesktopNativeWidgetAura::RunShellDrag( |
| 375 const ui::OSExchangeData& data, | 376 View* view, |
| 376 const gfx::Point& location, | 377 const ui::OSExchangeData& data, |
| 377 int operation, | 378 const gfx::Point& location, |
| 378 ui::DragDropTypes::DragEventSource source) { | 379 int operation, |
| 380 ui::DragDropTypes::DragEventSource source) { |
| 381 views::RunShellDrag(window_, data, location, operation, source); |
| 379 } | 382 } |
| 380 | 383 |
| 381 void DesktopNativeWidgetAura::SchedulePaintInRect(const gfx::Rect& rect) { | 384 void DesktopNativeWidgetAura::SchedulePaintInRect(const gfx::Rect& rect) { |
| 382 if (window_) | 385 if (window_) |
| 383 window_->SchedulePaintInRect(rect); | 386 window_->SchedulePaintInRect(rect); |
| 384 } | 387 } |
| 385 | 388 |
| 386 void DesktopNativeWidgetAura::SetCursor(gfx::NativeCursor cursor) { | 389 void DesktopNativeWidgetAura::SetCursor(gfx::NativeCursor cursor) { |
| 387 desktop_root_window_host_->AsRootWindowHost()->SetCursor(cursor); | 390 desktop_root_window_host_->AsRootWindowHost()->SetCursor(cursor); |
| 388 } | 391 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 GetWidget()->non_client_view()->SchedulePaint(); | 595 GetWidget()->non_client_view()->SchedulePaint(); |
| 593 } | 596 } |
| 594 | 597 |
| 595 void DesktopNativeWidgetAura::OnLostActive() { | 598 void DesktopNativeWidgetAura::OnLostActive() { |
| 596 native_widget_delegate_->OnNativeWidgetActivationChanged(false); | 599 native_widget_delegate_->OnNativeWidgetActivationChanged(false); |
| 597 if (IsVisible() && GetWidget()->non_client_view()) | 600 if (IsVisible() && GetWidget()->non_client_view()) |
| 598 GetWidget()->non_client_view()->SchedulePaint(); | 601 GetWidget()->non_client_view()->SchedulePaint(); |
| 599 } | 602 } |
| 600 | 603 |
| 601 } // namespace views | 604 } // namespace views |
| OLD | NEW |