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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |