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

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

Issue 11787005: Get drag and drop working on Win Ash. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and take out dcheck for win Created 7 years, 11 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_PROVIDER_WIN_H_ 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_
7 7
8 #include <objidl.h> 8 #include <objidl.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #include <string> 10 #include <string>
11 11
12 // Win8 SDK compatibility, see http://goo.gl/fufvl for more information. 12 // Win8 SDK compatibility, see http://goo.gl/fufvl for more information.
13 // "Note: This interface has been renamed IDataObjectAsyncCapability." 13 // "Note: This interface has been renamed IDataObjectAsyncCapability."
14 // If we're building on pre-8 we define it to its old name. It's documented as 14 // If we're building on pre-8 we define it to its old name. It's documented as
15 // being binary compatible. 15 // being binary compatible.
16 #ifndef __IDataObjectAsyncCapability_FWD_DEFINED__ 16 #ifndef __IDataObjectAsyncCapability_FWD_DEFINED__
17 #define IDataObjectAsyncCapability IAsyncOperation 17 #define IDataObjectAsyncCapability IAsyncOperation
18 #endif 18 #endif
19 19
20 #include "base/win/scoped_comptr.h" 20 #include "base/win/scoped_comptr.h"
21 #include "ui/base/dragdrop/os_exchange_data.h" 21 #include "ui/base/dragdrop/os_exchange_data.h"
22 #include "ui/base/ui_export.h" 22 #include "ui/base/ui_export.h"
23 #include "ui/gfx/image/image_skia.h"
24 #include "ui/gfx/vector2d.h"
23 25
24 namespace ui { 26 namespace ui {
25 27
26 class DataObjectImpl : public DownloadFileObserver, 28 class DataObjectImpl : public DownloadFileObserver,
27 public IDataObject, 29 public IDataObject,
28 public IDataObjectAsyncCapability { 30 public IDataObjectAsyncCapability {
29 public: 31 public:
30 class Observer { 32 class Observer {
31 public: 33 public:
32 virtual void OnWaitForData() = 0; 34 virtual void OnWaitForData() = 0;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 std::string* file_contents) const; 181 std::string* file_contents) const;
180 virtual bool GetHtml(string16* html, GURL* base_url) const; 182 virtual bool GetHtml(string16* html, GURL* base_url) const;
181 virtual bool HasString() const; 183 virtual bool HasString() const;
182 virtual bool HasURL() const; 184 virtual bool HasURL() const;
183 virtual bool HasFile() const; 185 virtual bool HasFile() const;
184 virtual bool HasFileContents() const; 186 virtual bool HasFileContents() const;
185 virtual bool HasHtml() const; 187 virtual bool HasHtml() const;
186 virtual bool HasCustomFormat(OSExchangeData::CustomFormat format) const; 188 virtual bool HasCustomFormat(OSExchangeData::CustomFormat format) const;
187 virtual void SetDownloadFileInfo( 189 virtual void SetDownloadFileInfo(
188 const OSExchangeData::DownloadFileInfo& download_info); 190 const OSExchangeData::DownloadFileInfo& download_info);
191 #if defined(USE_AURA)
192 virtual void SetDragImage(const gfx::ImageSkia& image,
193 const gfx::Vector2d& cursor_offset) OVERRIDE;
194 virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE;
195 virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE;
196 #endif
189 197
190 private: 198 private:
191 scoped_refptr<DataObjectImpl> data_; 199 scoped_refptr<DataObjectImpl> data_;
192 base::win::ScopedComPtr<IDataObject> source_object_; 200 base::win::ScopedComPtr<IDataObject> source_object_;
193 201
202 #if defined(USE_AURA)
203 // Drag image and offset data. Only used for Ash.
204 gfx::ImageSkia drag_image_;
205 gfx::Vector2d drag_image_offset_;
206 #endif
207
194 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); 208 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin);
195 }; 209 };
196 210
197 } // namespace ui 211 } // namespace ui
198 212
199 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ 213 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aura.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698