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

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

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)
Patch Set: Created 3 years, 7 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 CSPDisposition should_check_main_world_csp() const { 374 CSPDisposition should_check_main_world_csp() const {
375 return should_check_main_world_csp_; 375 return should_check_main_world_csp_;
376 } 376 }
377 377
378 const SourceLocation& source_location() const { return source_location_; } 378 const SourceLocation& source_location() const { return source_location_; }
379 void set_source_location(const SourceLocation& source_location) { 379 void set_source_location(const SourceLocation& source_location) {
380 source_location_ = source_location; 380 source_location_ = source_location;
381 } 381 }
382 382
383 // PlzNavigate
384 // The ID of the RenderProcessHost we expect the navigation to commit in. This
385 // is used to inform the RenderProcessHost to expect a navigation to the url
386 // we're navigating to. If |should_update_on_redirects| is true, we will
387 // update the RenderProcessHost when encountering redirects, otherwise we will
388 // just inform it to stop expecting a navigation.
Charlie Reis 2017/05/15 03:41:52 The should_update_on_redirects parameter seems kin
clamy 2017/05/16 14:50:45 I have removed this part of the patch. For now, I'
389 void SetSpeculativeProcessID(int render_process_host_id,
390 bool should_update_on_redirects);
391
383 private: 392 private:
384 friend class NavigationHandleImplTest; 393 friend class NavigationHandleImplTest;
385 394
386 NavigationHandleImpl(const GURL& url, 395 NavigationHandleImpl(const GURL& url,
387 const std::vector<GURL>& redirect_chain, 396 const std::vector<GURL>& redirect_chain,
388 FrameTreeNode* frame_tree_node, 397 FrameTreeNode* frame_tree_node,
389 bool is_renderer_initiated, 398 bool is_renderer_initiated,
390 bool is_same_page, 399 bool is_same_page,
391 const base::TimeTicks& navigation_start, 400 const base::TimeTicks& navigation_start,
392 int pending_nav_entry_id, 401 int pending_nav_entry_id,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 CSPDisposition should_check_main_world_csp_; 563 CSPDisposition should_check_main_world_csp_;
555 564
556 // Whether or not the navigation results from the submission of a form. 565 // Whether or not the navigation results from the submission of a form.
557 bool is_form_submission_; 566 bool is_form_submission_;
558 567
559 // PlzNavigate 568 // PlzNavigate
560 // Information about the JavaScript that started the navigation. For 569 // Information about the JavaScript that started the navigation. For
561 // navigations initiated by Javascript. 570 // navigations initiated by Javascript.
562 SourceLocation source_location_; 571 SourceLocation source_location_;
563 572
573 // PlzNavigate
574 // Used to inform a RenderProcessHost that we expect this navigation to commit
575 // in it.
576 int speculative_render_process_host_id_;
577
578 // PlzNavigate
579 // Whether we should inform the RenderProcessHost to expect a new navigation
580 // when this navigation is redirected.
581 bool should_inform_process_on_redirects_;
582
564 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 583 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
565 584
566 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 585 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
567 }; 586 };
568 587
569 } // namespace content 588 } // namespace content
570 589
571 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 590 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698