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

Unified Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.h
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index edd7b5552c95227a2980da067c8b71d17ea760ca..e90879d48207d859094147b10d9531ca0382f39e 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -8,6 +8,7 @@
#include "content/public/browser/navigation_handle.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -18,6 +19,7 @@
namespace content {
class NavigatorDelegate;
+class ServiceWorkerContextWrapper;
struct NavigationRequestInfo;
// This class keeps track of a single navigation. It is created upon receipt of
@@ -55,9 +57,8 @@ struct NavigationRequestInfo;
// the RenderFrameHost still apply.
class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
public:
- static scoped_ptr<NavigationHandleImpl> Create(const GURL& url,
- bool is_main_frame,
- NavigatorDelegate* delegate);
+ static scoped_ptr<NavigationHandleImpl>
+ Create(const GURL& url, bool is_main_frame, FrameTreeNode* frame_tree_node);
~NavigationHandleImpl() override;
// NavigationHandle implementation:
@@ -102,6 +103,11 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
is_transferring_ = is_transferring;
}
+ // PlzNavigate
+ void set_service_worker_provider_id(int service_worker_provider_id) {
+ service_worker_provider_id_ = service_worker_provider_id;
+ }
+
// Called when the URLRequest will start in the network stack.
NavigationThrottle::ThrottleCheckResult WillStartRequest(
bool is_post,
@@ -142,8 +148,8 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
};
NavigationHandleImpl(const GURL& url,
- const bool is_main_frame,
nasko 2015/10/02 22:09:45 Why did we lose the const here?
Fabrice (no longer in Chrome) 2015/10/06 17:21:37 It was inconsistent. This has been removed in the
- NavigatorDelegate* delegate);
+ bool is_main_frame,
+ FrameTreeNode* frame_tree_node);
// See NavigationHandle for a description of those member variables.
GURL url_;
@@ -171,6 +177,14 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
// A list of Throttles registered for this navigation.
ScopedVector<NavigationThrottle> throttles_;
+ // PlzNavigate
+ // The ServiceWorkerProviderHost ID used for navigations.
+ // Set to kInvalidServiceWorkerProviderId for sandboxed frames and sync loads.
+ // This is unused for current navigation.
clamy 2015/10/05 12:18:16 nit: rephrase as "This parameter is not used in th
Fabrice (no longer in Chrome) 2015/10/06 17:21:37 Done.
+ int service_worker_provider_id_;
+
+ scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
nasko 2015/10/02 22:09:45 Can you add a comment on this member?
clamy 2015/10/05 12:18:16 I'd rather you store the FrameTreeNode (see commen
Fabrice (no longer in Chrome) 2015/10/06 17:21:37 Done.
+
DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
};

Powered by Google App Engine
This is Rietveld 408576698