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

Unified Diff: content/browser/web_contents/web_contents_drag_win.cc

Issue 10860004: image-skia: Remove implicit conversion to SkBitmap on linux and chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/task_manager_gtk.cc ('k') | ui/gfx/image/image_skia.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_drag_win.cc
diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc
index ccc26133039c84487d5af6bbcd8c33e1b4dfbff9..edd4624032fd27b43d756c0c90c4e3a2360b88c5 100644
--- a/content/browser/web_contents/web_contents_drag_win.cc
+++ b/content/browser/web_contents/web_contents_drag_win.cc
@@ -28,7 +28,9 @@
#include "ui/base/clipboard/clipboard_util_win.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/dragdrop/drag_utils.h"
+#include "ui/base/layout.h"
#include "ui/gfx/image/image_skia.h"
+#include "ui/gfx/screen.h"
#include "ui/gfx/size.h"
#include "webkit/glue/webdropdata.h"
@@ -148,10 +150,15 @@ void WebContentsDragWin::StartDragging(const WebDropData& drop_data,
base::Thread::Options options;
options.message_loop_type = MessageLoop::TYPE_UI;
if (drag_drop_thread_->StartWithOptions(options)) {
+ gfx::Display display =
+ gfx::Screen::GetDisplayNearestWindow(web_contents_->GetNativeView());
+ ui::ScaleFactor scale_factor = ui::GetScaleFactorFromScale(
+ display.device_scale_factor());
drag_drop_thread_->message_loop()->PostTask(
FROM_HERE,
base::Bind(&WebContentsDragWin::StartBackgroundDragging, this,
- drop_data, ops, page_url, page_encoding, image,
+ drop_data, ops, page_url, page_encoding,
+ image.GetRepresentation(scale_factor).sk_bitmap(),
image_offset));
}
« no previous file with comments | « chrome/browser/ui/gtk/task_manager_gtk.cc ('k') | ui/gfx/image/image_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698