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

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

Issue 2698393002: Allow asynchronous deferral in NavigationSimulator (Closed)
Patch Set: Remove the wait API 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
455 // This callback will be run when all throttle checks have been performed. Be
456 // careful about relying on it as it may be going away.
457 ThrottleChecksFinishedCallback complete_callback_;
458
450 // This callback will be run when all throttle checks have been performed. 459 // This callback will be run when all throttle checks have been performed.
clamy 2017/03/09 13:18:13 Also mention that this is only used in unit tests,
451 ThrottleChecksFinishedCallback complete_callback_; 460 ThrottleChecksFinishedCallback complete_callback_for_testing_;
452 461
453 // PlzNavigate 462 // PlzNavigate
454 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a 463 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a
455 // corresponding ServiceWorkerNetworkProvider is created in the renderer. 464 // corresponding ServiceWorkerNetworkProvider is created in the renderer.
456 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; 465 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_;
457 466
458 // PlzNavigate 467 // PlzNavigate
459 // Manages the lifetime of a pre-created AppCacheHost until a browser side 468 // 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 469 // navigation is ready to be committed, i.e we have a renderer process ready
461 // to service the navigation request. 470 // to service the navigation request.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 NavigationType navigation_type_; 513 NavigationType navigation_type_;
505 514
506 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 515 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
507 516
508 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 517 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
509 }; 518 };
510 519
511 } // namespace content 520 } // namespace content
512 521
513 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 522 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698