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

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

Issue 2071433003: Reland: service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // TODO(dcheng): Fix const-correctness issues and remove this overload. 550 // TODO(dcheng): Fix const-correctness issues and remove this overload.
551 virtual const WebFrameImplBase* toImplBase() const 551 virtual const WebFrameImplBase* toImplBase() const
552 { 552 {
553 return const_cast<WebFrame*>(this)->toImplBase(); 553 return const_cast<WebFrame*>(this)->toImplBase();
554 } 554 }
555 555
556 // Returns the frame inside a given frame or iframe element. Returns 0 if 556 // Returns the frame inside a given frame or iframe element. Returns 0 if
557 // the given element is not a frame, iframe or if the frame is empty. 557 // the given element is not a frame, iframe or if the frame is empty.
558 BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&); 558 BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&);
559 559
560 // Use WebDocument::isSecureContext() instead of this function to
561 // check whether this frame's document is a secure context.
562 //
563 // Returns whether it's possible for a document whose frame is a descendant
564 // of this frame to be a secure context, not considering scheme exceptions
565 // (since any document can be a secure context if it has a scheme
566 // exception). See Document::isSecureContextImpl for more details.
567 BLINK_EXPORT bool canHaveSecureChild() const;
568
560 #if BLINK_IMPLEMENTATION 569 #if BLINK_IMPLEMENTATION
561 static WebFrame* fromFrame(Frame*); 570 static WebFrame* fromFrame(Frame*);
562 571
563 bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; } 572 bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; }
564 573
565 static void traceFrames(Visitor*, WebFrame*); 574 static void traceFrames(Visitor*, WebFrame*);
566 static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*); 575 static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*);
567 void clearWeakFrames(Visitor*); 576 void clearWeakFrames(Visitor*);
568 void clearWeakFrames(InlinedGlobalMarkingVisitor); 577 void clearWeakFrames(InlinedGlobalMarkingVisitor);
569 #endif 578 #endif
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 WebFrame* m_firstChild; 611 WebFrame* m_firstChild;
603 WebFrame* m_lastChild; 612 WebFrame* m_lastChild;
604 613
605 WebFrame* m_opener; 614 WebFrame* m_opener;
606 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 615 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
607 }; 616 };
608 617
609 } // namespace blink 618 } // namespace blink
610 619
611 #endif 620 #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