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

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

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/drag_utils_win.cc ('k') | ui/base/native_theme/native_theme_android.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 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/file_path.h"
11 #include "base/pickle.h" 12 #include "base/pickle.h"
12 #include "base/file_path.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "third_party/skia/include/core/SkBitmap.h"
15 #include "ui/base/dragdrop/os_exchange_data.h" 14 #include "ui/base/dragdrop/os_exchange_data.h"
15 #include "ui/gfx/image/image_skia.h"
16 #include "ui/gfx/point.h" 16 #include "ui/gfx/point.h"
17 17
18 namespace ui { 18 namespace ui {
19 19
20 class Clipboard; 20 class Clipboard;
21 21
22 // OSExchangeData::Provider implementation for aura on linux. 22 // OSExchangeData::Provider implementation for aura on linux.
23 class UI_EXPORT OSExchangeDataProviderAura : public OSExchangeData::Provider { 23 class UI_EXPORT OSExchangeDataProviderAura : public OSExchangeData::Provider {
24 public: 24 public:
25 OSExchangeDataProviderAura(); 25 OSExchangeDataProviderAura();
(...skipping 26 matching lines...) Expand all
52 std::string* file_contents) const OVERRIDE; 52 std::string* file_contents) const OVERRIDE;
53 virtual bool HasFileContents() const OVERRIDE; 53 virtual bool HasFileContents() const OVERRIDE;
54 virtual void SetDownloadFileInfo( 54 virtual void SetDownloadFileInfo(
55 const OSExchangeData::DownloadFileInfo& download) OVERRIDE; 55 const OSExchangeData::DownloadFileInfo& download) OVERRIDE;
56 #endif 56 #endif
57 57
58 virtual void SetHtml(const string16& html, const GURL& base_url) OVERRIDE; 58 virtual void SetHtml(const string16& html, const GURL& base_url) OVERRIDE;
59 virtual bool GetHtml(string16* html, GURL* base_url) const OVERRIDE; 59 virtual bool GetHtml(string16* html, GURL* base_url) const OVERRIDE;
60 virtual bool HasHtml() const OVERRIDE; 60 virtual bool HasHtml() const OVERRIDE;
61 61
62 void set_drag_image(const SkBitmap& drag_image) { drag_image_ = drag_image; } 62 void set_drag_image(const gfx::ImageSkia& drag_image) {
63 const SkBitmap& drag_image() const { return drag_image_; } 63 drag_image_ = drag_image;
64 }
65
66 const gfx::ImageSkia& drag_image() const { return drag_image_; }
64 void set_drag_image_offset(const gfx::Point& drag_image_offset) { 67 void set_drag_image_offset(const gfx::Point& drag_image_offset) {
65 drag_image_offset_ = drag_image_offset; 68 drag_image_offset_ = drag_image_offset;
66 } 69 }
67 const gfx::Point& drag_image_offset() const { return drag_image_offset_; } 70 const gfx::Point& drag_image_offset() const { return drag_image_offset_; }
68 71
69 private: 72 private:
70 typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData; 73 typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData;
71 74
72 // Returns true if |formats_| contains a string format and the string can be 75 // Returns true if |formats_| contains a string format and the string can be
73 // parsed as a URL. 76 // parsed as a URL.
(...skipping 10 matching lines...) Expand all
84 GURL url_; 87 GURL url_;
85 string16 title_; 88 string16 title_;
86 89
87 // File name. 90 // File name.
88 std::vector<OSExchangeData::FileInfo> filenames_; 91 std::vector<OSExchangeData::FileInfo> filenames_;
89 92
90 // PICKLED_DATA contents. 93 // PICKLED_DATA contents.
91 PickleData pickle_data_; 94 PickleData pickle_data_;
92 95
93 // Drag image and offset data. 96 // Drag image and offset data.
94 SkBitmap drag_image_; 97 gfx::ImageSkia drag_image_;
95 gfx::Point drag_image_offset_; 98 gfx::Point drag_image_offset_;
96 99
97 // For HTML format 100 // For HTML format
98 string16 html_; 101 string16 html_;
99 GURL base_url_; 102 GURL base_url_;
100 103
101 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAura); 104 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAura);
102 }; 105 };
103 106
104 } // namespace ui 107 } // namespace ui
105 108
106 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_ 109 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURA_H_
OLDNEW
« no previous file with comments | « ui/base/dragdrop/drag_utils_win.cc ('k') | ui/base/native_theme/native_theme_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698