Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 401313003: ScreenWin notifies DisplayObserver's when displays changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/screen_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "ui/aura/client/cursor_client.h" 11 #include "ui/aura/client/cursor_client.h"
12 #include "ui/aura/client/focus_client.h" 12 #include "ui/aura/client/focus_client.h"
13 #include "ui/aura/window_event_dispatcher.h" 13 #include "ui/aura/window_event_dispatcher.h"
14 #include "ui/aura/window_property.h" 14 #include "ui/aura/window_property.h"
15 #include "ui/base/cursor/cursor_loader_win.h" 15 #include "ui/base/cursor/cursor_loader_win.h"
16 #include "ui/base/ime/input_method.h" 16 #include "ui/base/ime/input_method.h"
17 #include "ui/base/win/shell.h" 17 #include "ui/base/win/shell.h"
18 #include "ui/compositor/compositor_constants.h" 18 #include "ui/compositor/compositor_constants.h"
19 #include "ui/gfx/insets.h" 19 #include "ui/gfx/insets.h"
20 #include "ui/gfx/native_widget_types.h" 20 #include "ui/gfx/native_widget_types.h"
21 #include "ui/gfx/path.h" 21 #include "ui/gfx/path.h"
22 #include "ui/gfx/path_win.h" 22 #include "ui/gfx/path_win.h"
23 #include "ui/gfx/screen.h"
24 #include "ui/gfx/screen_win.h"
23 #include "ui/gfx/vector2d.h" 25 #include "ui/gfx/vector2d.h"
24 #include "ui/gfx/win/dpi.h" 26 #include "ui/gfx/win/dpi.h"
25 #include "ui/native_theme/native_theme_aura.h" 27 #include "ui/native_theme/native_theme_aura.h"
26 #include "ui/native_theme/native_theme_win.h" 28 #include "ui/native_theme/native_theme_win.h"
27 #include "ui/views/corewm/tooltip_win.h" 29 #include "ui/views/corewm/tooltip_win.h"
28 #include "ui/views/ime/input_method_bridge.h" 30 #include "ui/views/ime/input_method_bridge.h"
29 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" 31 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h"
30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" 32 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h"
31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" 33 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h"
32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 34 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 desktop_native_widget_aura_->OnHostClosed(); 723 desktop_native_widget_aura_->OnHostClosed();
722 } 724 }
723 725
724 bool DesktopWindowTreeHostWin::HandleInitialFocus( 726 bool DesktopWindowTreeHostWin::HandleInitialFocus(
725 ui::WindowShowState show_state) { 727 ui::WindowShowState show_state) {
726 return GetWidget()->SetInitialFocus(show_state); 728 return GetWidget()->SetInitialFocus(show_state);
727 } 729 }
728 730
729 void DesktopWindowTreeHostWin::HandleDisplayChange() { 731 void DesktopWindowTreeHostWin::HandleDisplayChange() {
730 GetWidget()->widget_delegate()->OnDisplayChanged(); 732 GetWidget()->widget_delegate()->OnDisplayChanged();
733 static_cast<gfx::ScreenWin*>(gfx::Screen::GetScreenFor(content_window_))
sky 2014/07/21 17:09:18 There may be multiple DesktopWindowTreeHostWin's o
mlamouri (slow - plz ping) 2014/07/21 17:15:09 I am using a coalescing timer in ScreenWin because
734 ->OnDisplayChanged();
731 } 735 }
732 736
733 void DesktopWindowTreeHostWin::HandleBeginWMSizeMove() { 737 void DesktopWindowTreeHostWin::HandleBeginWMSizeMove() {
734 native_widget_delegate_->OnNativeWidgetBeginUserBoundsChange(); 738 native_widget_delegate_->OnNativeWidgetBeginUserBoundsChange();
735 } 739 }
736 740
737 void DesktopWindowTreeHostWin::HandleEndWMSizeMove() { 741 void DesktopWindowTreeHostWin::HandleEndWMSizeMove() {
738 native_widget_delegate_->OnNativeWidgetEndUserBoundsChange(); 742 native_widget_delegate_->OnNativeWidgetEndUserBoundsChange();
739 } 743 }
740 744
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 950
947 // static 951 // static
948 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 952 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
949 internal::NativeWidgetDelegate* native_widget_delegate, 953 internal::NativeWidgetDelegate* native_widget_delegate,
950 DesktopNativeWidgetAura* desktop_native_widget_aura) { 954 DesktopNativeWidgetAura* desktop_native_widget_aura) {
951 return new DesktopWindowTreeHostWin(native_widget_delegate, 955 return new DesktopWindowTreeHostWin(native_widget_delegate,
952 desktop_native_widget_aura); 956 desktop_native_widget_aura);
953 } 957 }
954 958
955 } // namespace views 959 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/screen_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698