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

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

Issue 9382037: Move ContextMenuParams struct from webkit/glue to content/public/common. The reasons are: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/tools/test_shell/test_webview_delegate.h" 9 #include "webkit/tools/test_shell/test_webview_delegate.h"
10 10
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 return true; 488 return true;
489 } 489 }
490 return false; 490 return false;
491 } 491 }
492 492
493 bool TestWebViewDelegate::runModalBeforeUnloadDialog( 493 bool TestWebViewDelegate::runModalBeforeUnloadDialog(
494 WebFrame* frame, const WebString& message) { 494 WebFrame* frame, const WebString& message) {
495 return true; // Allow window closure. 495 return true; // Allow window closure.
496 } 496 }
497 497
498 void TestWebViewDelegate::showContextMenu(
499 WebFrame* frame, const WebContextMenuData& data) {
500 CapturedContextMenuEvent context(data.mediaType,
501 data.mousePosition.x,
502 data.mousePosition.y);
503 captured_context_menu_events_.push_back(context);
504 last_context_menu_data_.reset(new WebContextMenuData(data));
505 }
506
507 void TestWebViewDelegate::ClearContextMenuData() {
508 last_context_menu_data_.reset();
509 }
510
511 498
512 499
513 500
514 void TestWebViewDelegate::setStatusText(const WebString& text) { 501 void TestWebViewDelegate::setStatusText(const WebString& text) {
515 } 502 }
516 503
517 void TestWebViewDelegate::startDragging( 504 void TestWebViewDelegate::startDragging(
518 const WebDragData& data, 505 const WebDragData& data,
519 WebDragOperationsMask mask, 506 WebDragOperationsMask mask,
520 const WebImage& image, 507 const WebImage& image,
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1144 }
1158 1145
1159 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1146 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1160 fake_rect_ = rect; 1147 fake_rect_ = rect;
1161 using_fake_rect_ = true; 1148 using_fake_rect_ = true;
1162 } 1149 }
1163 1150
1164 WebRect TestWebViewDelegate::fake_window_rect() { 1151 WebRect TestWebViewDelegate::fake_window_rect() {
1165 return fake_rect_; 1152 return fake_rect_;
1166 } 1153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698