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

Side by Side Diff: third_party/WebKit/public/web/WebFrame.h

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: refactor errorMessage Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // TODO(dcheng): Fix const-correctness issues and remove this overload. 549 // TODO(dcheng): Fix const-correctness issues and remove this overload.
550 virtual const WebFrameImplBase* toImplBase() const 550 virtual const WebFrameImplBase* toImplBase() const
551 { 551 {
552 return const_cast<WebFrame*>(this)->toImplBase(); 552 return const_cast<WebFrame*>(this)->toImplBase();
553 } 553 }
554 554
555 // Returns the frame inside a given frame or iframe element. Returns 0 if 555 // Returns the frame inside a given frame or iframe element. Returns 0 if
556 // the given element is not a frame, iframe or if the frame is empty. 556 // the given element is not a frame, iframe or if the frame is empty.
557 BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&); 557 BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&);
558 558
559 // Use WebDocument::isSecureContext() instead of this function to
560 // check whether this frame's document is a secure context.
561 //
562 // Returns whether it's possible for a document whose frame is a descendant
563 // of this frame to be a secure context, not considering scheme exceptions
564 // (since any document can be a secure context if it has a scheme
565 // exception). See Document::isSecureContextImpl for more details.
566 BLINK_EXPORT bool canHaveSecureChild() const;
567
559 #if BLINK_IMPLEMENTATION 568 #if BLINK_IMPLEMENTATION
560 static WebFrame* fromFrame(Frame*); 569 static WebFrame* fromFrame(Frame*);
561 570
562 bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; } 571 bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; }
563 572
564 static void traceFrames(Visitor*, WebFrame*); 573 static void traceFrames(Visitor*, WebFrame*);
565 static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*); 574 static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*);
566 void clearWeakFrames(Visitor*); 575 void clearWeakFrames(Visitor*);
567 void clearWeakFrames(InlinedGlobalMarkingVisitor); 576 void clearWeakFrames(InlinedGlobalMarkingVisitor);
568 #endif 577 #endif
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 WebFrame* m_firstChild; 610 WebFrame* m_firstChild;
602 WebFrame* m_lastChild; 611 WebFrame* m_lastChild;
603 612
604 WebFrame* m_opener; 613 WebFrame* m_opener;
605 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 614 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
606 }; 615 };
607 616
608 } // namespace blink 617 } // namespace blink
609 618
610 #endif 619 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698