| 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 | 1119 |
| 1120 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) { | 1120 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) { |
| 1121 DCHECK(current_rvh_for_drag_); | 1121 DCHECK(current_rvh_for_drag_); |
| 1122 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) | 1122 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) |
| 1123 OnDragEntered(event); | 1123 OnDragEntered(event); |
| 1124 | 1124 |
| 1125 if (!current_drop_data_) | 1125 if (!current_drop_data_) |
| 1126 return ui::DragDropTypes::DRAG_NONE; | 1126 return ui::DragDropTypes::DRAG_NONE; |
| 1127 | 1127 |
| 1128 web_contents_->GetRenderViewHost()->DragTargetDrop( | 1128 web_contents_->GetRenderViewHost()->DragTargetDrop( |
| 1129 event.location(), display::Screen::GetScreen()->GetCursorScreenPoint(), | 1129 *current_drop_data_.get(), event.location(), |
| 1130 display::Screen::GetScreen()->GetCursorScreenPoint(), |
| 1130 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1131 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
| 1131 if (drag_dest_delegate_) | 1132 if (drag_dest_delegate_) |
| 1132 drag_dest_delegate_->OnDrop(); | 1133 drag_dest_delegate_->OnDrop(); |
| 1133 current_drop_data_.reset(); | 1134 current_drop_data_.reset(); |
| 1134 return ConvertFromWeb(current_drag_op_); | 1135 return ConvertFromWeb(current_drag_op_); |
| 1135 } | 1136 } |
| 1136 | 1137 |
| 1137 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, | 1138 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, |
| 1138 bool visible) { | 1139 bool visible) { |
| 1139 // Ignore any visibility changes in the hierarchy below. | 1140 // Ignore any visibility changes in the hierarchy below. |
| 1140 if (window != window_.get() && window_->Contains(window)) | 1141 if (window != window_.get() && window_->Contains(window)) |
| 1141 return; | 1142 return; |
| 1142 | 1143 |
| 1143 web_contents_->UpdateWebContentsVisibility(visible); | 1144 web_contents_->UpdateWebContentsVisibility(visible); |
| 1144 } | 1145 } |
| 1145 | 1146 |
| 1146 } // namespace content | 1147 } // namespace content |
| OLD | NEW |