| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 if (touch_editable_) | 1191 if (touch_editable_) |
| 1192 touch_editable_->EndTouchEditing(false); | 1192 touch_editable_->EndTouchEditing(false); |
| 1193 | 1193 |
| 1194 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); | 1194 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); |
| 1195 PrepareDragData(drop_data, provider, web_contents_); | 1195 PrepareDragData(drop_data, provider, web_contents_); |
| 1196 | 1196 |
| 1197 ui::OSExchangeData data(provider); // takes ownership of |provider|. | 1197 ui::OSExchangeData data(provider); // takes ownership of |provider|. |
| 1198 | 1198 |
| 1199 if (!image.isNull()) { | 1199 if (!image.isNull()) |
| 1200 drag_utils::SetDragImageOnDataObject(image, | 1200 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); |
| 1201 gfx::Size(image.width(), image.height()), image_offset, &data); | |
| 1202 } | |
| 1203 | 1201 |
| 1204 scoped_ptr<WebDragSourceAura> drag_source( | 1202 scoped_ptr<WebDragSourceAura> drag_source( |
| 1205 new WebDragSourceAura(GetNativeView(), web_contents_)); | 1203 new WebDragSourceAura(GetNativeView(), web_contents_)); |
| 1206 | 1204 |
| 1207 // We need to enable recursive tasks on the message loop so we can get | 1205 // We need to enable recursive tasks on the message loop so we can get |
| 1208 // updates while in the system DoDragDrop loop. | 1206 // updates while in the system DoDragDrop loop. |
| 1209 int result_op = 0; | 1207 int result_op = 0; |
| 1210 { | 1208 { |
| 1211 gfx::NativeView content_native_view = GetContentNativeView(); | 1209 gfx::NativeView content_native_view = GetContentNativeView(); |
| 1212 base::MessageLoop::ScopedNestableTaskAllower allow( | 1210 base::MessageLoop::ScopedNestableTaskAllower allow( |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, | 1569 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, |
| 1572 bool visible) { | 1570 bool visible) { |
| 1573 // Ignore any visibility changes in the hierarchy below. | 1571 // Ignore any visibility changes in the hierarchy below. |
| 1574 if (window != window_.get() && window_->Contains(window)) | 1572 if (window != window_.get() && window_->Contains(window)) |
| 1575 return; | 1573 return; |
| 1576 | 1574 |
| 1577 UpdateWebContentsVisibility(web_contents_, visible); | 1575 UpdateWebContentsVisibility(web_contents_, visible); |
| 1578 } | 1576 } |
| 1579 | 1577 |
| 1580 } // namespace content | 1578 } // namespace content |
| OLD | NEW |