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/debug/trace_event.h" | 8 #include "base/debug/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 27 matching lines...) Expand all Loading... | |
38 #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" | 38 #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" |
39 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" | 39 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" |
40 #include "ui/views/widget/drop_helper.h" | 40 #include "ui/views/widget/drop_helper.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" | |
48 #include "ui/wm/core/compound_event_filter.h" | 49 #include "ui/wm/core/compound_event_filter.h" |
49 #include "ui/wm/core/cursor_manager.h" | 50 #include "ui/wm/core/cursor_manager.h" |
50 #include "ui/wm/core/focus_controller.h" | 51 #include "ui/wm/core/focus_controller.h" |
51 #include "ui/wm/core/input_method_event_filter.h" | 52 #include "ui/wm/core/input_method_event_filter.h" |
52 #include "ui/wm/core/native_cursor_manager.h" | 53 #include "ui/wm/core/native_cursor_manager.h" |
53 #include "ui/wm/core/shadow_controller.h" | 54 #include "ui/wm/core/shadow_controller.h" |
54 #include "ui/wm/core/shadow_types.h" | 55 #include "ui/wm/core/shadow_types.h" |
55 #include "ui/wm/core/visibility_controller.h" | 56 #include "ui/wm/core/visibility_controller.h" |
56 #include "ui/wm/core/window_modality_controller.h" | 57 #include "ui/wm/core/window_modality_controller.h" |
57 #include "ui/wm/public/activation_client.h" | 58 #include "ui/wm/public/activation_client.h" |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
529 content_window_->SetProperty(aura::client::kCanMaximizeKey, | 530 content_window_->SetProperty(aura::client::kCanMaximizeKey, |
530 GetWidget()->widget_delegate()->CanMaximize()); | 531 GetWidget()->widget_delegate()->CanMaximize()); |
531 content_window_->SetProperty(aura::client::kCanResizeKey, | 532 content_window_->SetProperty(aura::client::kCanResizeKey, |
532 GetWidget()->widget_delegate()->CanResize()); | 533 GetWidget()->widget_delegate()->CanResize()); |
533 | 534 |
534 window_reorderer_.reset(new WindowReorderer(content_window_, | 535 window_reorderer_.reset(new WindowReorderer(content_window_, |
535 GetWidget()->GetRootView())); | 536 GetWidget()->GetRootView())); |
536 } | 537 } |
537 | 538 |
538 NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() { | 539 NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() { |
539 return desktop_window_tree_host_->CreateNonClientFrameView(); | 540 return desktop_window_tree_host_->ShouldUseNativeFrame() ? |
Matt Giuca
2014/05/14 06:16:38
Can you just call ShouldUseNativeFrame instead of
| |
541 new NativeFrameView(GetWidget()) : NULL; | |
540 } | 542 } |
541 | 543 |
542 bool DesktopNativeWidgetAura::ShouldUseNativeFrame() const { | 544 bool DesktopNativeWidgetAura::ShouldUseNativeFrame() const { |
543 return desktop_window_tree_host_->ShouldUseNativeFrame(); | 545 return desktop_window_tree_host_->ShouldUseNativeFrame(); |
544 } | 546 } |
545 | 547 |
546 bool DesktopNativeWidgetAura::ShouldWindowContentsBeTransparent() const { | 548 bool DesktopNativeWidgetAura::ShouldWindowContentsBeTransparent() const { |
547 return desktop_window_tree_host_->ShouldWindowContentsBeTransparent(); | 549 return desktop_window_tree_host_->ShouldWindowContentsBeTransparent(); |
548 } | 550 } |
549 | 551 |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1194 if (cursor_reference_count_ == 0) { | 1196 if (cursor_reference_count_ == 0) { |
1195 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1197 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1196 // for cleaning up |cursor_manager_|. | 1198 // for cleaning up |cursor_manager_|. |
1197 delete cursor_manager_; | 1199 delete cursor_manager_; |
1198 native_cursor_manager_ = NULL; | 1200 native_cursor_manager_ = NULL; |
1199 cursor_manager_ = NULL; | 1201 cursor_manager_ = NULL; |
1200 } | 1202 } |
1201 } | 1203 } |
1202 | 1204 |
1203 } // namespace views | 1205 } // namespace views |
OLD | NEW |