| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" | 38 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" |
| 39 #include "ui/views/widget/drop_helper.h" | 39 #include "ui/views/widget/drop_helper.h" |
| 40 #include "ui/views/widget/focus_manager_event_handler.h" | 40 #include "ui/views/widget/focus_manager_event_handler.h" |
| 41 #include "ui/views/widget/native_widget_aura.h" | 41 #include "ui/views/widget/native_widget_aura.h" |
| 42 #include "ui/views/widget/root_view.h" | 42 #include "ui/views/widget/root_view.h" |
| 43 #include "ui/views/widget/tooltip_manager_aura.h" | 43 #include "ui/views/widget/tooltip_manager_aura.h" |
| 44 #include "ui/views/widget/widget.h" | 44 #include "ui/views/widget/widget.h" |
| 45 #include "ui/views/widget/widget_aura_utils.h" | 45 #include "ui/views/widget/widget_aura_utils.h" |
| 46 #include "ui/views/widget/widget_delegate.h" | 46 #include "ui/views/widget/widget_delegate.h" |
| 47 #include "ui/views/widget/window_reorderer.h" | 47 #include "ui/views/widget/window_reorderer.h" |
| 48 #include "ui/views/window/native_frame_view.h" | |
| 49 #include "ui/wm/core/compound_event_filter.h" | 48 #include "ui/wm/core/compound_event_filter.h" |
| 50 #include "ui/wm/core/cursor_manager.h" | 49 #include "ui/wm/core/cursor_manager.h" |
| 51 #include "ui/wm/core/focus_controller.h" | 50 #include "ui/wm/core/focus_controller.h" |
| 52 #include "ui/wm/core/native_cursor_manager.h" | 51 #include "ui/wm/core/native_cursor_manager.h" |
| 53 #include "ui/wm/core/shadow_controller.h" | 52 #include "ui/wm/core/shadow_controller.h" |
| 54 #include "ui/wm/core/shadow_types.h" | 53 #include "ui/wm/core/shadow_types.h" |
| 55 #include "ui/wm/core/visibility_controller.h" | 54 #include "ui/wm/core/visibility_controller.h" |
| 56 #include "ui/wm/core/window_animations.h" | 55 #include "ui/wm/core/window_animations.h" |
| 57 #include "ui/wm/core/window_modality_controller.h" | 56 #include "ui/wm/core/window_modality_controller.h" |
| 58 #include "ui/wm/public/activation_client.h" | 57 #include "ui/wm/public/activation_client.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 | 521 |
| 523 OnSizeConstraintsChanged(); | 522 OnSizeConstraintsChanged(); |
| 524 | 523 |
| 525 window_reorderer_.reset(new WindowReorderer(content_window_, | 524 window_reorderer_.reset(new WindowReorderer(content_window_, |
| 526 GetWidget()->GetRootView())); | 525 GetWidget()->GetRootView())); |
| 527 } | 526 } |
| 528 | 527 |
| 529 void DesktopNativeWidgetAura::OnWidgetInitDone() {} | 528 void DesktopNativeWidgetAura::OnWidgetInitDone() {} |
| 530 | 529 |
| 531 NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() { | 530 NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() { |
| 532 return ShouldUseNativeFrame() ? new NativeFrameView(GetWidget()) : NULL; | 531 return desktop_window_tree_host_->CreateNonClientFrameView(); |
| 533 } | 532 } |
| 534 | 533 |
| 535 bool DesktopNativeWidgetAura::ShouldUseNativeFrame() const { | 534 bool DesktopNativeWidgetAura::ShouldUseNativeFrame() const { |
| 536 return desktop_window_tree_host_->ShouldUseNativeFrame(); | 535 return desktop_window_tree_host_->ShouldUseNativeFrame(); |
| 537 } | 536 } |
| 538 | 537 |
| 539 bool DesktopNativeWidgetAura::ShouldWindowContentsBeTransparent() const { | 538 bool DesktopNativeWidgetAura::ShouldWindowContentsBeTransparent() const { |
| 540 return desktop_window_tree_host_->ShouldWindowContentsBeTransparent(); | 539 return desktop_window_tree_host_->ShouldWindowContentsBeTransparent(); |
| 541 } | 540 } |
| 542 | 541 |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 if (cursor_reference_count_ == 0) { | 1182 if (cursor_reference_count_ == 0) { |
| 1184 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1183 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1185 // for cleaning up |cursor_manager_|. | 1184 // for cleaning up |cursor_manager_|. |
| 1186 delete cursor_manager_; | 1185 delete cursor_manager_; |
| 1187 native_cursor_manager_ = NULL; | 1186 native_cursor_manager_ = NULL; |
| 1188 cursor_manager_ = NULL; | 1187 cursor_manager_ = NULL; |
| 1189 } | 1188 } |
| 1190 } | 1189 } |
| 1191 | 1190 |
| 1192 } // namespace views | 1191 } // namespace views |
| OLD | NEW |