GN: Fix clean build of cloud_policy_proto_generated_compile_proto failing
[chromium-blink-merge.git] / ui / views / drag_utils_aura.cc
blob21a8fce5121bd96da1bcbd6b5da999b38ed8b32d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/views/drag_utils.h"
7 #include "ui/aura/window.h"
8 #include "ui/aura/window_event_dispatcher.h"
9 #include "ui/wm/core/coordinate_conversion.h"
10 #include "ui/wm/public/drag_drop_client.h"
12 namespace views {
14 void RunShellDrag(gfx::NativeView view,
15 const ui::OSExchangeData& data,
16 const gfx::Point& location,
17 int operation,
18 ui::DragDropTypes::DragEventSource source) {
19 gfx::Point screen_location(location);
20 wm::ConvertPointToScreen(view, &screen_location);
21 aura::Window* root_window = view->GetRootWindow();
22 if (aura::client::GetDragDropClient(root_window)) {
23 aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
24 data, root_window, view, screen_location, operation, source);
28 } // namespace views