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

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

Issue 740003003: Revert of Rewrite clipboard write IPC handling to be easier to understand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/renderer/scoped_clipboard_writer_glue.cc ('k') | content/renderer/webclipboard_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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_
6 #define CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ 6 #define CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9
9 #include "third_party/WebKit/public/platform/WebClipboard.h" 10 #include "third_party/WebKit/public/platform/WebClipboard.h"
10 #include "ui/base/clipboard/clipboard.h" 11 #include "ui/base/clipboard/clipboard.h"
11 12
12 #include <string> 13 #include <string>
13 14
14 namespace content { 15 namespace content {
15 class RendererClipboardDelegate; 16 class ClipboardClient;
16 17
17 class WebClipboardImpl : public blink::WebClipboard { 18 class WebClipboardImpl : public blink::WebClipboard {
18 public: 19 public:
19 explicit WebClipboardImpl(RendererClipboardDelegate* delegate); 20 explicit WebClipboardImpl(ClipboardClient* client);
20 21
21 virtual ~WebClipboardImpl(); 22 virtual ~WebClipboardImpl();
22 23
23 // WebClipboard methods: 24 // WebClipboard methods:
24 virtual uint64 sequenceNumber(Buffer buffer); 25 virtual uint64 sequenceNumber(Buffer buffer);
25 virtual bool isFormatAvailable(Format format, Buffer buffer); 26 virtual bool isFormatAvailable(Format format, Buffer buffer);
26 virtual blink::WebVector<blink::WebString> readAvailableTypes( 27 virtual blink::WebVector<blink::WebString> readAvailableTypes(
27 Buffer buffer, bool* contains_filenames); 28 Buffer buffer, bool* contains_filenames);
28 virtual blink::WebString readPlainText(Buffer buffer); 29 virtual blink::WebString readPlainText(Buffer buffer);
29 virtual blink::WebString readHTML( 30 virtual blink::WebString readHTML(
(...skipping 11 matching lines...) Expand all
41 const blink::WebString& plain_text, 42 const blink::WebString& plain_text,
42 bool write_smart_paste); 43 bool write_smart_paste);
43 virtual void writeImage( 44 virtual void writeImage(
44 const blink::WebImage& image, 45 const blink::WebImage& image,
45 const blink::WebURL& source_url, 46 const blink::WebURL& source_url,
46 const blink::WebString& title); 47 const blink::WebString& title);
47 virtual void writeDataObject(const blink::WebDragData& data); 48 virtual void writeDataObject(const blink::WebDragData& data);
48 49
49 private: 50 private:
50 bool ConvertBufferType(Buffer, ui::ClipboardType*); 51 bool ConvertBufferType(Buffer, ui::ClipboardType*);
51 RendererClipboardDelegate* const delegate_; 52 ClipboardClient* client_;
52 }; 53 };
53 54
54 } // namespace content 55 } // namespace content
55 56
56 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ 57 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/scoped_clipboard_writer_glue.cc ('k') | content/renderer/webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698