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

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

Issue 2009453002: service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getSecurityOrigin Created 4 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 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 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 // Create the serviceworker's per-document network observing object if it 3105 // Create the serviceworker's per-document network observing object if it
3106 // does not exist (When navigation happens within a page, the provider already 3106 // does not exist (When navigation happens within a page, the provider already
3107 // exists). 3107 // exists).
3108 if (ServiceWorkerNetworkProvider::FromDocumentState( 3108 if (ServiceWorkerNetworkProvider::FromDocumentState(
3109 DocumentState::FromDataSource(datasource))) 3109 DocumentState::FromDataSource(datasource)))
3110 return; 3110 return;
3111 3111
3112 ServiceWorkerNetworkProvider::AttachToDocumentState( 3112 ServiceWorkerNetworkProvider::AttachToDocumentState(
3113 DocumentState::FromDataSource(datasource), 3113 DocumentState::FromDataSource(datasource),
3114 ServiceWorkerNetworkProvider::CreateForNavigation( 3114 ServiceWorkerNetworkProvider::CreateForNavigation(
3115 routing_id_, navigation_state->request_params(), 3115 routing_id_, navigation_state->request_params(), frame,
3116 frame->effectiveSandboxFlags(), content_initiated)); 3116 content_initiated));
3117 } 3117 }
3118 3118
3119 void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame, 3119 void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame,
3120 double triggering_event_time) { 3120 double triggering_event_time) {
3121 DCHECK_EQ(frame_, frame); 3121 DCHECK_EQ(frame_, frame);
3122 WebDataSource* ds = frame->provisionalDataSource(); 3122 WebDataSource* ds = frame->provisionalDataSource();
3123 3123
3124 // In fast/loader/stop-provisional-loads.html, we abort the load before this 3124 // In fast/loader/stop-provisional-loads.html, we abort the load before this
3125 // callback is invoked. 3125 // callback is invoked.
3126 if (!ds) 3126 if (!ds)
(...skipping 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after
6204 // event target. Potentially a Pepper plugin will receive the event. 6204 // event target. Potentially a Pepper plugin will receive the event.
6205 // In order to tell whether a plugin gets the last mouse event and which it 6205 // In order to tell whether a plugin gets the last mouse event and which it
6206 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6206 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6207 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6207 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6208 // |pepper_last_mouse_event_target_|. 6208 // |pepper_last_mouse_event_target_|.
6209 pepper_last_mouse_event_target_ = nullptr; 6209 pepper_last_mouse_event_target_ = nullptr;
6210 #endif 6210 #endif
6211 } 6211 }
6212 6212
6213 } // namespace content 6213 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698