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

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

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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
« no previous file with comments | « ui/base/default_theme_provider.h ('k') | ui/base/dragdrop/os_exchange_data_provider_aura.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 "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/base/dragdrop/os_exchange_data.h" 10 #include "ui/base/dragdrop/os_exchange_data.h"
(...skipping 22 matching lines...) Expand all
33 const gfx::ImageSkia& icon) 33 const gfx::ImageSkia& icon)
34 : CanvasImageSource(CalculateSize(icon), false), 34 : CanvasImageSource(CalculateSize(icon), false),
35 file_name_(file_name), 35 file_name_(file_name),
36 icon_(icon) { 36 icon_(icon) {
37 } 37 }
38 38
39 virtual ~FileDragImageSource() { 39 virtual ~FileDragImageSource() {
40 } 40 }
41 41
42 // Overridden from gfx::CanvasImageSource. 42 // Overridden from gfx::CanvasImageSource.
43 virtual void Draw(gfx::Canvas* canvas) OVERRIDE { 43 virtual void Draw(gfx::Canvas* canvas) override {
44 if (!icon_.isNull()) { 44 if (!icon_.isNull()) {
45 // Paint the icon. 45 // Paint the icon.
46 canvas->DrawImageInt(icon_, (size().width() - icon_.width()) / 2, 0); 46 canvas->DrawImageInt(icon_, (size().width() - icon_.width()) / 2, 0);
47 } 47 }
48 48
49 base::string16 name = file_name_.BaseName().LossyDisplayName(); 49 base::string16 name = file_name_.BaseName().LossyDisplayName();
50 const int flags = gfx::Canvas::TEXT_ALIGN_CENTER; 50 const int flags = gfx::Canvas::TEXT_ALIGN_CENTER;
51 const gfx::FontList font_list; 51 const gfx::FontList font_list;
52 #if defined(OS_WIN) 52 #if defined(OS_WIN)
53 // Paint the file name. We inset it one pixel to allow room for the halo. 53 // Paint the file name. We inset it one pixel to allow room for the halo.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 void SetDragImageOnDataObject(const gfx::Canvas& canvas, 98 void SetDragImageOnDataObject(const gfx::Canvas& canvas,
99 const gfx::Vector2d& cursor_offset, 99 const gfx::Vector2d& cursor_offset,
100 ui::OSExchangeData* data_object) { 100 ui::OSExchangeData* data_object) {
101 gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep()); 101 gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep());
102 SetDragImageOnDataObject(image, cursor_offset, data_object); 102 SetDragImageOnDataObject(image, cursor_offset, data_object);
103 } 103 }
104 104
105 } // namespace drag_utils 105 } // namespace drag_utils
OLDNEW
« no previous file with comments | « ui/base/default_theme_provider.h ('k') | ui/base/dragdrop/os_exchange_data_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698