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

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

Issue 10780019: PPAPI (Flash): Properly honor Pepper url requests with custom user agents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got rid of unneeded WebKit:: 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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } 852 }
853 853
854 void TestWebViewDelegate::willSendRequest( 854 void TestWebViewDelegate::willSendRequest(
855 WebFrame* frame, unsigned identifier, WebURLRequest& request, 855 WebFrame* frame, unsigned identifier, WebURLRequest& request,
856 const WebURLResponse& redirect_response) { 856 const WebURLResponse& redirect_response) {
857 GURL url = request.url(); 857 GURL url = request.url();
858 std::string request_url = url.possibly_invalid_spec(); 858 std::string request_url = url.possibly_invalid_spec();
859 859
860 request.setExtraData( 860 request.setExtraData(
861 new webkit_glue::WebURLRequestExtraDataImpl( 861 new webkit_glue::WebURLRequestExtraDataImpl(
862 frame->document().referrerPolicy())); 862 frame->document().referrerPolicy(), WebString()));
863 863
864 if (!redirect_response.isNull() && block_redirects_) { 864 if (!redirect_response.isNull() && block_redirects_) {
865 printf("Returning null for this redirect\n"); 865 printf("Returning null for this redirect\n");
866 866
867 // To block the request, we set its URL to an empty one. 867 // To block the request, we set its URL to an empty one.
868 request.setURL(WebURL()); 868 request.setURL(WebURL());
869 return; 869 return;
870 } 870 }
871 871
872 if (request_return_null_) { 872 if (request_return_null_) {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 } 1139 }
1140 1140
1141 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1141 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1142 fake_rect_ = rect; 1142 fake_rect_ = rect;
1143 using_fake_rect_ = true; 1143 using_fake_rect_ = true;
1144 } 1144 }
1145 1145
1146 WebRect TestWebViewDelegate::fake_window_rect() { 1146 WebRect TestWebViewDelegate::fake_window_rect() {
1147 return fake_rect_; 1147 return fake_rect_;
1148 } 1148 }
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