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_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
6 | 6 |
7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "ui/views/ime/input_method_bridge.h" | 28 #include "ui/views/ime/input_method_bridge.h" |
29 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" | 29 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" |
30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" | 30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" |
31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" | 31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
33 #include "ui/views/widget/root_view.h" | 33 #include "ui/views/widget/root_view.h" |
34 #include "ui/views/widget/widget_delegate.h" | 34 #include "ui/views/widget/widget_delegate.h" |
35 #include "ui/views/widget/widget_hwnd_utils.h" | 35 #include "ui/views/widget/widget_hwnd_utils.h" |
36 #include "ui/views/win/fullscreen_handler.h" | 36 #include "ui/views/win/fullscreen_handler.h" |
37 #include "ui/views/win/hwnd_message_handler.h" | 37 #include "ui/views/win/hwnd_message_handler.h" |
38 #include "ui/views/window/native_frame_view.h" | |
39 #include "ui/wm/core/compound_event_filter.h" | 38 #include "ui/wm/core/compound_event_filter.h" |
40 #include "ui/wm/core/input_method_event_filter.h" | 39 #include "ui/wm/core/input_method_event_filter.h" |
41 #include "ui/wm/core/window_animations.h" | 40 #include "ui/wm/core/window_animations.h" |
42 #include "ui/wm/public/scoped_tooltip_disabler.h" | 41 #include "ui/wm/public/scoped_tooltip_disabler.h" |
43 | 42 |
44 namespace views { | 43 namespace views { |
45 | 44 |
46 namespace { | 45 namespace { |
47 | 46 |
48 gfx::Size GetExpandedWindowSize(DWORD window_style, gfx::Size size) { | 47 gfx::Size GetExpandedWindowSize(DWORD window_style, gfx::Size size) { |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // IsAeroGlassEnabled, because ShouldUseNativeFrame is overridden in a | 374 // IsAeroGlassEnabled, because ShouldUseNativeFrame is overridden in a |
376 // subclass. | 375 // subclass. |
377 return ShouldUseNativeFrame(); | 376 return ShouldUseNativeFrame(); |
378 } | 377 } |
379 | 378 |
380 void DesktopWindowTreeHostWin::FrameTypeChanged() { | 379 void DesktopWindowTreeHostWin::FrameTypeChanged() { |
381 message_handler_->FrameTypeChanged(); | 380 message_handler_->FrameTypeChanged(); |
382 SetWindowTransparency(); | 381 SetWindowTransparency(); |
383 } | 382 } |
384 | 383 |
385 NonClientFrameView* DesktopWindowTreeHostWin::CreateNonClientFrameView() { | |
386 return GetWidget()->ShouldUseNativeFrame() ? | |
387 new NativeFrameView(GetWidget()) : NULL; | |
388 } | |
389 | |
390 void DesktopWindowTreeHostWin::SetFullscreen(bool fullscreen) { | 384 void DesktopWindowTreeHostWin::SetFullscreen(bool fullscreen) { |
391 message_handler_->fullscreen_handler()->SetFullscreen(fullscreen); | 385 message_handler_->fullscreen_handler()->SetFullscreen(fullscreen); |
392 // TODO(sky): workaround for ScopedFullscreenVisibility showing window | 386 // TODO(sky): workaround for ScopedFullscreenVisibility showing window |
393 // directly. Instead of this should listen for visibility changes and then | 387 // directly. Instead of this should listen for visibility changes and then |
394 // update window. | 388 // update window. |
395 if (message_handler_->IsVisible() && !content_window_->TargetVisibility()) | 389 if (message_handler_->IsVisible() && !content_window_->TargetVisibility()) |
396 content_window_->Show(); | 390 content_window_->Show(); |
397 SetWindowTransparency(); | 391 SetWindowTransparency(); |
398 } | 392 } |
399 | 393 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 | 945 |
952 // static | 946 // static |
953 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 947 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
954 internal::NativeWidgetDelegate* native_widget_delegate, | 948 internal::NativeWidgetDelegate* native_widget_delegate, |
955 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 949 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
956 return new DesktopWindowTreeHostWin(native_widget_delegate, | 950 return new DesktopWindowTreeHostWin(native_widget_delegate, |
957 desktop_native_widget_aura); | 951 desktop_native_widget_aura); |
958 } | 952 } |
959 | 953 |
960 } // namespace views | 954 } // namespace views |
OLD | NEW |