Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 328993002: Ensure that the size passed down to the SetDragImageOnDataObject function called from drag_utils::S… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed parentheses and fixed alignment Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698