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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 | 1103 |
1104 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) { | 1104 int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) { |
1105 DCHECK(current_rvh_for_drag_); | 1105 DCHECK(current_rvh_for_drag_); |
1106 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) | 1106 if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) |
1107 OnDragEntered(event); | 1107 OnDragEntered(event); |
1108 | 1108 |
1109 if (!current_drop_data_) | 1109 if (!current_drop_data_) |
1110 return ui::DragDropTypes::DRAG_NONE; | 1110 return ui::DragDropTypes::DRAG_NONE; |
1111 | 1111 |
1112 web_contents_->GetRenderViewHost()->DragTargetDrop( | 1112 web_contents_->GetRenderViewHost()->DragTargetDrop( |
1113 event.location(), display::Screen::GetScreen()->GetCursorScreenPoint(), | 1113 *current_drop_data_, event.location(), |
| 1114 display::Screen::GetScreen()->GetCursorScreenPoint(), |
1114 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1115 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
1115 if (drag_dest_delegate_) | 1116 if (drag_dest_delegate_) |
1116 drag_dest_delegate_->OnDrop(); | 1117 drag_dest_delegate_->OnDrop(); |
1117 current_drop_data_.reset(); | 1118 current_drop_data_.reset(); |
1118 return ConvertFromWeb(current_drag_op_); | 1119 return ConvertFromWeb(current_drag_op_); |
1119 } | 1120 } |
1120 | 1121 |
1121 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, | 1122 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, |
1122 bool visible) { | 1123 bool visible) { |
1123 // Ignore any visibility changes in the hierarchy below. | 1124 // Ignore any visibility changes in the hierarchy below. |
1124 if (window != window_.get() && window_->Contains(window)) | 1125 if (window != window_.get() && window_->Contains(window)) |
1125 return; | 1126 return; |
1126 | 1127 |
1127 web_contents_->UpdateWebContentsVisibility(visible); | 1128 web_contents_->UpdateWebContentsVisibility(visible); |
1128 } | 1129 } |
1129 | 1130 |
1130 } // namespace content | 1131 } // namespace content |
OLD | NEW |