| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 return DesktopRootWindowHost::GetNativeTheme(window_); | 422 return DesktopRootWindowHost::GetNativeTheme(window_); |
| 423 } | 423 } |
| 424 | 424 |
| 425 //////////////////////////////////////////////////////////////////////////////// | 425 //////////////////////////////////////////////////////////////////////////////// |
| 426 // DesktopNativeWidgetAura, aura::WindowDelegate implementation: | 426 // DesktopNativeWidgetAura, aura::WindowDelegate implementation: |
| 427 | 427 |
| 428 gfx::Size DesktopNativeWidgetAura::GetMinimumSize() const { | 428 gfx::Size DesktopNativeWidgetAura::GetMinimumSize() const { |
| 429 return native_widget_delegate_->GetMinimumSize(); | 429 return native_widget_delegate_->GetMinimumSize(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 gfx::Size DesktopNativeWidgetAura::GetMaximumSize() const { |
| 433 return native_widget_delegate_->GetMaximumSize(); |
| 434 } |
| 435 |
| 432 void DesktopNativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 436 void DesktopNativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 433 const gfx::Rect& new_bounds) { | 437 const gfx::Rect& new_bounds) { |
| 434 if (old_bounds.origin() != new_bounds.origin()) | 438 if (old_bounds.origin() != new_bounds.origin()) |
| 435 native_widget_delegate_->OnNativeWidgetMove(); | 439 native_widget_delegate_->OnNativeWidgetMove(); |
| 436 if (old_bounds.size() != new_bounds.size()) | 440 if (old_bounds.size() != new_bounds.size()) |
| 437 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); | 441 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); |
| 438 } | 442 } |
| 439 | 443 |
| 440 void DesktopNativeWidgetAura::OnFocus(aura::Window* old_focused_window) { | 444 void DesktopNativeWidgetAura::OnFocus(aura::Window* old_focused_window) { |
| 441 desktop_root_window_host_->OnNativeWidgetFocus(); | 445 desktop_root_window_host_->OnNativeWidgetFocus(); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 GetWidget()->non_client_view()->SchedulePaint(); | 591 GetWidget()->non_client_view()->SchedulePaint(); |
| 588 } | 592 } |
| 589 | 593 |
| 590 void DesktopNativeWidgetAura::OnLostActive() { | 594 void DesktopNativeWidgetAura::OnLostActive() { |
| 591 native_widget_delegate_->OnNativeWidgetActivationChanged(false); | 595 native_widget_delegate_->OnNativeWidgetActivationChanged(false); |
| 592 if (IsVisible() && GetWidget()->non_client_view()) | 596 if (IsVisible() && GetWidget()->non_client_view()) |
| 593 GetWidget()->non_client_view()->SchedulePaint(); | 597 GetWidget()->non_client_view()->SchedulePaint(); |
| 594 } | 598 } |
| 595 | 599 |
| 596 } // namespace views | 600 } // namespace views |
| OLD | NEW |