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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "ui/aura/window.h" | 53 #include "ui/aura/window.h" |
54 #include "ui/aura/window_observer.h" | 54 #include "ui/aura/window_observer.h" |
55 #include "ui/aura/window_tree_host.h" | 55 #include "ui/aura/window_tree_host.h" |
56 #include "ui/aura/window_tree_host_observer.h" | 56 #include "ui/aura/window_tree_host_observer.h" |
57 #include "ui/base/clipboard/clipboard.h" | 57 #include "ui/base/clipboard/clipboard.h" |
58 #include "ui/base/clipboard/custom_data_helper.h" | 58 #include "ui/base/clipboard/custom_data_helper.h" |
59 #include "ui/base/dragdrop/drag_drop_types.h" | 59 #include "ui/base/dragdrop/drag_drop_types.h" |
60 #include "ui/base/dragdrop/drag_utils.h" | 60 #include "ui/base/dragdrop/drag_utils.h" |
61 #include "ui/base/dragdrop/drop_target_event.h" | 61 #include "ui/base/dragdrop/drop_target_event.h" |
62 #include "ui/base/dragdrop/os_exchange_data.h" | 62 #include "ui/base/dragdrop/os_exchange_data.h" |
| 63 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h" |
63 #include "ui/base/hit_test.h" | 64 #include "ui/base/hit_test.h" |
64 #include "ui/compositor/layer.h" | 65 #include "ui/compositor/layer.h" |
65 #include "ui/display/screen.h" | 66 #include "ui/display/screen.h" |
66 #include "ui/events/event.h" | 67 #include "ui/events/event.h" |
67 #include "ui/events/event_utils.h" | 68 #include "ui/events/event_utils.h" |
68 #include "ui/gfx/canvas.h" | 69 #include "ui/gfx/canvas.h" |
69 #include "ui/gfx/image/image.h" | 70 #include "ui/gfx/image/image.h" |
70 #include "ui/gfx/image/image_png_rep.h" | 71 #include "ui/gfx/image/image_png_rep.h" |
71 #include "ui/gfx/image/image_skia.h" | 72 #include "ui/gfx/image/image_skia.h" |
72 #include "ui/touch_selection/touch_selection_controller.h" | 73 #include "ui/touch_selection/touch_selection_controller.h" |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 const DragEventSourceInfo& event_info) { | 827 const DragEventSourceInfo& event_info) { |
827 aura::Window* root_window = GetNativeView()->GetRootWindow(); | 828 aura::Window* root_window = GetNativeView()->GetRootWindow(); |
828 if (!aura::client::GetDragDropClient(root_window)) { | 829 if (!aura::client::GetDragDropClient(root_window)) { |
829 web_contents_->SystemDragEnded(); | 830 web_contents_->SystemDragEnded(); |
830 return; | 831 return; |
831 } | 832 } |
832 | 833 |
833 ui::TouchSelectionController* selection_controller = GetSelectionController(); | 834 ui::TouchSelectionController* selection_controller = GetSelectionController(); |
834 if (selection_controller) | 835 if (selection_controller) |
835 selection_controller->HideAndDisallowShowingAutomatically(); | 836 selection_controller->HideAndDisallowShowingAutomatically(); |
836 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); | 837 ui::OSExchangeData::Provider* provider = |
| 838 ui::OSExchangeDataProviderFactory::CreateProvider(); |
837 PrepareDragData(drop_data, provider, web_contents_); | 839 PrepareDragData(drop_data, provider, web_contents_); |
838 | 840 |
839 ui::OSExchangeData data(provider); // takes ownership of |provider|. | 841 ui::OSExchangeData data(provider); // takes ownership of |provider|. |
840 | 842 |
841 if (!image.isNull()) | 843 if (!image.isNull()) |
842 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); | 844 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); |
843 | 845 |
844 std::unique_ptr<WebDragSourceAura> drag_source( | 846 std::unique_ptr<WebDragSourceAura> drag_source( |
845 new WebDragSourceAura(GetNativeView(), web_contents_)); | 847 new WebDragSourceAura(GetNativeView(), web_contents_)); |
846 | 848 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 bool allow_multiple_selection) { | 1157 bool allow_multiple_selection) { |
1156 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; | 1158 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; |
1157 } | 1159 } |
1158 | 1160 |
1159 void WebContentsViewAura::HidePopupMenu() { | 1161 void WebContentsViewAura::HidePopupMenu() { |
1160 NOTIMPLEMENTED(); | 1162 NOTIMPLEMENTED(); |
1161 } | 1163 } |
1162 #endif | 1164 #endif |
1163 | 1165 |
1164 } // namespace content | 1166 } // namespace content |
OLD | NEW |