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

Side by Side Diff: content/renderer/renderer_clipboard_client.h

Issue 574273002: Rewrite clipboard write IPC handling to be easier to understand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document Created 6 years, 1 month 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 (c) 2012 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 CONTENT_RENDERER_RENDERER_CLIPBOARD_CLIENT_H_
6 #define CONTENT_RENDERER_RENDERER_CLIPBOARD_CLIENT_H_
7
8 #include "base/compiler_specific.h"
9 #include "content/renderer/clipboard_client.h"
10
11 namespace content {
12
13 // An implementation of ClipboardClient that gets and sends data over IPC.
14 class RendererClipboardClient : public ClipboardClient {
15 public:
16 RendererClipboardClient();
17 ~RendererClipboardClient() override;
18
19 ui::Clipboard* GetClipboard() override;
20 uint64 GetSequenceNumber(ui::ClipboardType type) override;
21 bool IsFormatAvailable(ClipboardFormat format,
22 ui::ClipboardType type) override;
23 void Clear(ui::ClipboardType type) override;
24 void ReadAvailableTypes(ui::ClipboardType type,
25 std::vector<base::string16>* types,
26 bool* contains_filenames) override;
27 void ReadText(ui::ClipboardType type, base::string16* result) override;
28 void ReadHTML(ui::ClipboardType type,
29 base::string16* markup,
30 GURL* url,
31 uint32* fragment_start,
32 uint32* fragment_end) override;
33 void ReadRTF(ui::ClipboardType type, std::string* result) override;
34 void ReadImage(ui::ClipboardType type, std::string* data) override;
35 void ReadCustomData(ui::ClipboardType clipboard_type,
36 const base::string16& type,
37 base::string16* data) override;
38 WriteContext* CreateWriteContext() override;
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_RENDERER_RENDERER_CLIPBOARD_CLIENT_H_
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | content/renderer/renderer_clipboard_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698