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

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

Issue 2460223003: Support Service Worker NavigationPreload with PlzNavigate. (Closed)
Patch Set: Keep ResourceMessageFilter in ServiceWorkerProviderHost. Created 4 years, 1 month 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 #include "content/browser/frame_host/navigation_handle_impl.h" 5 #include "content/browser/frame_host/navigation_handle_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/debug/dump_without_crashing.h" 9 #include "base/debug/dump_without_crashing.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 params.contents_mime_type = std::string("text/html"); 357 params.contents_mime_type = std::string("text/html");
358 358
359 DidCommitNavigation(params, false, render_frame_host_); 359 DidCommitNavigation(params, false, render_frame_host_);
360 } 360 }
361 361
362 NavigationData* NavigationHandleImpl::GetNavigationData() { 362 NavigationData* NavigationHandleImpl::GetNavigationData() {
363 return navigation_data_.get(); 363 return navigation_data_.get();
364 } 364 }
365 365
366 void NavigationHandleImpl::InitServiceWorkerHandle( 366 void NavigationHandleImpl::InitServiceWorkerHandle(
367 ServiceWorkerContextWrapper* service_worker_context) { 367 ServiceWorkerContextWrapper* service_worker_context,
368 ResourceMessageFilter* resource_message_filter) {
368 DCHECK(IsBrowserSideNavigationEnabled()); 369 DCHECK(IsBrowserSideNavigationEnabled());
369 service_worker_handle_.reset( 370 service_worker_handle_.reset(new ServiceWorkerNavigationHandle(
370 new ServiceWorkerNavigationHandle(service_worker_context)); 371 service_worker_context, resource_message_filter));
371 } 372 }
372 373
373 void NavigationHandleImpl::WillStartRequest( 374 void NavigationHandleImpl::WillStartRequest(
374 const std::string& method, 375 const std::string& method,
375 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, 376 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body,
376 const Referrer& sanitized_referrer, 377 const Referrer& sanitized_referrer,
377 bool has_user_gesture, 378 bool has_user_gesture,
378 ui::PageTransition transition, 379 ui::PageTransition transition,
379 bool is_external_protocol, 380 bool is_external_protocol,
380 RequestContextType request_context_type, 381 RequestContextType request_context_type,
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 throttles_to_register.end()); 744 throttles_to_register.end());
744 throttles_to_register.weak_clear(); 745 throttles_to_register.weak_clear();
745 } 746 }
746 } 747 }
747 748
748 bool NavigationHandleImpl::WasStartedFromContextMenu() const { 749 bool NavigationHandleImpl::WasStartedFromContextMenu() const {
749 return started_from_context_menu_; 750 return started_from_context_menu_;
750 } 751 }
751 752
752 } // namespace content 753 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698