OLD | NEW |
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 m_locationbar = nullptr; | 494 m_locationbar = nullptr; |
495 m_menubar = nullptr; | 495 m_menubar = nullptr; |
496 m_personalbar = nullptr; | 496 m_personalbar = nullptr; |
497 m_scrollbars = nullptr; | 497 m_scrollbars = nullptr; |
498 m_statusbar = nullptr; | 498 m_statusbar = nullptr; |
499 m_toolbar = nullptr; | 499 m_toolbar = nullptr; |
500 m_navigator = nullptr; | 500 m_navigator = nullptr; |
501 m_media = nullptr; | 501 m_media = nullptr; |
502 m_customElements = nullptr; | 502 m_customElements = nullptr; |
503 m_applicationCache = nullptr; | 503 m_applicationCache = nullptr; |
| 504 m_requiredCSP = nullAtom; |
504 } | 505 } |
505 | 506 |
506 void LocalDOMWindow::sendOrientationChangeEvent() | 507 void LocalDOMWindow::sendOrientationChangeEvent() |
507 { | 508 { |
508 ASSERT(RuntimeEnabledFeatures::orientationEventEnabled()); | 509 ASSERT(RuntimeEnabledFeatures::orientationEventEnabled()); |
509 ASSERT(frame()->isMainFrame()); | 510 ASSERT(frame()->isMainFrame()); |
510 | 511 |
511 // Before dispatching the event, build a list of all frames in the page | 512 // Before dispatching the event, build a list of all frames in the page |
512 // to send the event to, to mitigate side effects from event handlers | 513 // to send the event to, to mitigate side effects from event handlers |
513 // potentially interfering with others. | 514 // potentially interfering with others. |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 if (!frame()) | 1022 if (!frame()) |
1022 return; | 1023 return; |
1023 | 1024 |
1024 FrameHost* host = frame()->host(); | 1025 FrameHost* host = frame()->host(); |
1025 if (!host) | 1026 if (!host) |
1026 return; | 1027 return; |
1027 | 1028 |
1028 host->chromeClient().setStatusbarText(m_defaultStatus); | 1029 host->chromeClient().setStatusbarText(m_defaultStatus); |
1029 } | 1030 } |
1030 | 1031 |
| 1032 AtomicString LocalDOMWindow::requiredCSP() const |
| 1033 { |
| 1034 return m_requiredCSP; |
| 1035 } |
| 1036 |
| 1037 void LocalDOMWindow::setRequiredCSP(const AtomicString& requiredCSP) |
| 1038 { |
| 1039 m_requiredCSP = requiredCSP; |
| 1040 } |
| 1041 |
1031 Document* LocalDOMWindow::document() const | 1042 Document* LocalDOMWindow::document() const |
1032 { | 1043 { |
1033 return m_document.get(); | 1044 return m_document.get(); |
1034 } | 1045 } |
1035 | 1046 |
1036 StyleMedia* LocalDOMWindow::styleMedia() const | 1047 StyleMedia* LocalDOMWindow::styleMedia() const |
1037 { | 1048 { |
1038 if (!m_media) | 1049 if (!m_media) |
1039 m_media = StyleMedia::create(frame()); | 1050 m_media = StyleMedia::create(frame()); |
1040 return m_media.get(); | 1051 return m_media.get(); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 LocalFrame* LocalDOMWindow::frame() const | 1525 LocalFrame* LocalDOMWindow::frame() const |
1515 { | 1526 { |
1516 // If the LocalDOMWindow still has a frame reference, that frame must point | 1527 // If the LocalDOMWindow still has a frame reference, that frame must point |
1517 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1528 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1518 // where script execution leaks between different LocalDOMWindows. | 1529 // where script execution leaks between different LocalDOMWindows. |
1519 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); | 1530 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); |
1520 return m_frame; | 1531 return m_frame; |
1521 } | 1532 } |
1522 | 1533 |
1523 } // namespace blink | 1534 } // namespace blink |
OLD | NEW |