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 "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 | 781 |
782 bool DesktopNativeWidgetAura::IsVisible() const { | 782 bool DesktopNativeWidgetAura::IsVisible() const { |
783 return content_window_ && desktop_window_tree_host_->IsVisible(); | 783 return content_window_ && desktop_window_tree_host_->IsVisible(); |
784 } | 784 } |
785 | 785 |
786 void DesktopNativeWidgetAura::Activate() { | 786 void DesktopNativeWidgetAura::Activate() { |
787 if (content_window_) | 787 if (content_window_) |
788 desktop_window_tree_host_->Activate(); | 788 desktop_window_tree_host_->Activate(); |
789 } | 789 } |
790 | 790 |
| 791 void DesktopNativeWidgetAura::ActivateForUserGesture() { |
| 792 if (content_window_) |
| 793 desktop_window_tree_host_->ActivateForUserGesture(); |
| 794 } |
| 795 |
791 void DesktopNativeWidgetAura::Deactivate() { | 796 void DesktopNativeWidgetAura::Deactivate() { |
792 if (content_window_) | 797 if (content_window_) |
793 desktop_window_tree_host_->Deactivate(); | 798 desktop_window_tree_host_->Deactivate(); |
794 } | 799 } |
795 | 800 |
796 bool DesktopNativeWidgetAura::IsActive() const { | 801 bool DesktopNativeWidgetAura::IsActive() const { |
797 return content_window_ && desktop_window_tree_host_->IsActive(); | 802 return content_window_ && desktop_window_tree_host_->IsActive(); |
798 } | 803 } |
799 | 804 |
800 void DesktopNativeWidgetAura::SetAlwaysOnTop(bool always_on_top) { | 805 void DesktopNativeWidgetAura::SetAlwaysOnTop(bool always_on_top) { |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 if (cursor_reference_count_ == 0) { | 1250 if (cursor_reference_count_ == 0) { |
1246 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1251 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1247 // for cleaning up |cursor_manager_|. | 1252 // for cleaning up |cursor_manager_|. |
1248 delete cursor_manager_; | 1253 delete cursor_manager_; |
1249 native_cursor_manager_ = NULL; | 1254 native_cursor_manager_ = NULL; |
1250 cursor_manager_ = NULL; | 1255 cursor_manager_ = NULL; |
1251 } | 1256 } |
1252 } | 1257 } |
1253 | 1258 |
1254 } // namespace views | 1259 } // namespace views |
OLD | NEW |