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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 { | 83 { |
84 if (!m_window->isCurrentlyDisplayedInFrame()) | 84 if (!m_window->isCurrentlyDisplayedInFrame()) |
85 return 0; | 85 return 0; |
86 | 86 |
87 if (m_notificationCenter) | 87 if (m_notificationCenter) |
88 return m_notificationCenter.get(); | 88 return m_notificationCenter.get(); |
89 | 89 |
90 Document* document = m_window->document(); | 90 Document* document = m_window->document(); |
91 if (!document) | 91 if (!document) |
92 return 0; | 92 return 0; |
93 | 93 |
94 Page* page = document->page(); | 94 Page* page = document->page(); |
95 if (!page) | 95 if (!page) |
96 return 0; | 96 return 0; |
97 | 97 |
98 NotificationClient* provider = NotificationController::clientFrom(page); | 98 NotificationClient* provider = NotificationController::clientFrom(page); |
99 if (provider) | 99 if (provider) |
100 m_notificationCenter = NotificationCenter::create(document, provider);
| 100 m_notificationCenter = NotificationCenter::create(document, provider); |
101 | 101 |
102 return m_notificationCenter.get(); | 102 return m_notificationCenter.get(); |
103 } | 103 } |
104 | 104 |
105 } // namespace WebCore | 105 } // namespace WebCore |
106 | 106 |
107 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) | 107 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
OLD | NEW |