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

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 websocket tests. Added [Replaceable] to the origin in *.idl 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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 if (!frame()) 1102 if (!frame())
1103 return; 1103 return;
1104 1104
1105 FrameHost* host = frame()->host(); 1105 FrameHost* host = frame()->host();
1106 if (!host) 1106 if (!host)
1107 return; 1107 return;
1108 1108
1109 host->chromeClient().setStatusbarText(m_defaultStatus); 1109 host->chromeClient().setStatusbarText(m_defaultStatus);
1110 } 1110 }
1111 1111
1112 String LocalDOMWindow::origin() const {
1113 return getExecutionContext()->getSecurityOrigin()->toString();
1114 }
1115
1112 Document* LocalDOMWindow::document() const { 1116 Document* LocalDOMWindow::document() const {
1113 return m_document.get(); 1117 return m_document.get();
1114 } 1118 }
1115 1119
1116 StyleMedia* LocalDOMWindow::styleMedia() const { 1120 StyleMedia* LocalDOMWindow::styleMedia() const {
1117 if (!m_media) 1121 if (!m_media)
1118 m_media = StyleMedia::create(frame()); 1122 m_media = StyleMedia::create(frame());
1119 return m_media.get(); 1123 return m_media.get();
1120 } 1124 }
1121 1125
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 DOMWindow::trace(visitor); 1636 DOMWindow::trace(visitor);
1633 Supplementable<LocalDOMWindow>::trace(visitor); 1637 Supplementable<LocalDOMWindow>::trace(visitor);
1634 } 1638 }
1635 1639
1636 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1640 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1637 visitor->traceWrappers(m_customElements); 1641 visitor->traceWrappers(m_customElements);
1638 DOMWindow::traceWrappers(visitor); 1642 DOMWindow::traceWrappers(visitor);
1639 } 1643 }
1640 1644
1641 } // namespace blink 1645 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698