| Index: ui/base/clipboard/custom_data_helper.h
|
| diff --git a/ui/base/clipboard/custom_data_helper.h b/ui/base/clipboard/custom_data_helper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3294f5168e60f989e0fdb426b0dbe8b052f2d35f
|
| --- /dev/null
|
| +++ b/ui/base/clipboard/custom_data_helper.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +//
|
| +// Due to restrictions of most operating systems, we don't directly map each
|
| +// type of custom data to a native data transfer type. Instead, we serialize
|
| +// each key-value pair into the pickle as a pair of string objects, and then
|
| +// write the binary data in the pickle to the native data transfer object.
|
| +
|
| +#ifndef UI_BASE_CLIPBOARD_CUSTOM_DATA_HELPER_H_
|
| +#define UI_BASE_CLIPBOARD_CUSTOM_DATA_HELPER_H_
|
| +#pragma once
|
| +
|
| +#include <map>
|
| +#include <vector>
|
| +
|
| +#include "base/string16.h"
|
| +#include "ui/base/ui_export.h"
|
| +
|
| +class Pickle;
|
| +
|
| +namespace ui {
|
| +
|
| +UI_EXPORT void ReadCustomDataTypes(const void* data,
|
| + size_t data_length,
|
| + std::vector<string16>* types);
|
| +UI_EXPORT void ReadCustomDataForType(const void* data,
|
| + size_t data_length,
|
| + const string16& type,
|
| + string16* result);
|
| +UI_EXPORT void ReadCustomDataIntoMap(const void* data,
|
| + size_t data_length,
|
| + std::map<string16, string16>* result);
|
| +
|
| +UI_EXPORT void WriteCustomDataToPickle(const std::map<string16, string16>& data,
|
| + Pickle* pickle);
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_
|
|
|