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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2045383002: PlzNavigate: detect when a ServiceWorker is present (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3174 3174
3175 // Create the serviceworker's per-document network observing object if it 3175 // Create the serviceworker's per-document network observing object if it
3176 // does not exist (When navigation happens within a page, the provider already 3176 // does not exist (When navigation happens within a page, the provider already
3177 // exists). 3177 // exists).
3178 if (ServiceWorkerNetworkProvider::FromDocumentState( 3178 if (ServiceWorkerNetworkProvider::FromDocumentState(
3179 DocumentState::FromDataSource(datasource))) 3179 DocumentState::FromDataSource(datasource)))
3180 return; 3180 return;
3181 3181
3182 ServiceWorkerNetworkProvider::AttachToDocumentState( 3182 ServiceWorkerNetworkProvider::AttachToDocumentState(
3183 DocumentState::FromDataSource(datasource), 3183 DocumentState::FromDataSource(datasource),
3184 ServiceWorkerNetworkProvider::CreateForNavigation( 3184 ServiceWorkerNetworkProvider::CreateForNavigation(routing_id_, frame,
3185 routing_id_, navigation_state->request_params(), frame, 3185 content_initiated));
3186 content_initiated));
3187 } 3186 }
3188 3187
3189 void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame, 3188 void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame,
3190 double triggering_event_time) { 3189 double triggering_event_time) {
3191 DCHECK_EQ(frame_, frame); 3190 DCHECK_EQ(frame_, frame);
3192 WebDataSource* ds = frame->provisionalDataSource(); 3191 WebDataSource* ds = frame->provisionalDataSource();
3193 3192
3194 // In fast/loader/stop-provisional-loads.html, we abort the load before this 3193 // In fast/loader/stop-provisional-loads.html, we abort the load before this
3195 // callback is invoked. 3194 // callback is invoked.
3196 if (!ds) 3195 if (!ds)
(...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after
6310 // event target. Potentially a Pepper plugin will receive the event. 6309 // event target. Potentially a Pepper plugin will receive the event.
6311 // In order to tell whether a plugin gets the last mouse event and which it 6310 // In order to tell whether a plugin gets the last mouse event and which it
6312 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6311 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6313 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6312 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6314 // |pepper_last_mouse_event_target_|. 6313 // |pepper_last_mouse_event_target_|.
6315 pepper_last_mouse_event_target_ = nullptr; 6314 pepper_last_mouse_event_target_ = nullptr;
6316 #endif 6315 #endif
6317 } 6316 }
6318 6317
6319 } // namespace content 6318 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698