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" |
(...skipping 25 matching lines...) Expand all Loading... |
36 public: | 36 public: |
37 explicit DesktopNativeWidgetAuraStackingClient(aura::RootWindow* root_window) | 37 explicit DesktopNativeWidgetAuraStackingClient(aura::RootWindow* root_window) |
38 : root_window_(root_window) { | 38 : root_window_(root_window) { |
39 aura::client::SetStackingClient(root_window_, this); | 39 aura::client::SetStackingClient(root_window_, this); |
40 } | 40 } |
41 virtual ~DesktopNativeWidgetAuraStackingClient() { | 41 virtual ~DesktopNativeWidgetAuraStackingClient() { |
42 aura::client::SetStackingClient(root_window_, NULL); | 42 aura::client::SetStackingClient(root_window_, NULL); |
43 } | 43 } |
44 | 44 |
45 // Overridden from client::StackingClient: | 45 // Overridden from client::StackingClient: |
46 virtual aura::Window* GetDefaultParent(aura::Window* window, | 46 virtual aura::Window* GetDefaultParent(aura::Window* context, |
| 47 aura::Window* window, |
47 const gfx::Rect& bounds) OVERRIDE { | 48 const gfx::Rect& bounds) OVERRIDE { |
48 return root_window_; | 49 return root_window_; |
49 } | 50 } |
50 | 51 |
51 private: | 52 private: |
52 aura::RootWindow* root_window_; | 53 aura::RootWindow* root_window_; |
53 | 54 |
54 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAuraStackingClient); | 55 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAuraStackingClient); |
55 }; | 56 }; |
56 | 57 |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 GetWidget()->non_client_view()->SchedulePaint(); | 579 GetWidget()->non_client_view()->SchedulePaint(); |
579 } | 580 } |
580 | 581 |
581 void DesktopNativeWidgetAura::OnLostActive() { | 582 void DesktopNativeWidgetAura::OnLostActive() { |
582 native_widget_delegate_->OnNativeWidgetActivationChanged(false); | 583 native_widget_delegate_->OnNativeWidgetActivationChanged(false); |
583 if (IsVisible() && GetWidget()->non_client_view()) | 584 if (IsVisible() && GetWidget()->non_client_view()) |
584 GetWidget()->non_client_view()->SchedulePaint(); | 585 GetWidget()->non_client_view()->SchedulePaint(); |
585 } | 586 } |
586 | 587 |
587 } // namespace views | 588 } // namespace views |
OLD | NEW |