2011-12-16 15:51:10 +01:00
|
|
|
// 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.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#ifndef CEF_LIBCEF_SIMPLE_CLIPBOARD_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_SIMPLE_CLIPBOARD_IMPL_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2011-12-16 15:51:10 +01:00
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
#include "webkit/glue/clipboard_client.h"
|
|
|
|
|
|
|
|
class SimpleClipboardClient : public webkit_glue::ClipboardClient {
|
|
|
|
public:
|
|
|
|
SimpleClipboardClient();
|
|
|
|
virtual ~SimpleClipboardClient();
|
|
|
|
|
|
|
|
virtual ui::Clipboard* GetClipboard() OVERRIDE;
|
|
|
|
virtual uint64 GetSequenceNumber(ui::Clipboard::Buffer buffer) OVERRIDE;
|
|
|
|
virtual bool IsFormatAvailable(const ui::Clipboard::FormatType& format,
|
|
|
|
ui::Clipboard::Buffer buffer) OVERRIDE;
|
2012-04-05 00:32:24 +02:00
|
|
|
virtual void Clear(ui::Clipboard::Buffer buffer) OVERRIDE;
|
2011-12-16 15:51:10 +01:00
|
|
|
virtual void ReadAvailableTypes(ui::Clipboard::Buffer buffer,
|
|
|
|
std::vector<string16>* types,
|
|
|
|
bool* contains_filenames) OVERRIDE;
|
|
|
|
virtual void ReadText(ui::Clipboard::Buffer buffer,
|
|
|
|
string16* result) OVERRIDE;
|
|
|
|
virtual void ReadAsciiText(ui::Clipboard::Buffer buffer,
|
|
|
|
std::string* result) OVERRIDE;
|
|
|
|
virtual void ReadHTML(ui::Clipboard::Buffer buffer, string16* markup,
|
|
|
|
GURL* url, uint32* fragment_start,
|
|
|
|
uint32* fragment_end) OVERRIDE;
|
2012-04-05 05:02:46 +02:00
|
|
|
virtual void ReadRTF(ui::Clipboard::Buffer buffer,
|
|
|
|
std::string* result) OVERRIDE;
|
2011-12-16 15:51:10 +01:00
|
|
|
virtual void ReadImage(ui::Clipboard::Buffer buffer,
|
|
|
|
std::string* data) OVERRIDE;
|
|
|
|
virtual void ReadCustomData(ui::Clipboard::Buffer buffer,
|
|
|
|
const string16& type,
|
|
|
|
string16* data) OVERRIDE;
|
2012-11-06 18:13:58 +01:00
|
|
|
virtual void ReadData(const ui::Clipboard::FormatType& format,
|
|
|
|
std::string* data) OVERRIDE;
|
2011-12-16 15:51:10 +01:00
|
|
|
virtual WriteContext* CreateWriteContext() OVERRIDE;
|
|
|
|
};
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#endif // CEF_LIBCEF_SIMPLE_CLIPBOARD_IMPL_H_
|