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

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

Issue 1915363002: Rename gfx::Display/Screen to display::Display/Screen in views/wm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanups Created 4 years, 7 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
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_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"
11 #include "ui/aura/client/aura_constants.h" 11 #include "ui/aura/client/aura_constants.h"
12 #include "ui/aura/client/cursor_client.h" 12 #include "ui/aura/client/cursor_client.h"
13 #include "ui/aura/client/focus_client.h" 13 #include "ui/aura/client/focus_client.h"
14 #include "ui/aura/client/window_tree_client.h" 14 #include "ui/aura/client/window_tree_client.h"
15 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
16 #include "ui/aura/window_observer.h" 16 #include "ui/aura/window_observer.h"
17 #include "ui/aura/window_property.h" 17 #include "ui/aura/window_property.h"
18 #include "ui/aura/window_tree_host.h" 18 #include "ui/aura/window_tree_host.h"
19 #include "ui/base/hit_test.h" 19 #include "ui/base/hit_test.h"
20 #include "ui/base/ime/input_method.h" 20 #include "ui/base/ime/input_method.h"
21 #include "ui/compositor/layer.h" 21 #include "ui/compositor/layer.h"
22 #include "ui/display/screen.h"
22 #include "ui/gfx/canvas.h" 23 #include "ui/gfx/canvas.h"
23 #include "ui/gfx/display.h"
24 #include "ui/gfx/geometry/point_conversions.h" 24 #include "ui/gfx/geometry/point_conversions.h"
25 #include "ui/gfx/geometry/rect.h" 25 #include "ui/gfx/geometry/rect.h"
26 #include "ui/gfx/geometry/size_conversions.h" 26 #include "ui/gfx/geometry/size_conversions.h"
27 #include "ui/gfx/screen.h"
28 #include "ui/native_theme/native_theme.h" 27 #include "ui/native_theme/native_theme.h"
29 #include "ui/views/corewm/tooltip.h" 28 #include "ui/views/corewm/tooltip.h"
30 #include "ui/views/corewm/tooltip_controller.h" 29 #include "ui/views/corewm/tooltip_controller.h"
31 #include "ui/views/drag_utils.h" 30 #include "ui/views/drag_utils.h"
32 #include "ui/views/view_constants_aura.h" 31 #include "ui/views/view_constants_aura.h"
33 #include "ui/views/widget/desktop_aura/desktop_capture_client.h" 32 #include "ui/views/widget/desktop_aura/desktop_capture_client.h"
34 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" 33 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h"
35 #include "ui/views/widget/desktop_aura/desktop_event_client.h" 34 #include "ui/views/widget/desktop_aura/desktop_event_client.h"
36 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" 35 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h"
37 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" 36 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 672
674 gfx::Rect DesktopNativeWidgetAura::GetRestoredBounds() const { 673 gfx::Rect DesktopNativeWidgetAura::GetRestoredBounds() const {
675 return content_window_ ? 674 return content_window_ ?
676 desktop_window_tree_host_->GetRestoredBounds() : gfx::Rect(); 675 desktop_window_tree_host_->GetRestoredBounds() : gfx::Rect();
677 } 676 }
678 677
679 void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) { 678 void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
680 if (!content_window_) 679 if (!content_window_)
681 return; 680 return;
682 aura::Window* root = host_->window(); 681 aura::Window* root = host_->window();
683 gfx::Screen* screen = gfx::Screen::GetScreen(); 682 display::Screen* screen = display::Screen::GetScreen();
684 gfx::Rect bounds_in_pixels = screen->DIPToScreenRectInWindow(root, bounds); 683 gfx::Rect bounds_in_pixels = screen->DIPToScreenRectInWindow(root, bounds);
685 desktop_window_tree_host_->AsWindowTreeHost()->SetBounds(bounds_in_pixels); 684 desktop_window_tree_host_->AsWindowTreeHost()->SetBounds(bounds_in_pixels);
686 } 685 }
687 686
688 void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) { 687 void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) {
689 if (content_window_) 688 if (content_window_)
690 desktop_window_tree_host_->SetSize(size); 689 desktop_window_tree_host_->SetSize(size);
691 } 690 }
692 691
693 void DesktopNativeWidgetAura::StackAbove(gfx::NativeView native_view) { 692 void DesktopNativeWidgetAura::StackAbove(gfx::NativeView native_view) {
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 if (cursor_reference_count_ == 0) { 1181 if (cursor_reference_count_ == 0) {
1183 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1182 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1184 // for cleaning up |cursor_manager_|. 1183 // for cleaning up |cursor_manager_|.
1185 delete cursor_manager_; 1184 delete cursor_manager_;
1186 native_cursor_manager_ = NULL; 1185 native_cursor_manager_ = NULL;
1187 cursor_manager_ = NULL; 1186 cursor_manager_ = NULL;
1188 } 1187 }
1189 } 1188 }
1190 1189
1191 } // namespace views 1190 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698