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

Side by Side Diff: components/html_viewer/web_clipboard_impl.h

Issue 1677293002: Bye bye Mandoline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 4 years, 10 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
« no previous file with comments | « components/html_viewer/touch_handler.cc ('k') | components/html_viewer/web_clipboard_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_HTML_VIEWER_WEB_CLIPBOARD_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_WEB_CLIPBOARD_IMPL_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "components/clipboard/public/interfaces/clipboard.mojom.h"
12 #include "third_party/WebKit/public/platform/WebClipboard.h"
13
14 namespace html_viewer {
15
16 class WebClipboardImpl : public blink::WebClipboard {
17 public:
18 WebClipboardImpl(mojo::ClipboardPtr clipboard);
19 virtual ~WebClipboardImpl();
20
21 // blink::WebClipboard methods:
22 uint64_t sequenceNumber(Buffer) override;
23 bool isFormatAvailable(Format, Buffer) override;
24 blink::WebVector<blink::WebString> readAvailableTypes(
25 Buffer buffer,
26 bool* contains_filenames) override;
27 blink::WebString readPlainText(Buffer buffer) override;
28 blink::WebString readHTML(Buffer buffer,
29 blink::WebURL* page_url,
30 unsigned* fragment_start,
31 unsigned* fragment_end) override;
32 // TODO(erg): readImage()
33 blink::WebString readCustomData(Buffer buffer,
34 const blink::WebString& type) override;
35 void writePlainText(const blink::WebString& plain_text) override;
36 void writeHTML(const blink::WebString& html_text,
37 const blink::WebURL& source_url,
38 const blink::WebString& plain_text,
39 bool write_smart_paste) override;
40
41 private:
42 // Changes webkit buffers to mojo Clipboard::Types.
43 mojo::Clipboard::Type ConvertBufferType(Buffer buffer);
44
45 mojo::ClipboardPtr clipboard_;
46
47 DISALLOW_COPY_AND_ASSIGN(WebClipboardImpl);
48 };
49
50 } // namespace html_viewer
51
52 #endif // COMPONENTS_HTML_VIEWER_WEB_CLIPBOARD_IMPL_H_
OLDNEW
« no previous file with comments | « components/html_viewer/touch_handler.cc ('k') | components/html_viewer/web_clipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698