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

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

Issue 246633004: Remove non USE_AURA code from views files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just revert changes to ui/app_list/. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/default_theme_provider.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_win.h » ('j') | 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/drag_utils.h" 5 #include "ui/base/dragdrop/drag_utils.h"
6 6
7 #include <objidl.h> 7 #include <objidl.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <shobjidl.h> 9 #include <shobjidl.h>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // by premultiplied colors, so unpremultiply the bitmap. 65 // by premultiplied colors, so unpremultiply the bitmap.
66 // SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap. 66 // SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap.
67 HBITMAP bitmap = CreateHBITMAPFromSkBitmap( 67 HBITMAP bitmap = CreateHBITMAPFromSkBitmap(
68 SkBitmapOperations::UnPreMultiply(*image_skia.bitmap())); 68 SkBitmapOperations::UnPreMultiply(*image_skia.bitmap()));
69 if (bitmap) { 69 if (bitmap) {
70 // Attach 'bitmap' to the data_object. 70 // Attach 'bitmap' to the data_object.
71 SetDragImageOnDataObject(bitmap, size, cursor_offset, 71 SetDragImageOnDataObject(bitmap, size, cursor_offset,
72 ui::OSExchangeDataProviderWin::GetIDataObject(*data_object)); 72 ui::OSExchangeDataProviderWin::GetIDataObject(*data_object));
73 } 73 }
74 74
75 #if defined(USE_AURA)
76 // TODO: the above code is used in non-Ash, while below is used in Ash. If we 75 // TODO: the above code is used in non-Ash, while below is used in Ash. If we
77 // could figure this context out then we wouldn't do unnecessary work. However 76 // could figure this context out then we wouldn't do unnecessary work. However
78 // as it stands getting this information in ui/base would be a layering 77 // as it stands getting this information in ui/base would be a layering
79 // violation. 78 // violation.
80 data_object->provider().SetDragImage(image_skia, cursor_offset); 79 data_object->provider().SetDragImage(image_skia, cursor_offset);
81 #endif
82 } 80 }
83 81
84 } // namespace drag_utils 82 } // namespace drag_utils
OLDNEW
« no previous file with comments | « ui/base/default_theme_provider.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698