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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 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
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 "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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 1115
1116 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) { 1116 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) {
1117 DCHECK(current_rvh_for_drag_); 1117 DCHECK(current_rvh_for_drag_);
1118 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) 1118 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost())
1119 OnDragEntered(event); 1119 OnDragEntered(event);
1120 1120
1121 if (!current_drop_data_) 1121 if (!current_drop_data_)
1122 return ui::DragDropTypes::DRAG_NONE; 1122 return ui::DragDropTypes::DRAG_NONE;
1123 1123
1124 web_contents_->GetRenderViewHost()->DragTargetDrop( 1124 web_contents_->GetRenderViewHost()->DragTargetDrop(
1125 event.location(), gfx::Screen::GetScreen()->GetCursorScreenPoint(), 1125 *current_drop_data_.get(), event.location(),
dcheng 2016/04/19 06:58:47 No .get() is necessary here.
hush (inactive) 2016/05/06 02:25:25 Done.
1126 gfx::Screen::GetScreen()->GetCursorScreenPoint(),
1126 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1127 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1127 if (drag_dest_delegate_) 1128 if (drag_dest_delegate_)
1128 drag_dest_delegate_->OnDrop(); 1129 drag_dest_delegate_->OnDrop();
1129 current_drop_data_.reset(); 1130 current_drop_data_.reset();
1130 return ConvertFromWeb(current_drag_op_); 1131 return ConvertFromWeb(current_drag_op_);
1131 } 1132 }
1132 1133
1133 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, 1134 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window,
1134 bool visible) { 1135 bool visible) {
1135 // Ignore any visibility changes in the hierarchy below. 1136 // Ignore any visibility changes in the hierarchy below.
1136 if (window != window_.get() && window_->Contains(window)) 1137 if (window != window_.get() && window_->Contains(window))
1137 return; 1138 return;
1138 1139
1139 web_contents_->UpdateWebContentsVisibility(visible); 1140 web_contents_->UpdateWebContentsVisibility(visible);
1140 } 1141 }
1141 1142
1142 } // namespace content 1143 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698