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

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

Issue 13979012: Fix deadlock between UI thread and drag and drop thread on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retain Created 7 years, 7 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
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_H_ 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <set> 10 #include <set>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 virtual bool HasCustomFormat( 128 virtual bool HasCustomFormat(
129 OSExchangeData::CustomFormat format) const = 0; 129 OSExchangeData::CustomFormat format) const = 0;
130 130
131 #if defined(OS_WIN) 131 #if defined(OS_WIN)
132 virtual void SetFileContents(const base::FilePath& filename, 132 virtual void SetFileContents(const base::FilePath& filename,
133 const std::string& file_contents) = 0; 133 const std::string& file_contents) = 0;
134 virtual bool GetFileContents(base::FilePath* filename, 134 virtual bool GetFileContents(base::FilePath* filename,
135 std::string* file_contents) const = 0; 135 std::string* file_contents) const = 0;
136 virtual bool HasFileContents() const = 0; 136 virtual bool HasFileContents() const = 0;
137 virtual void SetDownloadFileInfo(const DownloadFileInfo& download) = 0; 137 virtual void SetDownloadFileInfo(const DownloadFileInfo& download) = 0;
138 virtual void SetInDragLoop(bool in_drag_loop) = 0;
138 #endif 139 #endif
139 140
140 #if defined(OS_WIN) || defined(USE_AURA) 141 #if defined(OS_WIN) || defined(USE_AURA)
141 virtual void SetHtml(const string16& html, const GURL& base_url) = 0; 142 virtual void SetHtml(const string16& html, const GURL& base_url) = 0;
142 virtual bool GetHtml(string16* html, GURL* base_url) const = 0; 143 virtual bool GetHtml(string16* html, GURL* base_url) const = 0;
143 virtual bool HasHtml() const = 0; 144 virtual bool HasHtml() const = 0;
144 #endif 145 #endif
145 146
146 #if defined(USE_AURA) 147 #if defined(USE_AURA)
147 virtual void SetDragImage(const gfx::ImageSkia& image, 148 virtual void SetDragImage(const gfx::ImageSkia& image,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 221
221 #if defined(OS_WIN) 222 #if defined(OS_WIN)
222 // Adds the bytes of a file (CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR). 223 // Adds the bytes of a file (CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR).
223 void SetFileContents(const base::FilePath& filename, 224 void SetFileContents(const base::FilePath& filename,
224 const std::string& file_contents); 225 const std::string& file_contents);
225 bool GetFileContents(base::FilePath* filename, 226 bool GetFileContents(base::FilePath* filename,
226 std::string* file_contents) const; 227 std::string* file_contents) const;
227 228
228 // Adds a download file with full path (CF_HDROP). 229 // Adds a download file with full path (CF_HDROP).
229 void SetDownloadFileInfo(const DownloadFileInfo& download); 230 void SetDownloadFileInfo(const DownloadFileInfo& download);
231
232 void SetInDragLoop(bool in_drag_loop);
230 #endif 233 #endif
231 234
232 #if defined(OS_WIN) || defined(USE_AURA) 235 #if defined(OS_WIN) || defined(USE_AURA)
233 // Adds a snippet of HTML. |html| is just raw html but this sets both 236 // Adds a snippet of HTML. |html| is just raw html but this sets both
234 // text/html and CF_HTML. 237 // text/html and CF_HTML.
235 void SetHtml(const string16& html, const GURL& base_url); 238 void SetHtml(const string16& html, const GURL& base_url);
236 bool GetHtml(string16* html, GURL* base_url) const; 239 bool GetHtml(string16* html, GURL* base_url) const;
237 #endif 240 #endif
238 241
239 private: 242 private:
240 // Provides the actual data. 243 // Provides the actual data.
241 scoped_ptr<Provider> provider_; 244 scoped_ptr<Provider> provider_;
242 245
243 DISALLOW_COPY_AND_ASSIGN(OSExchangeData); 246 DISALLOW_COPY_AND_ASSIGN(OSExchangeData);
244 }; 247 };
245 248
246 } // namespace ui 249 } // namespace ui
247 250
248 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ 251 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_source_win.cc ('k') | ui/base/dragdrop/os_exchange_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698