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

Unified Diff: ui/views/drag_utils.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/views/drag_utils.h ('k') | ui/views/drag_utils_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/drag_utils.cc
diff --git a/ui/views/drag_utils.cc b/ui/views/drag_utils.cc
deleted file mode 100644
index 0fd5e5e91c8236fc9c89db09737f309255fe8a35..0000000000000000000000000000000000000000
--- a/ui/views/drag_utils.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/drag_utils.h"
-
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/size.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-
-float GetDeviceScaleForNativeView(views::Widget* widget) {
- float device_scale = 1.0f;
- // The following code should work on other platforms as well. But we do not
- // yet care about device scale factor on other platforms. So to keep drag and
- // drop behavior on other platforms un-touched, we wrap this in the #if guard.
- if (widget && widget->GetNativeView()) {
- gfx::NativeView view = widget->GetNativeView();
- gfx::Display display = gfx::Screen::GetScreenFor(view)->
- GetDisplayNearestWindow(view);
- device_scale = display.device_scale_factor();
- }
- return device_scale;
-}
-
-} // namespace
-
-namespace views {
-
-gfx::Canvas* GetCanvasForDragImage(views::Widget* widget,
- const gfx::Size& canvas_size) {
- float device_scale = GetDeviceScaleForNativeView(widget);
- return new gfx::Canvas(canvas_size, device_scale, false);
-}
-
-} // namespace views
« no previous file with comments | « ui/views/drag_utils.h ('k') | ui/views/drag_utils_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698