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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 if (selection_controller) | 823 if (selection_controller) |
824 selection_controller->HideAndDisallowShowingAutomatically(); | 824 selection_controller->HideAndDisallowShowingAutomatically(); |
825 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); | 825 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); |
826 PrepareDragData(drop_data, provider, web_contents_); | 826 PrepareDragData(drop_data, provider, web_contents_); |
827 | 827 |
828 ui::OSExchangeData data(provider); // takes ownership of |provider|. | 828 ui::OSExchangeData data(provider); // takes ownership of |provider|. |
829 | 829 |
830 if (!image.isNull()) | 830 if (!image.isNull()) |
831 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); | 831 drag_utils::SetDragImageOnDataObject(image, image_offset, &data); |
832 | 832 |
833 scoped_ptr<WebDragSourceAura> drag_source( | 833 std::unique_ptr<WebDragSourceAura> drag_source( |
834 new WebDragSourceAura(GetNativeView(), web_contents_)); | 834 new WebDragSourceAura(GetNativeView(), web_contents_)); |
835 | 835 |
836 // We need to enable recursive tasks on the message loop so we can get | 836 // We need to enable recursive tasks on the message loop so we can get |
837 // updates while in the system DoDragDrop loop. | 837 // updates while in the system DoDragDrop loop. |
838 int result_op = 0; | 838 int result_op = 0; |
839 { | 839 { |
840 gfx::NativeView content_native_view = GetContentNativeView(); | 840 gfx::NativeView content_native_view = GetContentNativeView(); |
841 base::MessageLoop::ScopedNestableTaskAllower allow( | 841 base::MessageLoop::ScopedNestableTaskAllower allow( |
842 base::MessageLoop::current()); | 842 base::MessageLoop::current()); |
843 result_op = aura::client::GetDragDropClient(root_window) | 843 result_op = aura::client::GetDragDropClient(root_window) |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, | 1133 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, |
1134 bool visible) { | 1134 bool visible) { |
1135 // Ignore any visibility changes in the hierarchy below. | 1135 // Ignore any visibility changes in the hierarchy below. |
1136 if (window != window_.get() && window_->Contains(window)) | 1136 if (window != window_.get() && window_->Contains(window)) |
1137 return; | 1137 return; |
1138 | 1138 |
1139 web_contents_->UpdateWebContentsVisibility(visible); | 1139 web_contents_->UpdateWebContentsVisibility(visible); |
1140 } | 1140 } |
1141 | 1141 |
1142 } // namespace content | 1142 } // namespace content |
OLD | NEW |