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

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

Issue 12243002: Pass WebKit priority changes and parsing messages up to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename IPC Created 7 years, 10 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) 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 an implementation of the ResourceLoaderBridge class. 5 // This file contains an implementation of the ResourceLoaderBridge class.
6 // The class is implemented using net::URLRequest, meaning it is a "simple" 6 // The class is implemented using net::URLRequest, meaning it is a "simple"
7 // version that directly issues requests. The more complicated one used in the 7 // version that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because net::URLRequest only provides an asynchronous resource loading API, 10 // Because net::URLRequest only provides an asynchronous resource loading API,
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 response->url = params_->url; 960 response->url = params_->url;
961 961
962 proxy_ = new SyncRequestProxy(response); 962 proxy_ = new SyncRequestProxy(response);
963 proxy_->AddRef(); 963 proxy_->AddRef();
964 964
965 proxy_->Start(NULL, params_.release()); 965 proxy_->Start(NULL, params_.release());
966 966
967 static_cast<SyncRequestProxy*>(proxy_)->WaitForCompletion(); 967 static_cast<SyncRequestProxy*>(proxy_)->WaitForCompletion();
968 } 968 }
969 969
970 virtual void DidChangePriority(net::RequestPriority new_priority) {
971 // Not really needed for DRT.
972 }
973
970 private: 974 private:
971 // Ownership of params_ is transfered to the proxy when the proxy is created. 975 // Ownership of params_ is transfered to the proxy when the proxy is created.
972 scoped_ptr<RequestParams> params_; 976 scoped_ptr<RequestParams> params_;
973 977
974 // The request proxy is allocated when we start the request, and then it 978 // The request proxy is allocated when we start the request, and then it
975 // sticks around until this ResourceLoaderBridge is destroyed. 979 // sticks around until this ResourceLoaderBridge is destroyed.
976 RequestProxy* proxy_; 980 RequestProxy* proxy_;
977 }; 981 };
978 982
979 //----------------------------------------------------------------------------- 983 //-----------------------------------------------------------------------------
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 if (!g_file_over_http_mappings) 1157 if (!g_file_over_http_mappings)
1154 g_file_over_http_mappings = new FileOverHTTPPathMappings(); 1158 g_file_over_http_mappings = new FileOverHTTPPathMappings();
1155 g_file_over_http_mappings->AddMapping(file_path_template, http_prefix); 1159 g_file_over_http_mappings->AddMapping(file_path_template, http_prefix);
1156 } 1160 }
1157 1161
1158 // static 1162 // static
1159 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( 1163 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create(
1160 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 1164 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
1161 return new ResourceLoaderBridgeImpl(request_info); 1165 return new ResourceLoaderBridgeImpl(request_info);
1162 } 1166 }
OLDNEW
« content/common/view_messages.h ('K') | « webkit/glue/weburlloader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698