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

Side by Side Diff: ui/views/drag_utils.cc

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/metrics_mac.mm » ('j') | 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/drag_utils.h" 5 #include "ui/views/drag_utils.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura/window_event_dispatcher.h" 8 #include "ui/aura/window_event_dispatcher.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
(...skipping 16 matching lines...) Expand all
27 return device_scale; 27 return device_scale;
28 } 28 }
29 29
30 namespace views { 30 namespace views {
31 31
32 void RunShellDrag(gfx::NativeView view, 32 void RunShellDrag(gfx::NativeView view,
33 const ui::OSExchangeData& data, 33 const ui::OSExchangeData& data,
34 const gfx::Point& location, 34 const gfx::Point& location,
35 int operation, 35 int operation,
36 ui::DragDropTypes::DragEventSource source) { 36 ui::DragDropTypes::DragEventSource source) {
37 #if !defined(OS_MACOSX)
37 gfx::Point root_location(location); 38 gfx::Point root_location(location);
38 aura::Window* root_window = view->GetRootWindow(); 39 aura::Window* root_window = view->GetRootWindow();
39 aura::Window::ConvertPointToTarget(view, root_window, &root_location); 40 aura::Window::ConvertPointToTarget(view, root_window, &root_location);
40 if (aura::client::GetDragDropClient(root_window)) { 41 if (aura::client::GetDragDropClient(root_window)) {
41 aura::client::GetDragDropClient(root_window)->StartDragAndDrop( 42 aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
42 data, root_window, view, root_location, operation, source); 43 data, root_window, view, root_location, operation, source);
43 } 44 }
45 #endif
44 } 46 }
45 47
46 gfx::Canvas* GetCanvasForDragImage(views::Widget* widget, 48 gfx::Canvas* GetCanvasForDragImage(views::Widget* widget,
47 const gfx::Size& canvas_size) { 49 const gfx::Size& canvas_size) {
48 float device_scale = GetDeviceScaleForNativeView(widget); 50 float device_scale = GetDeviceScaleForNativeView(widget);
49 return new gfx::Canvas(canvas_size, device_scale, false); 51 return new gfx::Canvas(canvas_size, device_scale, false);
50 } 52 }
51 53
52 } // namespace views 54 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/metrics_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698