Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: mojo/services/html_viewer/webclipboard_impl.h

Issue 562483002: mojo: Create a basic clipboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to the gn files. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef MOJO_SERVICES_HTML_VIEWER_WEBCLIPBOARD_IMPL_H_
6 #define MOJO_SERVICES_HTML_VIEWER_WEBCLIPBOARD_IMPL_H_
7
8 #include "mojo/services/public/interfaces/clipboard/clipboard.mojom.h"
9 #include "third_party/WebKit/public/platform/WebClipboard.h"
10
11 namespace mojo {
12
13 class WebClipboardImpl : public blink::WebClipboard {
14 public:
15 WebClipboardImpl(ClipboardPtr clipboard);
16 virtual ~WebClipboardImpl();
17
18 // blink::WebClipboard methods:
19 virtual uint64_t sequenceNumber(Buffer);
20 virtual bool isFormatAvailable(Format, Buffer);
21 virtual blink::WebVector<blink::WebString> readAvailableTypes(
22 Buffer,
23 bool* containsFilenames);
24 virtual blink::WebString readPlainText(Buffer);
25 virtual blink::WebString readHTML(Buffer buffer,
26 blink::WebURL* pageURL,
27 unsigned* fragmentStart,
28 unsigned* fragmentEnd);
29 // TODO(erg): readImage()
30 virtual blink::WebString readCustomData(Buffer, const blink::WebString& type);
31 virtual void writePlainText(const blink::WebString&);
32 virtual void writeHTML(const blink::WebString& htmlText,
33 const blink::WebURL&,
34 const blink::WebString& plainText,
35 bool writeSmartPaste);
36
37 private:
38 // Changes webkit buffers to mojo Clipboard::Types.
39 mojo::Clipboard::Type ConvertBufferType(Buffer buffer);
40
41 ClipboardPtr clipboard_;
42
43 DISALLOW_COPY_AND_ASSIGN(WebClipboardImpl);
44 };
45
46 } // namespace mojo
47
48 #endif // MOJO_SERVICES_HTML_VIEWER_WEBCLIPBOARD_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/blink_platform_impl.cc ('k') | mojo/services/html_viewer/webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698