| 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));
|
| }
|
|
|
|
|