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

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

Issue 5120002: TestShell: Backported EventSender.contextClick() improvement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // TestWebViewDelegate class: 5 // TestWebViewDelegate class:
6 // This class implements the WebViewDelegate methods for the test shell. One 6 // This class implements the WebViewDelegate methods for the test shell. One
7 // instance is owned by each TestShell. 7 // instance is owned by each TestShell.
8 8
9 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ 9 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
10 #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ 10 #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 edit_command_value_ = value; 318 edit_command_value_ = value;
319 } 319 }
320 320
321 void ClearEditCommand() { 321 void ClearEditCommand() {
322 edit_command_name_.clear(); 322 edit_command_name_.clear();
323 edit_command_value_.clear(); 323 edit_command_value_.clear();
324 } 324 }
325 325
326 void SetGeolocationPermission(bool allowed); 326 void SetGeolocationPermission(bool allowed);
327 327
328 void ClearContextMenuData();
329
330 const WebKit::WebContextMenuData* last_context_menu_data() const {
331 return last_context_menu_data_.get();
332 }
333
334 MockSpellCheck* mock_spellcheck() {
335 return &mock_spellcheck_;
336 }
337
328 private: 338 private:
329 339
330 // Called the title of the page changes. 340 // Called the title of the page changes.
331 // Can be used to update the title of the window. 341 // Can be used to update the title of the window.
332 void SetPageTitle(const std::wstring& title); 342 void SetPageTitle(const std::wstring& title);
333 343
334 // Called when the URL of the page changes. 344 // Called when the URL of the page changes.
335 // Extracts the URL and forwards on to SetAddressBarURL(). 345 // Extracts the URL and forwards on to SetAddressBarURL().
336 void UpdateAddressBar(WebKit::WebView* webView); 346 void UpdateAddressBar(WebKit::WebView* webView);
337 347
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 int last_page_id_updated_; 405 int last_page_id_updated_;
396 406
397 scoped_ptr<TestShellExtraData> pending_extra_data_; 407 scoped_ptr<TestShellExtraData> pending_extra_data_;
398 408
399 // Maps resource identifiers to a descriptive string. 409 // Maps resource identifiers to a descriptive string.
400 typedef std::map<uint32, std::string> ResourceMap; 410 typedef std::map<uint32, std::string> ResourceMap;
401 ResourceMap resource_identifier_map_; 411 ResourceMap resource_identifier_map_;
402 std::string GetResourceDescription(uint32 identifier); 412 std::string GetResourceDescription(uint32 identifier);
403 413
404 CapturedContextMenuEvents captured_context_menu_events_; 414 CapturedContextMenuEvents captured_context_menu_events_;
415 scoped_ptr<WebKit::WebContextMenuData> last_context_menu_data_;
405 416
406 WebCursor current_cursor_; 417 WebCursor current_cursor_;
407 418
408 WebKit::WebRect fake_rect_; 419 WebKit::WebRect fake_rect_;
409 bool using_fake_rect_; 420 bool using_fake_rect_;
410 421
411 #if defined(OS_WIN) 422 #if defined(OS_WIN)
412 // Classes needed by drag and drop. 423 // Classes needed by drag and drop.
413 scoped_refptr<TestDragDelegate> drag_delegate_; 424 scoped_refptr<TestDragDelegate> drag_delegate_;
414 scoped_refptr<TestDropDelegate> drop_delegate_; 425 scoped_refptr<TestDropDelegate> drop_delegate_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 458
448 // The mock spellchecker used in TestWebViewDelegate::spellCheck(). 459 // The mock spellchecker used in TestWebViewDelegate::spellCheck().
449 MockSpellCheck mock_spellcheck_; 460 MockSpellCheck mock_spellcheck_;
450 461
451 scoped_ptr<TestGeolocationService> test_geolocation_service_; 462 scoped_ptr<TestGeolocationService> test_geolocation_service_;
452 463
453 DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate); 464 DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate);
454 }; 465 };
455 466
456 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_ 467 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mock_spellcheck.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698