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_native_widget_aura.h" | 5 #include "ui/views/widget/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/base/native_theme/native_theme.h" |
15 #include "ui/compositor/layer.h" | 16 #include "ui/compositor/layer.h" |
16 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
17 #include "ui/views/ime/input_method.h" | 18 #include "ui/views/ime/input_method.h" |
18 #include "ui/views/widget/desktop_root_window_host.h" | 19 #include "ui/views/widget/desktop_root_window_host.h" |
19 #include "ui/views/widget/native_widget_aura_window_observer.h" | 20 #include "ui/views/widget/native_widget_aura_window_observer.h" |
20 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
21 #include "ui/views/widget/widget_aura_utils.h" | 22 #include "ui/views/widget/widget_aura_utils.h" |
22 | 23 |
23 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, | 24 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, |
24 views::DesktopNativeWidgetAura*); | 25 views::DesktopNativeWidgetAura*); |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 407 |
407 void DesktopNativeWidgetAura::EndMoveLoop() { | 408 void DesktopNativeWidgetAura::EndMoveLoop() { |
408 desktop_root_window_host_->EndMoveLoop(); | 409 desktop_root_window_host_->EndMoveLoop(); |
409 } | 410 } |
410 | 411 |
411 void DesktopNativeWidgetAura::SetVisibilityChangedAnimationsEnabled( | 412 void DesktopNativeWidgetAura::SetVisibilityChangedAnimationsEnabled( |
412 bool value) { | 413 bool value) { |
413 desktop_root_window_host_->SetVisibilityChangedAnimationsEnabled(value); | 414 desktop_root_window_host_->SetVisibilityChangedAnimationsEnabled(value); |
414 } | 415 } |
415 | 416 |
| 417 ui::NativeTheme* DesktopNativeWidgetAura::GetNativeTheme() { |
| 418 return DesktopRootWindowHost::GetNativeTheme(window_); |
| 419 } |
| 420 |
416 //////////////////////////////////////////////////////////////////////////////// | 421 //////////////////////////////////////////////////////////////////////////////// |
417 // DesktopNativeWidgetAura, aura::WindowDelegate implementation: | 422 // DesktopNativeWidgetAura, aura::WindowDelegate implementation: |
418 | 423 |
419 gfx::Size DesktopNativeWidgetAura::GetMinimumSize() const { | 424 gfx::Size DesktopNativeWidgetAura::GetMinimumSize() const { |
420 return native_widget_delegate_->GetMinimumSize(); | 425 return native_widget_delegate_->GetMinimumSize(); |
421 } | 426 } |
422 | 427 |
423 void DesktopNativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 428 void DesktopNativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
424 const gfx::Rect& new_bounds) { | 429 const gfx::Rect& new_bounds) { |
425 if (old_bounds.origin() != new_bounds.origin()) | 430 if (old_bounds.origin() != new_bounds.origin()) |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 GetWidget()->non_client_view()->SchedulePaint(); | 570 GetWidget()->non_client_view()->SchedulePaint(); |
566 } | 571 } |
567 | 572 |
568 void DesktopNativeWidgetAura::OnLostActive() { | 573 void DesktopNativeWidgetAura::OnLostActive() { |
569 native_widget_delegate_->OnNativeWidgetActivationChanged(false); | 574 native_widget_delegate_->OnNativeWidgetActivationChanged(false); |
570 if (IsVisible() && GetWidget()->non_client_view()) | 575 if (IsVisible() && GetWidget()->non_client_view()) |
571 GetWidget()->non_client_view()->SchedulePaint(); | 576 GetWidget()->non_client_view()->SchedulePaint(); |
572 } | 577 } |
573 | 578 |
574 } // namespace views | 579 } // namespace views |
OLD | NEW |