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

Side by Side Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2212183004: Log to UMA when x-origin frames (1) are created and (2) become visible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 Settings* Frame::settings() const 274 Settings* Frame::settings() const
275 { 275 {
276 if (m_host) 276 if (m_host)
277 return &m_host->settings(); 277 return &m_host->settings();
278 return nullptr; 278 return nullptr;
279 } 279 }
280 280
281 bool Frame::isCrossOrigin() const 281 bool Frame::isCrossOrigin() const
282 { 282 {
283 // Check to see if the frame can script into the top level document. 283 // Check to see if the frame can script into the top level document.
284 const SecurityOrigin* securityOrigin = securityContext()->getSecurityOrigin( ); 284 SecurityContext* context = securityContext();
285 DCHECK(context);
286 const SecurityOrigin* securityOrigin = context->getSecurityOrigin();
285 Frame* top = tree().top(); 287 Frame* top = tree().top();
286 return top && !securityOrigin->canAccess(top->securityContext()->getSecurity Origin()); 288 return top && !securityOrigin->canAccess(top->securityContext()->getSecurity Origin());
287 } 289 }
288 290
289 void Frame::didChangeVisibilityState() 291 void Frame::didChangeVisibilityState()
290 { 292 {
291 HeapVector<Member<Frame>> childFrames; 293 HeapVector<Member<Frame>> childFrames;
292 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling()) 294 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling())
293 childFrames.append(child); 295 childFrames.append(child);
294 for (size_t i = 0; i < childFrames.size(); ++i) 296 for (size_t i = 0; i < childFrames.size(); ++i)
(...skipping 11 matching lines...) Expand all
306 308
307 ASSERT(page()); 309 ASSERT(page());
308 310
309 if (m_owner) 311 if (m_owner)
310 m_owner->setContentFrame(*this); 312 m_owner->setContentFrame(*this);
311 else 313 else
312 page()->setMainFrame(this); 314 page()->setMainFrame(this);
313 } 315 }
314 316
315 } // namespace blink 317 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698