// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_BASE_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_ #define UI_BASE_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_ #include <string> #include "base/component_export.h" #include "base/containers/flat_map.h" #include "build/chromeos_buildflags.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/data_transfer_policy/data_transfer_endpoint.h" namespace base { class Pickle; } namespace ui { // |ScopedClipboardWriter|: // - is a wrapper for |Clipboard|. // - simplifies writing data to the system clipboard. // - handles packing data into a Clipboard::ObjectMap. // // Upon deletion, the class atomically writes all data to the clipboard, // avoiding any potential race condition with other processes that are also // writing to the system clipboard. class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { … }; } // namespace ui #endif // UI_BASE_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_