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

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

Issue 149604: Begin implementation of the context menu for Video and Audio tags. (Closed)
Patch Set: Fix small style issues. 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // shell_->webView()); 563 // shell_->webView());
564 //const DWORD ok_effect = DROPEFFECT_COPY | DROPEFFECT_LINK | DROPEFFECT_MOV E; 564 //const DWORD ok_effect = DROPEFFECT_COPY | DROPEFFECT_LINK | DROPEFFECT_MOV E;
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(WebView* webview, 573 void TestWebViewDelegate::ShowContextMenu(
574 ContextNode node, 574 WebView* webview,
575 int x, 575 ContextNode node,
576 int y, 576 int x,
577 const GURL& link_url, 577 int y,
578 const GURL& image_url, 578 const GURL& link_url,
579 const GURL& page_url, 579 const GURL& image_url,
580 const GURL& frame_url, 580 const GURL& page_url,
581 const std::wstring& selection_text, 581 const GURL& frame_url,
582 const std::wstring& misspelled_word, 582 const ContextMenuMediaParams& media_params,
583 int edit_flags, 583 const std::wstring& selection_text,
584 const std::string& security_info, 584 const std::wstring& misspelled_word,
585 const std::string& frame_charset) { 585 int edit_flags,
586 const std::string& security_info,
587 const std::string& frame_charset) {
586 CapturedContextMenuEvent context(node, x, y); 588 CapturedContextMenuEvent context(node, x, y);
587 captured_context_menu_events_.push_back(context); 589 captured_context_menu_events_.push_back(context);
588 } 590 }
589 591
590 // 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
591 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree. 593 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree.
592 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview, 594 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview,
593 std::wstring range) { 595 std::wstring range) {
594 if (shell_->ShouldDumpEditingCallbacks()) { 596 if (shell_->ShouldDumpEditingCallbacks()) {
595 std::string utf8 = WideToUTF8(range); 597 std::string utf8 = WideToUTF8(range);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 return L"main frame \"" + name + L"\""; 922 return L"main frame \"" + name + L"\"";
921 else 923 else
922 return L"main frame"; 924 return L"main frame";
923 } else { 925 } else {
924 if (name.length()) 926 if (name.length())
925 return L"frame \"" + name + L"\""; 927 return L"frame \"" + name + L"\"";
926 else 928 else
927 return L"frame (anonymous)"; 929 return L"frame (anonymous)";
928 } 930 }
929 } 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