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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2007-2009 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 #include "config.h" 5 #include "config.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "CSSStyleSelector.h" 10 #include "CSSStyleSelector.h"
(...skipping 17 matching lines...) Expand all
28 #include "HitTestResult.h" 28 #include "HitTestResult.h"
29 #include "Image.h" 29 #include "Image.h"
30 #include "InspectorController.h" 30 #include "InspectorController.h"
31 #include "IntRect.h" 31 #include "IntRect.h"
32 #include "KeyboardCodes.h" 32 #include "KeyboardCodes.h"
33 #include "KeyboardEvent.h" 33 #include "KeyboardEvent.h"
34 #include "MIMETypeRegistry.h" 34 #include "MIMETypeRegistry.h"
35 #include "NodeRenderStyle.h" 35 #include "NodeRenderStyle.h"
36 #include "Page.h" 36 #include "Page.h"
37 #include "PageGroup.h" 37 #include "PageGroup.h"
38 #include "Pasteboard.h"
38 #include "PlatformContextSkia.h" 39 #include "PlatformContextSkia.h"
39 #include "PlatformKeyboardEvent.h" 40 #include "PlatformKeyboardEvent.h"
40 #include "PlatformMouseEvent.h" 41 #include "PlatformMouseEvent.h"
41 #include "PlatformWheelEvent.h" 42 #include "PlatformWheelEvent.h"
42 #include "PluginInfoStore.h" 43 #include "PluginInfoStore.h"
43 #include "PopupMenuChromium.h" 44 #include "PopupMenuChromium.h"
44 #include "PopupMenuClient.h" 45 #include "PopupMenuClient.h"
45 #if defined(OS_WIN) 46 #if defined(OS_WIN)
46 #include "RenderThemeChromiumWin.h" 47 #include "RenderThemeChromiumWin.h"
47 #elif defined(OS_LINUX) 48 #elif defined(OS_LINUX)
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // clears the text box. So it's important this happens after the 558 // clears the text box. So it's important this happens after the
558 // handleMouseReleaseEvent() earlier in this function 559 // handleMouseReleaseEvent() earlier in this function
559 if (event.button == WebMouseEvent::ButtonMiddle) { 560 if (event.button == WebMouseEvent::ButtonMiddle) {
560 Frame* focused = GetFocusedWebCoreFrame(); 561 Frame* focused = GetFocusedWebCoreFrame();
561 IntPoint click_point(last_mouse_down_point_.x, last_mouse_down_point_.y); 562 IntPoint click_point(last_mouse_down_point_.x, last_mouse_down_point_.y);
562 HitTestResult hit_test_result = 563 HitTestResult hit_test_result =
563 focused->eventHandler()->hitTestResultAtPoint(click_point, false, false, 564 focused->eventHandler()->hitTestResultAtPoint(click_point, false, false,
564 ShouldHitTestScrollbars); 565 ShouldHitTestScrollbars);
565 if (!hit_test_result.scrollbar() && focused) { 566 if (!hit_test_result.scrollbar() && focused) {
566 Editor* editor = focused->editor(); 567 Editor* editor = focused->editor();
567 if (editor && editor->canEdit()) 568 Pasteboard* pasteboard = Pasteboard::generalPasteboard();
568 delegate_->PasteFromSelectionClipboard(); 569 bool oldSelectionMode = pasteboard->isSelectionMode();
570 pasteboard->setSelectionMode(true);
571 editor->command(AtomicString("Paste")).execute();
572 pasteboard->setSelectionMode(oldSelectionMode);
569 } 573 }
570 } 574 }
571 #endif 575 #endif
572 576
573 mouseCaptureLost(); 577 mouseCaptureLost();
574 main_frame()->frame()->eventHandler()->handleMouseReleaseEvent( 578 main_frame()->frame()->eventHandler()->handleMouseReleaseEvent(
575 PlatformMouseEventBuilder(main_frame()->frameview(), event)); 579 PlatformMouseEventBuilder(main_frame()->frameview(), event));
576 580
577 #if defined(OS_WIN) 581 #if defined(OS_WIN)
578 // Dispatch the contextmenu event regardless of if the click was swallowed. 582 // Dispatch the contextmenu event regardless of if the click was swallowed.
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 1927
1924 return document->focusedNode(); 1928 return document->focusedNode();
1925 } 1929 }
1926 1930
1927 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { 1931 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) {
1928 IntPoint doc_point( 1932 IntPoint doc_point(
1929 page_->mainFrame()->view()->windowToContents(pos)); 1933 page_->mainFrame()->view()->windowToContents(pos));
1930 return page_->mainFrame()->eventHandler()-> 1934 return page_->mainFrame()->eventHandler()->
1931 hitTestResultAtPoint(doc_point, false); 1935 hitTestResultAtPoint(doc_point, false);
1932 } 1936 }
OLDNEW
« 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