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

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

Issue 2706013002: Added support for self.origin in Window and WorkerGlobalScope (Closed)
Patch Set: Fixed broken LayoutTests after rebase Created 3 years, 10 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 if (!frame()) 1101 if (!frame())
1102 return; 1102 return;
1103 1103
1104 FrameHost* host = frame()->host(); 1104 FrameHost* host = frame()->host();
1105 if (!host) 1105 if (!host)
1106 return; 1106 return;
1107 1107
1108 host->chromeClient().setStatusbarText(m_defaultStatus); 1108 host->chromeClient().setStatusbarText(m_defaultStatus);
1109 } 1109 }
1110 1110
1111 String LocalDOMWindow::origin() const {
1112 return getExecutionContext()->getSecurityOrigin()->toString();
1113 }
1114
1111 Document* LocalDOMWindow::document() const { 1115 Document* LocalDOMWindow::document() const {
1112 return m_document.get(); 1116 return m_document.get();
1113 } 1117 }
1114 1118
1115 StyleMedia* LocalDOMWindow::styleMedia() const { 1119 StyleMedia* LocalDOMWindow::styleMedia() const {
1116 if (!m_media) 1120 if (!m_media)
1117 m_media = StyleMedia::create(frame()); 1121 m_media = StyleMedia::create(frame());
1118 return m_media.get(); 1122 return m_media.get();
1119 } 1123 }
1120 1124
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 DOMWindow::trace(visitor); 1635 DOMWindow::trace(visitor);
1632 Supplementable<LocalDOMWindow>::trace(visitor); 1636 Supplementable<LocalDOMWindow>::trace(visitor);
1633 } 1637 }
1634 1638
1635 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1639 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1636 visitor->traceWrappers(m_customElements); 1640 visitor->traceWrappers(m_customElements);
1637 DOMWindow::traceWrappers(visitor); 1641 DOMWindow::traceWrappers(visitor);
1638 } 1642 }
1639 1643
1640 } // namespace blink 1644 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698