Chromium Code Reviews| Index: third_party/WebKit/Source/core/clipboard/Clipboard.h |
| diff --git a/third_party/WebKit/Source/core/clipboard/Clipboard.h b/third_party/WebKit/Source/core/clipboard/Clipboard.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b1b439f9f4df786de3b7d9922c7c6cfc6cd6655d |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/clipboard/Clipboard.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2017 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. |
| + |
| +#ifndef Clipboard_h |
| +#define Clipboard_h |
| + |
| +#include "bindings/core/v8/ScriptPromise.h" |
| +#include "core/dom/ContextLifecycleObserver.h" |
| +#include "core/events/EventTarget.h" |
| +#include "platform/wtf/Noncopyable.h" |
| + |
| +namespace blink { |
| + |
| +class DataTransfer; |
| +class ScriptState; |
| + |
| +class Clipboard : public EventTargetWithInlineData, |
| + public ContextLifecycleObserver { |
| + USING_GARBAGE_COLLECTED_MIXIN(Clipboard); |
| + DEFINE_WRAPPERTYPEINFO(); |
| + WTF_MAKE_NONCOPYABLE(Clipboard); |
| + |
| + public: |
| + explicit Clipboard(ExecutionContext*); |
| + |
| + ScriptPromise read(ScriptState*); |
| + ScriptPromise readText(ScriptState*); |
| + |
| + ScriptPromise write(ScriptState*, DataTransfer*); |
| + ScriptPromise writeText(ScriptState*, const String&); |
| + |
| + // EventTarget |
| + const AtomicString& InterfaceName() const override; |
| + // ContextLifecycleObserver |
|
dcheng
2017/06/06 23:33:38
Nit: remove this comment, the requirement to overr
garykac
2017/06/09 20:38:59
Done.
|
| + ExecutionContext* GetExecutionContext() const override; |
| + |
| + DECLARE_VIRTUAL_TRACE(); |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // Clipboard_h |