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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_win.cc

Issue 11787005: Get drag and drop working on Win Ash. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and take out dcheck for win Created 7 years, 11 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
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/base/dragdrop/os_exchange_data_provider_win.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 if (!download.filename.empty()) 492 if (!download.filename.empty())
493 storage = GetStorageForFileName(download.filename); 493 storage = GetStorageForFileName(download.filename);
494 494
495 // Add CF_HDROP. 495 // Add CF_HDROP.
496 DataObjectImpl::StoredDataInfo* info = new DataObjectImpl::StoredDataInfo( 496 DataObjectImpl::StoredDataInfo* info = new DataObjectImpl::StoredDataInfo(
497 ClipboardUtil::GetCFHDropFormat()->cfFormat, storage); 497 ClipboardUtil::GetCFHDropFormat()->cfFormat, storage);
498 info->downloader = download.downloader; 498 info->downloader = download.downloader;
499 data_->contents_.push_back(info); 499 data_->contents_.push_back(info);
500 } 500 }
501 501
502 #if defined(USE_AURA)
503
504 void OSExchangeDataProviderWin::SetDragImage(
505 const gfx::ImageSkia& image,
506 const gfx::Vector2d& cursor_offset) {
507 drag_image_ = image;
508 drag_image_offset_ = cursor_offset;
509 }
510
511 const gfx::ImageSkia& OSExchangeDataProviderWin::GetDragImage() const {
512 return drag_image_;
513 }
514
515 const gfx::Vector2d& OSExchangeDataProviderWin::GetDragImageOffset() const {
516 return drag_image_offset_;
517 }
518
519 #endif
520
502 /////////////////////////////////////////////////////////////////////////////// 521 ///////////////////////////////////////////////////////////////////////////////
503 // DataObjectImpl, IDataObject implementation: 522 // DataObjectImpl, IDataObject implementation:
504 523
505 // The following function, DuplicateMedium, is derived from WCDataObject.cpp 524 // The following function, DuplicateMedium, is derived from WCDataObject.cpp
506 // in the WebKit source code. This is the license information for the file: 525 // in the WebKit source code. This is the license information for the file:
507 /* 526 /*
508 * Copyright (C) 2007 Apple Inc. All rights reserved. 527 * Copyright (C) 2007 Apple Inc. All rights reserved.
509 * 528 *
510 * Redistribution and use in source and binary forms, with or without 529 * Redistribution and use in source and binary forms, with or without
511 * modification, are permitted provided that the following conditions 530 * modification, are permitted provided that the following conditions
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 return new OSExchangeDataProviderWin(); 984 return new OSExchangeDataProviderWin();
966 } 985 }
967 986
968 // static 987 // static
969 OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat( 988 OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat(
970 const std::string& type) { 989 const std::string& type) {
971 return RegisterClipboardFormat(ASCIIToUTF16(type).c_str()); 990 return RegisterClipboardFormat(ASCIIToUTF16(type).c_str());
972 } 991 }
973 992
974 } // namespace ui 993 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698