Commit 7ca4f321 authored by Jamie Walch's avatar Jamie Walch Committed by Commit Bot

Clear the clipboard to claim ownership of it before updating it.

Bug: 879729
Change-Id: I8a7296b344c42115a7fade7d965a6b38f0688f59
Reviewed-on: https://chromium-review.googlesource.com/c/1281239Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599742}
parent e1fc3396
......@@ -80,6 +80,7 @@ void ClipboardMac::InjectClipboardEvent(const protocol::ClipboardEvent& event) {
// Write text to clipboard.
NSString* text = base::SysUTF8ToNSString(event.data());
NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
[pasteboard clearContents];
[pasteboard writeObjects:@[ text ]];
// Update local change-count to prevent this change from being picked up by
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment