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

Side by Side Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2501343003: PlzNavigate: AppCache support. (Closed)
Patch Set: Address review comments Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
7 7
8 #include "content/public/browser/navigation_handle.h" 8 #include "content/public/browser/navigation_handle.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 14 matching lines...) Expand all
25 #include "content/public/browser/navigation_data.h" 25 #include "content/public/browser/navigation_data.h"
26 #include "content/public/browser/navigation_throttle.h" 26 #include "content/public/browser/navigation_throttle.h"
27 #include "content/public/browser/ssl_status.h" 27 #include "content/public/browser/ssl_status.h"
28 #include "content/public/common/request_context_type.h" 28 #include "content/public/common/request_context_type.h"
29 #include "url/gurl.h" 29 #include "url/gurl.h"
30 30
31 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 31 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
32 32
33 namespace content { 33 namespace content {
34 34
35 class AppCacheNavigationHandle;
36 class ChromeAppCacheService;
35 class NavigationUIData; 37 class NavigationUIData;
36 class NavigatorDelegate; 38 class NavigatorDelegate;
37 class ResourceRequestBodyImpl; 39 class ResourceRequestBodyImpl;
38 class ServiceWorkerContextWrapper; 40 class ServiceWorkerContextWrapper;
39 class ServiceWorkerNavigationHandle; 41 class ServiceWorkerNavigationHandle;
40 42
41 // This class keeps track of a single navigation. It is created upon receipt of 43 // This class keeps track of a single navigation. It is created upon receipt of
42 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns 44 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns
43 // the newly created NavigationHandleImpl as long as the navigation is ongoing. 45 // the newly created NavigationHandleImpl as long as the navigation is ongoing.
44 // The NavigationHandleImpl in the RenderFrameHost will be reset when the 46 // The NavigationHandleImpl in the RenderFrameHost will be reset when the
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return resource_request_body_; 193 return resource_request_body_;
192 } 194 }
193 195
194 // PlzNavigate 196 // PlzNavigate
195 void InitServiceWorkerHandle( 197 void InitServiceWorkerHandle(
196 ServiceWorkerContextWrapper* service_worker_context); 198 ServiceWorkerContextWrapper* service_worker_context);
197 ServiceWorkerNavigationHandle* service_worker_handle() const { 199 ServiceWorkerNavigationHandle* service_worker_handle() const {
198 return service_worker_handle_.get(); 200 return service_worker_handle_.get();
199 } 201 }
200 202
203 // PlzNavigate
204 void InitAppCacheHandle(ChromeAppCacheService* appcache_service);
205 AppCacheNavigationHandle* appcache_handle() const {
206 return appcache_handle_.get();
207 }
208
201 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)> 209 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)>
202 ThrottleChecksFinishedCallback; 210 ThrottleChecksFinishedCallback;
203 211
204 // Called when the URLRequest will start in the network stack. |callback| 212 // Called when the URLRequest will start in the network stack. |callback|
205 // will be called when all throttle checks have completed. This will allow 213 // will be called when all throttle checks have completed. This will allow
206 // the caller to cancel the navigation or let it proceed. 214 // the caller to cancel the navigation or let it proceed.
207 void WillStartRequest( 215 void WillStartRequest(
208 const std::string& method, 216 const std::string& method,
209 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, 217 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body,
210 const Referrer& sanitized_referrer, 218 const Referrer& sanitized_referrer,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 RequestContextType request_context_type_; 400 RequestContextType request_context_type_;
393 401
394 // This callback will be run when all throttle checks have been performed. 402 // This callback will be run when all throttle checks have been performed.
395 ThrottleChecksFinishedCallback complete_callback_; 403 ThrottleChecksFinishedCallback complete_callback_;
396 404
397 // PlzNavigate 405 // PlzNavigate
398 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a 406 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a
399 // corresponding ServiceWorkerNetworkProvider is created in the renderer. 407 // corresponding ServiceWorkerNetworkProvider is created in the renderer.
400 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; 408 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_;
401 409
410 // PlzNavigate
411 // Manages the lifetime of a pre-created AppCacheHost until a browser side
412 // navigation is ready to be committed, i.e we have a renderer process ready
413 // to service the navigation request.
414 std::unique_ptr<AppCacheNavigationHandle> appcache_handle_;
415
402 // Embedder data from the IO thread tied to this navigation. 416 // Embedder data from the IO thread tied to this navigation.
403 std::unique_ptr<NavigationData> navigation_data_; 417 std::unique_ptr<NavigationData> navigation_data_;
404 418
405 // PlzNavigate 419 // PlzNavigate
406 // Embedder data from the UI thread tied to this navigation. 420 // Embedder data from the UI thread tied to this navigation.
407 std::unique_ptr<NavigationUIData> navigation_ui_data_; 421 std::unique_ptr<NavigationUIData> navigation_ui_data_;
408 422
409 SSLStatus ssl_status_; 423 SSLStatus ssl_status_;
410 424
411 // The id of the URLRequest tied to this navigation. 425 // The id of the URLRequest tied to this navigation.
(...skipping 19 matching lines...) Expand all
431 std::string searchable_form_encoding_; 445 std::string searchable_form_encoding_;
432 446
433 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 447 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
434 448
435 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 449 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
436 }; 450 };
437 451
438 } // namespace content 452 } // namespace content
439 453
440 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 454 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_storage_impl_unittest.cc ('k') | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698