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" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 void DesktopNativeWidgetAura::OnFocus(aura::Window* old_focused_window) { | 444 void DesktopNativeWidgetAura::OnFocus(aura::Window* old_focused_window) { |
445 desktop_root_window_host_->OnNativeWidgetFocus(); | 445 desktop_root_window_host_->OnNativeWidgetFocus(); |
446 native_widget_delegate_->OnNativeFocus(old_focused_window); | 446 native_widget_delegate_->OnNativeFocus(old_focused_window); |
447 } | 447 } |
448 | 448 |
449 void DesktopNativeWidgetAura::OnBlur() { | 449 void DesktopNativeWidgetAura::OnBlur() { |
450 if (GetWidget()->HasFocusManager()) | 450 if (GetWidget()->HasFocusManager()) |
451 GetWidget()->GetFocusManager()->StoreFocusedView(); | 451 GetWidget()->GetFocusManager()->StoreFocusedView(); |
452 desktop_root_window_host_->OnNativeWidgetBlur(); | 452 desktop_root_window_host_->OnNativeWidgetBlur(); |
453 native_widget_delegate_->OnNativeBlur( | 453 native_widget_delegate_->OnNativeBlur( |
454 window_->GetFocusManager()->GetFocusedWindow()); | 454 aura::client::GetFocusClient(window_)->GetFocusedWindow()); |
455 } | 455 } |
456 | 456 |
457 gfx::NativeCursor DesktopNativeWidgetAura::GetCursor(const gfx::Point& point) { | 457 gfx::NativeCursor DesktopNativeWidgetAura::GetCursor(const gfx::Point& point) { |
458 return gfx::kNullCursor; | 458 return gfx::kNullCursor; |
459 } | 459 } |
460 | 460 |
461 int DesktopNativeWidgetAura::GetNonClientComponent( | 461 int DesktopNativeWidgetAura::GetNonClientComponent( |
462 const gfx::Point& point) const { | 462 const gfx::Point& point) const { |
463 return native_widget_delegate_->GetNonClientComponent(point); | 463 return native_widget_delegate_->GetNonClientComponent(point); |
464 } | 464 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 GetWidget()->non_client_view()->SchedulePaint(); | 591 GetWidget()->non_client_view()->SchedulePaint(); |
592 } | 592 } |
593 | 593 |
594 void DesktopNativeWidgetAura::OnLostActive() { | 594 void DesktopNativeWidgetAura::OnLostActive() { |
595 native_widget_delegate_->OnNativeWidgetActivationChanged(false); | 595 native_widget_delegate_->OnNativeWidgetActivationChanged(false); |
596 if (IsVisible() && GetWidget()->non_client_view()) | 596 if (IsVisible() && GetWidget()->non_client_view()) |
597 GetWidget()->non_client_view()->SchedulePaint(); | 597 GetWidget()->non_client_view()->SchedulePaint(); |
598 } | 598 } |
599 | 599 |
600 } // namespace views | 600 } // namespace views |
OLD | NEW |