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

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

Issue 2698393002: Allow asynchronous deferral in NavigationSimulator (Closed)
Patch Set: engedy/clamy review Created 3 years, 9 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
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 NavigationType navigation_type() { 339 NavigationType navigation_type() {
340 DCHECK_GE(state_, DID_COMMIT); 340 DCHECK_GE(state_, DID_COMMIT);
341 return navigation_type_; 341 return navigation_type_;
342 } 342 }
343 343
344 void set_response_headers_for_testing( 344 void set_response_headers_for_testing(
345 scoped_refptr<net::HttpResponseHeaders> response_headers) { 345 scoped_refptr<net::HttpResponseHeaders> response_headers) {
346 response_headers_ = response_headers; 346 response_headers_ = response_headers;
347 } 347 }
348 348
349 void set_complete_callback_for_testing(
350 const ThrottleChecksFinishedCallback& callback) {
351 complete_callback_for_testing_ = callback;
352 }
353
349 private: 354 private:
350 friend class NavigationHandleImplTest; 355 friend class NavigationHandleImplTest;
351 356
352 NavigationHandleImpl(const GURL& url, 357 NavigationHandleImpl(const GURL& url,
353 const std::vector<GURL>& redirect_chain, 358 const std::vector<GURL>& redirect_chain,
354 FrameTreeNode* frame_tree_node, 359 FrameTreeNode* frame_tree_node,
355 bool is_renderer_initiated, 360 bool is_renderer_initiated,
356 bool is_same_page, 361 bool is_same_page,
357 const base::TimeTicks& navigation_start, 362 const base::TimeTicks& navigation_start,
358 int pending_nav_entry_id, 363 int pending_nav_entry_id,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 445
441 // The unique id of the corresponding NavigationEntry. 446 // The unique id of the corresponding NavigationEntry.
442 int pending_nav_entry_id_; 447 int pending_nav_entry_id_;
443 448
444 // The fetch request context type. 449 // The fetch request context type.
445 RequestContextType request_context_type_; 450 RequestContextType request_context_type_;
446 451
447 // The mixed content context type for potential mixed content checks. 452 // The mixed content context type for potential mixed content checks.
448 blink::WebMixedContentContextType mixed_content_context_type_; 453 blink::WebMixedContentContextType mixed_content_context_type_;
449 454
450 // This callback will be run when all throttle checks have been performed. 455 // This callback will be run when all throttle checks have been performed. Be
456 // careful about relying on it as the member may be removed as part of the
457 // PlzNavigate refactoring.
451 ThrottleChecksFinishedCallback complete_callback_; 458 ThrottleChecksFinishedCallback complete_callback_;
452 459
460 // This test-only callback will be run when all throttle checks have been
461 // performed.
462 // TODO(clamy): Revisit the unit test architecture when PlzNavigate ships.
463 ThrottleChecksFinishedCallback complete_callback_for_testing_;
464
453 // PlzNavigate 465 // PlzNavigate
454 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a 466 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a
455 // corresponding ServiceWorkerNetworkProvider is created in the renderer. 467 // corresponding ServiceWorkerNetworkProvider is created in the renderer.
456 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; 468 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_;
457 469
458 // PlzNavigate 470 // PlzNavigate
459 // Manages the lifetime of a pre-created AppCacheHost until a browser side 471 // Manages the lifetime of a pre-created AppCacheHost until a browser side
460 // navigation is ready to be committed, i.e we have a renderer process ready 472 // navigation is ready to be committed, i.e we have a renderer process ready
461 // to service the navigation request. 473 // to service the navigation request.
462 std::unique_ptr<AppCacheNavigationHandle> appcache_handle_; 474 std::unique_ptr<AppCacheNavigationHandle> appcache_handle_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 NavigationType navigation_type_; 516 NavigationType navigation_type_;
505 517
506 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 518 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
507 519
508 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 520 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
509 }; 521 };
510 522
511 } // namespace content 523 } // namespace content
512 524
513 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 525 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698