Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / base / dragdrop / os_exchange_data_provider_mac.h
blob3488c25074b4c418f015559515b28560abcf7578
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 ~OSExchangeDataProviderMac() override;
23 // Overridden from OSExchangeData::Provider:
24 Provider* Clone() const override;
25 void MarkOriginatedFromRenderer() override;
26 bool DidOriginateFromRenderer() const override;
27 void SetString(const base::string16& data) override;
28 void SetURL(const GURL& url, const base::string16& title) override;
29 void SetFilename(const base::FilePath& path) override;
30 void SetFilenames(const std::vector<FileInfo>& filenames) override;
31 void SetPickledData(const OSExchangeData::CustomFormat& format,
32 const Pickle& data) override;
33 bool GetString(base::string16* data) const override;
34 bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
35 GURL* url,
36 base::string16* title) const override;
37 bool GetFilename(base::FilePath* path) const override;
38 bool GetFilenames(std::vector<FileInfo>* filenames) const override;
39 bool GetPickledData(const OSExchangeData::CustomFormat& format,
40 Pickle* data) const override;
41 bool HasString() const override;
42 bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override;
43 bool HasFile() const override;
44 bool HasCustomFormat(
45 const OSExchangeData::CustomFormat& format) const override;
47 private:
48 base::scoped_nsobject<NSPasteboard> pasteboard_;
50 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderMac);
53 } // namespace ui
55 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_