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

Unified Diff: content/browser/renderer_host/clipboard_message_filter.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | content/browser/renderer_host/clipboard_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/clipboard_message_filter.h
diff --git a/content/browser/renderer_host/clipboard_message_filter.h b/content/browser/renderer_host/clipboard_message_filter.h
index 3f01e8682dc4fa3f3d48eec14ebbd7d0b1604f53..792bfc5b774c1563b3e1a94df3ab4f50679465a5 100644
--- a/content/browser/renderer_host/clipboard_message_filter.h
+++ b/content/browser/renderer_host/clipboard_message_filter.h
@@ -9,23 +9,15 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/memory/shared_memory.h"
#include "content/common/clipboard_format.h"
-#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
#include "ui/base/clipboard/clipboard.h"
class GURL;
-namespace ui {
-class ScopedClipboardWriter;
-} // namespace ui
-
namespace content {
-class ClipboardMessageFilterTest;
-
-class CONTENT_EXPORT ClipboardMessageFilter : public BrowserMessageFilter {
+class ClipboardMessageFilter : public BrowserMessageFilter {
public:
ClipboardMessageFilter();
@@ -34,9 +26,12 @@
bool OnMessageReceived(const IPC::Message& message) override;
private:
- friend class ClipboardMessageFilterTest;
+ ~ClipboardMessageFilter() override;
- ~ClipboardMessageFilter() override;
+ void OnWriteObjectsAsync(const ui::Clipboard::ObjectMap& objects);
+ void OnWriteObjectsSync(const ui::Clipboard::ObjectMap& objects,
+ base::SharedMemoryHandle bitmap_handle);
+ static void WriteObjectsOnUIThread(const ui::Clipboard::ObjectMap* objects);
void OnGetSequenceNumber(const ui::ClipboardType type,
uint64* sequence_number);
@@ -62,22 +57,6 @@
void OnReadData(const ui::Clipboard::FormatType& format,
std::string* data);
- void OnWriteText(ui::ClipboardType clipboard_type,
- const base::string16& text);
- void OnWriteHTML(ui::ClipboardType clipboard_type,
- const base::string16& markup,
- const GURL& url);
- void OnWriteSmartPasteMarker(ui::ClipboardType clipboard_type);
- void OnWriteCustomData(ui::ClipboardType clipboard_type,
- const std::map<base::string16, base::string16>& data);
- void OnWriteBookmark(ui::ClipboardType clipboard_type,
- const GURL& url,
- const base::string16& title);
- void OnWriteImage(ui::ClipboardType clipboard_type,
- const gfx::Size& size,
- base::SharedMemoryHandle handle);
- void OnCommitWrite(ui::ClipboardType clipboard_type);
-
#if defined(OS_MACOSX)
void OnFindPboardWriteString(const base::string16& text);
#endif
@@ -88,8 +67,6 @@
// thread.
static ui::Clipboard* GetClipboard();
- scoped_ptr<ui::ScopedClipboardWriter> clipboard_writer_;
-
DISALLOW_COPY_AND_ASSIGN(ClipboardMessageFilter);
};
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | content/browser/renderer_host/clipboard_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698