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

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

Issue 10795071: Merge 147060 to 1180 (M21) - PPAPI (Flash): Properly honor Pepper url requests with custom user age… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 863 }
864 864
865 void TestWebViewDelegate::willSendRequest( 865 void TestWebViewDelegate::willSendRequest(
866 WebFrame* frame, unsigned identifier, WebURLRequest& request, 866 WebFrame* frame, unsigned identifier, WebURLRequest& request,
867 const WebURLResponse& redirect_response) { 867 const WebURLResponse& redirect_response) {
868 GURL url = request.url(); 868 GURL url = request.url();
869 std::string request_url = url.possibly_invalid_spec(); 869 std::string request_url = url.possibly_invalid_spec();
870 870
871 request.setExtraData( 871 request.setExtraData(
872 new webkit_glue::WebURLRequestExtraDataImpl( 872 new webkit_glue::WebURLRequestExtraDataImpl(
873 frame->document().referrerPolicy())); 873 frame->document().referrerPolicy(), WebString()));
874 874
875 if (!redirect_response.isNull() && block_redirects_) { 875 if (!redirect_response.isNull() && block_redirects_) {
876 printf("Returning null for this redirect\n"); 876 printf("Returning null for this redirect\n");
877 877
878 // To block the request, we set its URL to an empty one. 878 // To block the request, we set its URL to an empty one.
879 request.setURL(WebURL()); 879 request.setURL(WebURL());
880 return; 880 return;
881 } 881 }
882 882
883 if (request_return_null_) { 883 if (request_return_null_) {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 } 1152 }
1153 1153
1154 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1154 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1155 fake_rect_ = rect; 1155 fake_rect_ = rect;
1156 using_fake_rect_ = true; 1156 using_fake_rect_ = true;
1157 } 1157 }
1158 1158
1159 WebRect TestWebViewDelegate::fake_window_rect() { 1159 WebRect TestWebViewDelegate::fake_window_rect() {
1160 return fake_rect_; 1160 return fake_rect_;
1161 } 1161 }
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698