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

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

Issue 159471: Merge 21466 - Allow the browser to send actions back to the render for media ... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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/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')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/webkit/tools/test_shell/test_webview_delegate.cc:r21466
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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 //DWORD effect; 567 //DWORD effect;
568 //HRESULT res = DoDragDrop(drop_data.data_object, drag_delegate_.get(), 568 //HRESULT res = DoDragDrop(drop_data.data_object, drag_delegate_.get(),
569 // ok_effect, &effect); 569 // ok_effect, &effect);
570 //DCHECK(DRAGDROP_S_DROP == res || DRAGDROP_S_CANCEL == res); 570 //DCHECK(DRAGDROP_S_DROP == res || DRAGDROP_S_CANCEL == res);
571 } 571 }
572 webview->DragSourceSystemDragEnded(); 572 webview->DragSourceSystemDragEnded();
573 } 573 }
574 574
575 void TestWebViewDelegate::ShowContextMenu( 575 void TestWebViewDelegate::ShowContextMenu(
576 WebView* webview, 576 WebView* webview,
577 ContextNode node, 577 ContextNodeType node_type,
578 int x, 578 int x,
579 int y, 579 int y,
580 const GURL& link_url, 580 const GURL& link_url,
581 const GURL& image_url, 581 const GURL& image_url,
582 const GURL& page_url, 582 const GURL& page_url,
583 const GURL& frame_url, 583 const GURL& frame_url,
584 const ContextMenuMediaParams& media_params, 584 const ContextMenuMediaParams& media_params,
585 const std::wstring& selection_text, 585 const std::wstring& selection_text,
586 const std::wstring& misspelled_word, 586 const std::wstring& misspelled_word,
587 int edit_flags, 587 int edit_flags,
588 const std::string& security_info, 588 const std::string& security_info,
589 const std::string& frame_charset) { 589 const std::string& frame_charset) {
590 CapturedContextMenuEvent context(node, x, y); 590 CapturedContextMenuEvent context(node_type, x, y);
591 captured_context_menu_events_.push_back(context); 591 captured_context_menu_events_.push_back(context);
592 } 592 }
593 593
594 // The output from these methods in layout test mode should match that 594 // The output from these methods in layout test mode should match that
595 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree. 595 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree.
596 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview, 596 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview,
597 std::wstring range) { 597 std::wstring range) {
598 if (shell_->ShouldDumpEditingCallbacks()) { 598 if (shell_->ShouldDumpEditingCallbacks()) {
599 std::string utf8 = WideToUTF8(range); 599 std::string utf8 = WideToUTF8(range);
600 printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", 600 printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n",
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 return L"main frame \"" + name + L"\""; 924 return L"main frame \"" + name + L"\"";
925 else 925 else
926 return L"main frame"; 926 return L"main frame";
927 } else { 927 } else {
928 if (name.length()) 928 if (name.length())
929 return L"frame \"" + name + L"\""; 929 return L"frame \"" + name + L"\"";
930 else 930 else
931 return L"frame (anonymous)"; 931 return L"frame (anonymous)";
932 } 932 }
933 } 933 }
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