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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 155954: Implement sending actions back to the render for media element context menus. (Closed)
Patch Set: remove uneeded bits. Created 11 years, 5 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
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file contains the implementation of TestWebViewDelegate, which serves 5 // This file contains the implementation of TestWebViewDelegate, which serves
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to
7 // have initialized a MessageLoop before these methods are called. 7 // have initialized a MessageLoop before these methods are called.
8 8
9 #include "config.h" 9 #include "config.h"
10 10
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 //DWORD effect; 565 //DWORD effect;
566 //HRESULT res = DoDragDrop(drop_data.data_object, drag_delegate_.get(), 566 //HRESULT res = DoDragDrop(drop_data.data_object, drag_delegate_.get(),
567 // ok_effect, &effect); 567 // ok_effect, &effect);
568 //DCHECK(DRAGDROP_S_DROP == res || DRAGDROP_S_CANCEL == res); 568 //DCHECK(DRAGDROP_S_DROP == res || DRAGDROP_S_CANCEL == res);
569 } 569 }
570 webview->DragSourceSystemDragEnded(); 570 webview->DragSourceSystemDragEnded();
571 } 571 }
572 572
573 void TestWebViewDelegate::ShowContextMenu( 573 void TestWebViewDelegate::ShowContextMenu(
574 WebView* webview, 574 WebView* webview,
575 ContextNode node, 575 ContextNodeType node_type,
576 int x, 576 int x,
577 int y, 577 int y,
578 const GURL& link_url, 578 const GURL& link_url,
579 const GURL& image_url, 579 const GURL& image_url,
580 const GURL& page_url, 580 const GURL& page_url,
581 const GURL& frame_url, 581 const GURL& frame_url,
582 const ContextMenuMediaParams& media_params, 582 const ContextMenuMediaParams& media_params,
583 const std::wstring& selection_text, 583 const std::wstring& selection_text,
584 const std::wstring& misspelled_word, 584 const std::wstring& misspelled_word,
585 int edit_flags, 585 int edit_flags,
586 const std::string& security_info, 586 const std::string& security_info,
587 const std::string& frame_charset) { 587 const std::string& frame_charset) {
588 CapturedContextMenuEvent context(node, x, y); 588 CapturedContextMenuEvent context(node_type, x, y);
589 captured_context_menu_events_.push_back(context); 589 captured_context_menu_events_.push_back(context);
590 } 590 }
591 591
592 // The output from these methods in layout test mode should match that 592 // The output from these methods in layout test mode should match that
593 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree. 593 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree.
594 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview, 594 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview,
595 std::wstring range) { 595 std::wstring range) {
596 if (shell_->ShouldDumpEditingCallbacks()) { 596 if (shell_->ShouldDumpEditingCallbacks()) {
597 std::string utf8 = WideToUTF8(range); 597 std::string utf8 = WideToUTF8(range);
598 printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", 598 printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n",
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 return L"main frame \"" + name + L"\""; 922 return L"main frame \"" + name + L"\"";
923 else 923 else
924 return L"main frame"; 924 return L"main frame";
925 } else { 925 } else {
926 if (name.length()) 926 if (name.length())
927 return L"frame \"" + name + L"\""; 927 return L"frame \"" + name + L"\"";
928 else 928 else
929 return L"frame (anonymous)"; 929 return L"frame (anonymous)";
930 } 930 }
931 } 931 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698