OLD | NEW |
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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 ContextNode node, | 518 ContextNode node, |
519 int x, | 519 int x, |
520 int y, | 520 int y, |
521 const GURL& link_url, | 521 const GURL& link_url, |
522 const GURL& image_url, | 522 const GURL& image_url, |
523 const GURL& page_url, | 523 const GURL& page_url, |
524 const GURL& frame_url, | 524 const GURL& frame_url, |
525 const std::wstring& selection_text, | 525 const std::wstring& selection_text, |
526 const std::wstring& misspelled_word, | 526 const std::wstring& misspelled_word, |
527 int edit_flags, | 527 int edit_flags, |
528 const std::string& security_info) { | 528 const std::string& security_info, |
| 529 const std::string& frame_charset) { |
529 CapturedContextMenuEvent context(node, x, y); | 530 CapturedContextMenuEvent context(node, x, y); |
530 captured_context_menu_events_.push_back(context); | 531 captured_context_menu_events_.push_back(context); |
531 } | 532 } |
532 | 533 |
533 // The output from these methods in layout test mode should match that | 534 // The output from these methods in layout test mode should match that |
534 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree. | 535 // expected by the layout tests. See EditingDelegate.m in DumpRenderTree. |
535 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview, | 536 bool TestWebViewDelegate::ShouldBeginEditing(WebView* webview, |
536 std::wstring range) { | 537 std::wstring range) { |
537 if (shell_->ShouldDumpEditingCallbacks()) { | 538 if (shell_->ShouldDumpEditingCallbacks()) { |
538 std::string utf8 = WideToUTF8(range); | 539 std::string utf8 = WideToUTF8(range); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 } | 888 } |
888 } | 889 } |
889 | 890 |
890 WebWorker* TestWebViewDelegate::CreateWebWorker(WebWorkerClient* client) { | 891 WebWorker* TestWebViewDelegate::CreateWebWorker(WebWorkerClient* client) { |
891 #if ENABLE(WORKERS) | 892 #if ENABLE(WORKERS) |
892 return TestWebWorkerHelper::CreateWebWorker(client); | 893 return TestWebWorkerHelper::CreateWebWorker(client); |
893 #else | 894 #else |
894 return NULL; | 895 return NULL; |
895 #endif | 896 #endif |
896 } | 897 } |
OLD | NEW |