Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / base / dragdrop / os_exchange_data_provider_mac.h
blob1e46e2e4ae0d9d0cb4e8561de1c163a8df603caa
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_
8 #import "base/mac/scoped_nsobject.h"
9 #include "ui/base/dragdrop/os_exchange_data.h"
11 @class NSPasteboard;
13 namespace ui {
15 // OSExchangeData::Provider implementation for Mac.
16 class UI_BASE_EXPORT OSExchangeDataProviderMac
17 : public OSExchangeData::Provider {
18 public:
19 OSExchangeDataProviderMac();
20 explicit OSExchangeDataProviderMac(NSPasteboard* pasteboard);
21 virtual ~OSExchangeDataProviderMac();
23 // Overridden from OSExchangeData::Provider:
24 virtual Provider* Clone() const OVERRIDE;
25 virtual void MarkOriginatedFromRenderer() OVERRIDE;
26 virtual bool DidOriginateFromRenderer() const OVERRIDE;
27 virtual void SetString(const base::string16& data) OVERRIDE;
28 virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE;
29 virtual void SetFilename(const base::FilePath& path) OVERRIDE;
30 virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE;
31 virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
32 const Pickle& data) OVERRIDE;
33 virtual bool GetString(base::string16* data) const OVERRIDE;
34 virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
35 GURL* url,
36 base::string16* title) const OVERRIDE;
37 virtual bool GetFilename(base::FilePath* path) const OVERRIDE;
38 virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE;
39 virtual bool GetPickledData(const OSExchangeData::CustomFormat& format,
40 Pickle* data) const OVERRIDE;
41 virtual bool HasString() const OVERRIDE;
42 virtual bool HasURL(
43 OSExchangeData::FilenameToURLPolicy policy) const OVERRIDE;
44 virtual bool HasFile() const OVERRIDE;
45 virtual bool HasCustomFormat(
46 const OSExchangeData::CustomFormat& format) const OVERRIDE;
48 private:
49 base::scoped_nsobject<NSPasteboard> pasteboard_;
51 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderMac);
54 } // namespace ui
56 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_