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

Side by Side Diff: Source/core/dom/Document.h

Issue 758913002: Implement the 'document.origin' accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moar assertions. Created 6 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 StandaloneStatus xmlStandaloneStatus() const { return static_cast<Standalone Status>(m_xmlStandalone); } 342 StandaloneStatus xmlStandaloneStatus() const { return static_cast<Standalone Status>(m_xmlStandalone); }
343 bool hasXMLDeclaration() const { return m_hasXMLDeclaration; } 343 bool hasXMLDeclaration() const { return m_hasXMLDeclaration; }
344 344
345 void setXMLEncoding(const String& encoding) { m_xmlEncoding = encoding; } // read-only property, only to be set from XMLDocumentParser 345 void setXMLEncoding(const String& encoding) { m_xmlEncoding = encoding; } // read-only property, only to be set from XMLDocumentParser
346 void setXMLVersion(const String&, ExceptionState&); 346 void setXMLVersion(const String&, ExceptionState&);
347 void setXMLStandalone(bool, ExceptionState&); 347 void setXMLStandalone(bool, ExceptionState&);
348 void setHasXMLDeclaration(bool hasXMLDeclaration) { m_hasXMLDeclaration = ha sXMLDeclaration ? 1 : 0; } 348 void setHasXMLDeclaration(bool hasXMLDeclaration) { m_hasXMLDeclaration = ha sXMLDeclaration ? 1 : 0; }
349 349
350 virtual KURL baseURI() const override final; 350 virtual KURL baseURI() const override final;
351 351
352 String origin() const { return securityOrigin()->toString(); }
353
352 String visibilityState() const; 354 String visibilityState() const;
353 bool hidden() const; 355 bool hidden() const;
354 void didChangeVisibilityState(); 356 void didChangeVisibilityState();
355 357
356 PassRefPtrWillBeRawPtr<Node> adoptNode(PassRefPtrWillBeRawPtr<Node> source, ExceptionState&); 358 PassRefPtrWillBeRawPtr<Node> adoptNode(PassRefPtrWillBeRawPtr<Node> source, ExceptionState&);
357 359
358 PassRefPtrWillBeRawPtr<HTMLCollection> images(); 360 PassRefPtrWillBeRawPtr<HTMLCollection> images();
359 PassRefPtrWillBeRawPtr<HTMLCollection> embeds(); 361 PassRefPtrWillBeRawPtr<HTMLCollection> embeds();
360 PassRefPtrWillBeRawPtr<HTMLCollection> applets(); 362 PassRefPtrWillBeRawPtr<HTMLCollection> applets();
361 PassRefPtrWillBeRawPtr<HTMLCollection> links(); 363 PassRefPtrWillBeRawPtr<HTMLCollection> links();
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1423 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1422 1424
1423 } // namespace blink 1425 } // namespace blink
1424 1426
1425 #ifndef NDEBUG 1427 #ifndef NDEBUG
1426 // Outside the WebCore namespace for ease of invocation from gdb. 1428 // Outside the WebCore namespace for ease of invocation from gdb.
1427 void showLiveDocumentInstances(); 1429 void showLiveDocumentInstances();
1428 #endif 1430 #endif
1429 1431
1430 #endif // Document_h 1432 #endif // Document_h
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/resources/postmessage-document-origin.html ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698