| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 817 |
| 818 void TestWebViewDelegate::didHandleOnloadEvents(WebFrame* frame) { | 818 void TestWebViewDelegate::didHandleOnloadEvents(WebFrame* frame) { |
| 819 } | 819 } |
| 820 | 820 |
| 821 void TestWebViewDelegate::didFailLoad( | 821 void TestWebViewDelegate::didFailLoad( |
| 822 WebFrame* frame, const WebURLError& error) { | 822 WebFrame* frame, const WebURLError& error) { |
| 823 LocationChangeDone(frame); | 823 LocationChangeDone(frame); |
| 824 } | 824 } |
| 825 | 825 |
| 826 void TestWebViewDelegate::didFinishLoad(WebFrame* frame) { | 826 void TestWebViewDelegate::didFinishLoad(WebFrame* frame) { |
| 827 TRACE_EVENT_END_ETW("frame.load", this, frame->document().url().spec()); | 827 TRACE_EVENT_END_ETW("frame.load", this, |
| 828 std::string(frame->document().url().spec())); |
| 828 UpdateAddressBar(frame->view()); | 829 UpdateAddressBar(frame->view()); |
| 829 LocationChangeDone(frame); | 830 LocationChangeDone(frame); |
| 830 } | 831 } |
| 831 | 832 |
| 832 void TestWebViewDelegate::didNavigateWithinPage( | 833 void TestWebViewDelegate::didNavigateWithinPage( |
| 833 WebFrame* frame, bool is_new_navigation) { | 834 WebFrame* frame, bool is_new_navigation) { |
| 834 frame->dataSource()->setExtraData(pending_extra_data_.release()); | 835 frame->dataSource()->setExtraData(pending_extra_data_.release()); |
| 835 | 836 |
| 836 UpdateForCommittedLoad(frame, is_new_navigation); | 837 UpdateForCommittedLoad(frame, is_new_navigation); |
| 837 } | 838 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 } | 1126 } |
| 1126 | 1127 |
| 1127 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { | 1128 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { |
| 1128 fake_rect_ = rect; | 1129 fake_rect_ = rect; |
| 1129 using_fake_rect_ = true; | 1130 using_fake_rect_ = true; |
| 1130 } | 1131 } |
| 1131 | 1132 |
| 1132 WebRect TestWebViewDelegate::fake_window_rect() { | 1133 WebRect TestWebViewDelegate::fake_window_rect() { |
| 1133 return fake_rect_; | 1134 return fake_rect_; |
| 1134 } | 1135 } |
| OLD | NEW |