OLD | NEW |
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 "content/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "ui/aura/client/screen_position_client.h" | 54 #include "ui/aura/client/screen_position_client.h" |
55 #include "ui/aura/client/window_parenting_client.h" | 55 #include "ui/aura/client/window_parenting_client.h" |
56 #include "ui/aura/env.h" | 56 #include "ui/aura/env.h" |
57 #include "ui/aura/window.h" | 57 #include "ui/aura/window.h" |
58 #include "ui/aura/window_observer.h" | 58 #include "ui/aura/window_observer.h" |
59 #include "ui/aura/window_tree_host.h" | 59 #include "ui/aura/window_tree_host.h" |
60 #include "ui/aura/window_tree_host_observer.h" | 60 #include "ui/aura/window_tree_host_observer.h" |
61 #include "ui/base/clipboard/clipboard.h" | 61 #include "ui/base/clipboard/clipboard.h" |
62 #include "ui/base/clipboard/custom_data_helper.h" | 62 #include "ui/base/clipboard/custom_data_helper.h" |
63 #include "ui/base/dragdrop/drag_drop_types.h" | 63 #include "ui/base/dragdrop/drag_drop_types.h" |
64 #include "ui/base/dragdrop/drag_utils.h" | |
65 #include "ui/base/dragdrop/drop_target_event.h" | 64 #include "ui/base/dragdrop/drop_target_event.h" |
66 #include "ui/base/dragdrop/os_exchange_data.h" | 65 #include "ui/base/dragdrop/os_exchange_data.h" |
67 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" | 66 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" |
68 #include "ui/base/hit_test.h" | 67 #include "ui/base/hit_test.h" |
69 #include "ui/compositor/layer.h" | 68 #include "ui/compositor/layer.h" |
70 #include "ui/display/screen.h" | 69 #include "ui/display/screen.h" |
71 #include "ui/events/blink/web_input_event.h" | 70 #include "ui/events/blink/web_input_event.h" |
72 #include "ui/events/event.h" | 71 #include "ui/events/event.h" |
73 #include "ui/events/event_utils.h" | 72 #include "ui/events/event_utils.h" |
74 #include "ui/gfx/canvas.h" | 73 #include "ui/gfx/canvas.h" |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 if (selection_controller) | 966 if (selection_controller) |
968 selection_controller->HideAndDisallowShowingAutomatically(); | 967 selection_controller->HideAndDisallowShowingAutomatically(); |
969 std::unique_ptr<ui::OSExchangeData::Provider> provider = | 968 std::unique_ptr<ui::OSExchangeData::Provider> provider = |
970 ui::OSExchangeDataProviderFactory::CreateProvider(); | 969 ui::OSExchangeDataProviderFactory::CreateProvider(); |
971 PrepareDragData(drop_data, provider.get(), web_contents_); | 970 PrepareDragData(drop_data, provider.get(), web_contents_); |
972 | 971 |
973 ui::OSExchangeData data( | 972 ui::OSExchangeData data( |
974 std::move(provider)); // takes ownership of |provider|. | 973 std::move(provider)); // takes ownership of |provider|. |
975 | 974 |
976 if (!image.isNull()) | 975 if (!image.isNull()) |
977 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); | 976 data.provider().SetDragImage(image, image_offset); |
978 | 977 |
979 std::unique_ptr<WebDragSourceAura> drag_source( | 978 std::unique_ptr<WebDragSourceAura> drag_source( |
980 new WebDragSourceAura(GetNativeView(), web_contents_)); | 979 new WebDragSourceAura(GetNativeView(), web_contents_)); |
981 | 980 |
982 // We need to enable recursive tasks on the message loop so we can get | 981 // We need to enable recursive tasks on the message loop so we can get |
983 // updates while in the system DoDragDrop loop. | 982 // updates while in the system DoDragDrop loop. |
984 int result_op = 0; | 983 int result_op = 0; |
985 { | 984 { |
986 gfx::NativeView content_native_view = GetContentNativeView(); | 985 gfx::NativeView content_native_view = GetContentNativeView(); |
987 base::MessageLoop::ScopedNestableTaskAllower allow( | 986 base::MessageLoop::ScopedNestableTaskAllower allow( |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 bool allow_multiple_selection) { | 1340 bool allow_multiple_selection) { |
1342 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; | 1341 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; |
1343 } | 1342 } |
1344 | 1343 |
1345 void WebContentsViewAura::HidePopupMenu() { | 1344 void WebContentsViewAura::HidePopupMenu() { |
1346 NOTIMPLEMENTED(); | 1345 NOTIMPLEMENTED(); |
1347 } | 1346 } |
1348 #endif | 1347 #endif |
1349 | 1348 |
1350 } // namespace content | 1349 } // namespace content |
OLD | NEW |