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

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

Issue 2792183002: Delete ash-based code for Windows drag-and-drop graphics. (Closed)
Patch Set: ashdrag: addheaders Created 3 years, 8 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
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_aura.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "net/base/filename_util.h" 10 #include "net/base/filename_util.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return ((formats_ & OSExchangeData::HTML) != 0); 176 return ((formats_ & OSExchangeData::HTML) != 0);
177 } 177 }
178 178
179 void OSExchangeDataProviderAura::SetDragImage( 179 void OSExchangeDataProviderAura::SetDragImage(
180 const gfx::ImageSkia& image, 180 const gfx::ImageSkia& image,
181 const gfx::Vector2d& cursor_offset) { 181 const gfx::Vector2d& cursor_offset) {
182 drag_image_ = image; 182 drag_image_ = image;
183 drag_image_offset_ = cursor_offset; 183 drag_image_offset_ = cursor_offset;
184 } 184 }
185 185
186 const gfx::ImageSkia& OSExchangeDataProviderAura::GetDragImage() const { 186 gfx::ImageSkia OSExchangeDataProviderAura::GetDragImage() const {
187 return drag_image_; 187 return drag_image_;
188 } 188 }
189 189
190 const gfx::Vector2d& 190 gfx::Vector2d OSExchangeDataProviderAura::GetDragImageOffset() const {
191 OSExchangeDataProviderAura::GetDragImageOffset() const {
192 return drag_image_offset_; 191 return drag_image_offset_;
193 } 192 }
194 193
195 bool OSExchangeDataProviderAura::GetFileURL(GURL* url) const { 194 bool OSExchangeDataProviderAura::GetFileURL(GURL* url) const {
196 base::FilePath file_path; 195 base::FilePath file_path;
197 if (!GetFilename(&file_path)) 196 if (!GetFilename(&file_path))
198 return false; 197 return false;
199 198
200 GURL test_url = net::FilePathToFileURL(file_path); 199 GURL test_url = net::FilePathToFileURL(file_path);
201 if (!test_url.is_valid()) 200 if (!test_url.is_valid())
(...skipping 11 matching lines...) Expand all
213 GURL test_url(string_); 212 GURL test_url(string_);
214 if (!test_url.is_valid()) 213 if (!test_url.is_valid())
215 return false; 214 return false;
216 215
217 if (url) 216 if (url)
218 *url = test_url; 217 *url = test_url;
219 return true; 218 return true;
220 } 219 }
221 220
222 } // namespace ui 221 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698