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

Unified Diff: ash/display/extended_mouse_warp_controller.cc

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/display/extended_mouse_warp_controller.cc
diff --git a/ash/display/extended_mouse_warp_controller.cc b/ash/display/extended_mouse_warp_controller.cc
index b532595f58797b1df2e6dc3b2f914a58e55c2fff..9a06f454e6a794ce03188baef671fa3f25d2e871 100644
--- a/ash/display/extended_mouse_warp_controller.cc
+++ b/ash/display/extended_mouse_warp_controller.cc
@@ -16,8 +16,8 @@
#include "base/memory/ptr_util.h"
#include "ui/aura/window.h"
#include "ui/display/manager/display_layout.h"
+#include "ui/display/screen.h"
#include "ui/events/event_utils.h"
-#include "ui/gfx/screen.h"
#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -33,7 +33,7 @@ const int kMaximumSnapHeight = 16;
// this, entire edge will be used as a draggable space.
const int kMinimumIndicatorHeight = 200;
-// Helper method that maps a gfx::Display to an aura::Window.
+// Helper method that maps a display::Display to an aura::Window.
aura::Window* GetRootWindowForDisplayId(int64_t display_id) {
return Shell::GetInstance()
->window_tree_host_manager()
@@ -42,7 +42,7 @@ aura::Window* GetRootWindowForDisplayId(int64_t display_id) {
// Helper method that maps an aura::Window to display id;
int64_t GetDisplayIdFromWindow(aura::Window* window) {
- return gfx::Screen::GetScreen()->GetDisplayNearestWindow(window).id();
+ return display::Screen::GetScreen()->GetDisplayNearestWindow(window).id();
}
// Adjust the edge so that it has |barrier_size| gap at the top to
@@ -104,16 +104,16 @@ ExtendedMouseWarpController::ExtendedMouseWarpController(
ash::DisplayManager* display_manager =
Shell::GetInstance()->display_manager();
int64_t drag_source_id = drag_source ? GetDisplayIdFromWindow(drag_source)
- : gfx::Display::kInvalidDisplayID;
+ : display::Display::kInvalidDisplayID;
display::DisplayList display_list = display_manager->active_display_list();
// Try to create a Warp region for all possible two displays combination.
// The following code does it by poping the last element in the list
// and then pairing with remaining displays in the list, until the list
// becomes single element.
while (display_list.size() > 1) {
- gfx::Display display = display_list.back();
+ display::Display display = display_list.back();
display_list.pop_back();
- for (const gfx::Display& peer : display_list) {
+ for (const display::Display& peer : display_list) {
std::unique_ptr<WarpRegion> region =
CreateWarpRegion(display, peer, drag_source_id);
if (region)
@@ -126,7 +126,7 @@ ExtendedMouseWarpController::~ExtendedMouseWarpController() {
}
bool ExtendedMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) {
- if (gfx::Screen::GetScreen()->GetNumDisplays() <= 1 || !enabled_)
+ if (display::Screen::GetScreen()->GetNumDisplays() <= 1 || !enabled_)
return false;
aura::Window* target = static_cast<aura::Window*>(event->target());
@@ -202,12 +202,12 @@ bool ExtendedMouseWarpController::WarpMouseCursorInNativeCoords(
}
std::unique_ptr<ExtendedMouseWarpController::WarpRegion>
-ExtendedMouseWarpController::CreateWarpRegion(const gfx::Display& a,
- const gfx::Display& b,
+ExtendedMouseWarpController::CreateWarpRegion(const display::Display& a,
+ const display::Display& b,
int64_t drag_source_id) {
gfx::Rect a_edge;
gfx::Rect b_edge;
- int snap_barrier = drag_source_id == gfx::Display::kInvalidDisplayID
+ int snap_barrier = drag_source_id == display::Display::kInvalidDisplayID
? 0
: kMaximumSnapHeight;
« no previous file with comments | « ash/display/extended_mouse_warp_controller.h ('k') | ash/display/extended_mouse_warp_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698