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

Unified Diff: webkit/glue/webview_impl.cc

Issue 174367: Change the ChromiumPasteboard to have a notion of an alternate clipboard... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/tools/test_shell/mock_webclipboard_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 25640)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -35,6 +35,7 @@
#include "NodeRenderStyle.h"
#include "Page.h"
#include "PageGroup.h"
+#include "Pasteboard.h"
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
@@ -564,8 +565,11 @@
ShouldHitTestScrollbars);
if (!hit_test_result.scrollbar() && focused) {
Editor* editor = focused->editor();
- if (editor && editor->canEdit())
- delegate_->PasteFromSelectionClipboard();
+ Pasteboard* pasteboard = Pasteboard::generalPasteboard();
+ bool oldSelectionMode = pasteboard->isSelectionMode();
+ pasteboard->setSelectionMode(true);
+ editor->command(AtomicString("Paste")).execute();
+ pasteboard->setSelectionMode(oldSelectionMode);
}
}
#endif
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/tools/test_shell/mock_webclipboard_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698