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

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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // Whether the navigation ended up being a download or a stream. 431 // Whether the navigation ended up being a download or a stream.
424 bool is_download_; 432 bool is_download_;
425 bool is_stream_; 433 bool is_stream_;
426 434
427 // False by default unless the navigation started within a context menu. 435 // False by default unless the navigation started within a context menu.
428 bool started_from_context_menu_; 436 bool started_from_context_menu_;
429 437
430 GURL searchable_form_url_; 438 GURL searchable_form_url_;
431 std::string searchable_form_encoding_; 439 std::string searchable_form_encoding_;
432 440
441 // PlzNavigate
442 // Manages the lifetime of a pre-created AppCacheHost until a browser side
443 // navigation is committed, i.e we have a renderer process ready to service
clamy 2016/11/30 17:40:22 nit: s/is committed/is ready to be committed
ananta 2016/12/01 05:14:59 Done.
444 // the navigation request.
445 std::unique_ptr<AppCacheNavigationHandle> appcache_handle_;
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

Powered by Google App Engine
This is Rietveld 408576698