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

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

Issue 6862002: Merge gpu_trace_event back into base/debug/trace_event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits & merge r84136 Created 9 years, 7 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) 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 812
813 void TestWebViewDelegate::didHandleOnloadEvents(WebFrame* frame) { 813 void TestWebViewDelegate::didHandleOnloadEvents(WebFrame* frame) {
814 } 814 }
815 815
816 void TestWebViewDelegate::didFailLoad( 816 void TestWebViewDelegate::didFailLoad(
817 WebFrame* frame, const WebURLError& error) { 817 WebFrame* frame, const WebURLError& error) {
818 LocationChangeDone(frame); 818 LocationChangeDone(frame);
819 } 819 }
820 820
821 void TestWebViewDelegate::didFinishLoad(WebFrame* frame) { 821 void TestWebViewDelegate::didFinishLoad(WebFrame* frame) {
822 TRACE_EVENT_END("frame.load", this, frame->url().spec()); 822 TRACE_EVENT_END_ETW("frame.load", this, frame->url().spec());
823 UpdateAddressBar(frame->view()); 823 UpdateAddressBar(frame->view());
824 LocationChangeDone(frame); 824 LocationChangeDone(frame);
825 } 825 }
826 826
827 void TestWebViewDelegate::didNavigateWithinPage( 827 void TestWebViewDelegate::didNavigateWithinPage(
828 WebFrame* frame, bool is_new_navigation) { 828 WebFrame* frame, bool is_new_navigation) {
829 frame->dataSource()->setExtraData(pending_extra_data_.release()); 829 frame->dataSource()->setExtraData(pending_extra_data_.release());
830 830
831 UpdateForCommittedLoad(frame, is_new_navigation); 831 UpdateForCommittedLoad(frame, is_new_navigation);
832 } 832 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 870
871 // To block the request, we set its URL to an empty one. 871 // To block the request, we set its URL to an empty one.
872 request.setURL(WebURL()); 872 request.setURL(WebURL());
873 return; 873 return;
874 } 874 }
875 875
876 for (std::set<std::string>::const_iterator header = clear_headers_.begin(); 876 for (std::set<std::string>::const_iterator header = clear_headers_.begin();
877 header != clear_headers_.end(); ++header) 877 header != clear_headers_.end(); ++header)
878 request.clearHTTPHeaderField(WebString::fromUTF8(*header)); 878 request.clearHTTPHeaderField(WebString::fromUTF8(*header));
879 879
880 TRACE_EVENT_BEGIN("url.load", identifier, request_url); 880 TRACE_EVENT_BEGIN_ETW("url.load", identifier, request_url);
881 // Set the new substituted URL. 881 // Set the new substituted URL.
882 request.setURL(GURL(TestShell::RewriteLocalUrl(request_url))); 882 request.setURL(GURL(TestShell::RewriteLocalUrl(request_url)));
883 } 883 }
884 884
885 void TestWebViewDelegate::didReceiveResponse( 885 void TestWebViewDelegate::didReceiveResponse(
886 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { 886 WebFrame* frame, unsigned identifier, const WebURLResponse& response) {
887 } 887 }
888 888
889 void TestWebViewDelegate::didFinishResourceLoad( 889 void TestWebViewDelegate::didFinishResourceLoad(
890 WebFrame* frame, unsigned identifier) { 890 WebFrame* frame, unsigned identifier) {
891 TRACE_EVENT_END("url.load", identifier, ""); 891 TRACE_EVENT_END_ETW("url.load", identifier, "");
892 resource_identifier_map_.erase(identifier); 892 resource_identifier_map_.erase(identifier);
893 } 893 }
894 894
895 void TestWebViewDelegate::didFailResourceLoad( 895 void TestWebViewDelegate::didFailResourceLoad(
896 WebFrame* frame, unsigned identifier, const WebURLError& error) { 896 WebFrame* frame, unsigned identifier, const WebURLError& error) {
897 resource_identifier_map_.erase(identifier); 897 resource_identifier_map_.erase(identifier);
898 } 898 }
899 899
900 void TestWebViewDelegate::didDisplayInsecureContent(WebFrame* frame) { 900 void TestWebViewDelegate::didDisplayInsecureContent(WebFrame* frame) {
901 } 901 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 } 1120 }
1121 1121
1122 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1122 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1123 fake_rect_ = rect; 1123 fake_rect_ = rect;
1124 using_fake_rect_ = true; 1124 using_fake_rect_ = true;
1125 } 1125 }
1126 1126
1127 WebRect TestWebViewDelegate::fake_window_rect() { 1127 WebRect TestWebViewDelegate::fake_window_rect() {
1128 return fake_rect_; 1128 return fake_rect_;
1129 } 1129 }
OLDNEW
« base/debug/trace_event.h ('K') | « webkit/tools/test_shell/test_shell_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698