Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 m_presenter = presenter; | 72 m_presenter = presenter; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool NotificationPresenterImpl::isInitialized() | 75 bool NotificationPresenterImpl::isInitialized() |
| 76 { | 76 { |
| 77 return !!m_presenter; | 77 return !!m_presenter; |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool NotificationPresenterImpl::show(Notification* notification) | 80 bool NotificationPresenterImpl::show(Notification* notification) |
| 81 { | 81 { |
| 82 return m_presenter->show(PassRefPtr<Notification>(notification)); | 82 return m_presenter->show(RawPtr<Notification>(notification)); |
|
Mads Ager (chromium)
2014/06/06 06:45:17
I think these methods already take actual raw poin
sof
2014/06/06 06:50:28
No, that runs into issues with converting a Notifi
Mads Ager (chromium)
2014/06/06 07:13:20
OK, thanks. :(
sof
2014/06/06 07:23:06
There's stuff to be looked at wrt WebPrivatePtr<>,
| |
| 83 } | 83 } |
| 84 | 84 |
| 85 void NotificationPresenterImpl::close(Notification* notification) | 85 void NotificationPresenterImpl::close(Notification* notification) |
| 86 { | 86 { |
| 87 m_presenter->close(PassRefPtr<Notification>(notification)); | 87 m_presenter->close(RawPtr<Notification>(notification)); |
| 88 | 88 |
| 89 // FIXME: Remove the duplicated call to cancel() when Chromium updated to ov erride close() instead. | 89 // FIXME: Remove the duplicated call to cancel() when Chromium updated to ov erride close() instead. |
| 90 m_presenter->cancel(PassRefPtr<Notification>(notification)); | 90 m_presenter->cancel(RawPtr<Notification>(notification)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi cation) | 93 void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi cation) |
| 94 { | 94 { |
| 95 m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); | 95 m_presenter->objectDestroyed(RawPtr<Notification>(notification)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 NotificationClient::Permission NotificationPresenterImpl::checkPermission(Execut ionContext* context) | 98 NotificationClient::Permission NotificationPresenterImpl::checkPermission(Execut ionContext* context) |
| 99 { | 99 { |
| 100 int result = m_presenter->checkPermission(WebSecurityOrigin(context->securit yOrigin())); | 100 int result = m_presenter->checkPermission(WebSecurityOrigin(context->securit yOrigin())); |
| 101 return static_cast<NotificationClient::Permission>(result); | 101 return static_cast<NotificationClient::Permission>(result); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void NotificationPresenterImpl::requestPermission(ExecutionContext* context, WTF ::PassOwnPtr<NotificationPermissionCallback> callback) | 104 void NotificationPresenterImpl::requestPermission(ExecutionContext* context, WTF ::PassOwnPtr<NotificationPermissionCallback> callback) |
| 105 { | 105 { |
| 106 m_presenter->requestPermission(WebSecurityOrigin(context->securityOrigin()), new NotificationPermissionCallbackClient(m_presenter, context->securityOrigin() , callback)); | 106 m_presenter->requestPermission(WebSecurityOrigin(context->securityOrigin()), new NotificationPermissionCallbackClient(m_presenter, context->securityOrigin() , callback)); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |