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

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: Change the existing API instead Created 4 years, 9 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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 1277
1278 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) { 1278 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) {
1279 DCHECK(current_rvh_for_drag_); 1279 DCHECK(current_rvh_for_drag_);
1280 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) 1280 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost())
1281 OnDragEntered(event); 1281 OnDragEntered(event);
1282 1282
1283 if (!current_drop_data_) 1283 if (!current_drop_data_)
1284 return ui::DragDropTypes::DRAG_NONE; 1284 return ui::DragDropTypes::DRAG_NONE;
1285 1285
1286 web_contents_->GetRenderViewHost()->DragTargetDrop( 1286 web_contents_->GetRenderViewHost()->DragTargetDrop(
1287 event.location(), gfx::Screen::GetScreen()->GetCursorScreenPoint(), 1287 DropData(), false, event.location(),
1288 gfx::Screen::GetScreen()->GetCursorScreenPoint(),
1288 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1289 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1289 if (drag_dest_delegate_) 1290 if (drag_dest_delegate_)
1290 drag_dest_delegate_->OnDrop(); 1291 drag_dest_delegate_->OnDrop();
1291 current_drop_data_.reset(); 1292 current_drop_data_.reset();
1292 return ConvertFromWeb(current_drag_op_); 1293 return ConvertFromWeb(current_drag_op_);
1293 } 1294 }
1294 1295
1295 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, 1296 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window,
1296 bool visible) { 1297 bool visible) {
1297 // Ignore any visibility changes in the hierarchy below. 1298 // Ignore any visibility changes in the hierarchy below.
(...skipping 20 matching lines...) Expand all
1318 if (visible) { 1319 if (visible) {
1319 if (!web_contents_->should_normally_be_visible()) 1320 if (!web_contents_->should_normally_be_visible())
1320 web_contents_->WasShown(); 1321 web_contents_->WasShown();
1321 } else { 1322 } else {
1322 if (web_contents_->should_normally_be_visible()) 1323 if (web_contents_->should_normally_be_visible())
1323 web_contents_->WasHidden(); 1324 web_contents_->WasHidden();
1324 } 1325 }
1325 } 1326 }
1326 1327
1327 } // namespace content 1328 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698