| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 case mojom::blink::PermissionStatus::DENIED: | 346 case mojom::blink::PermissionStatus::DENIED: |
| 347 return "denied"; | 347 return "denied"; |
| 348 case mojom::blink::PermissionStatus::ASK: | 348 case mojom::blink::PermissionStatus::ASK: |
| 349 return "default"; | 349 return "default"; |
| 350 } | 350 } |
| 351 | 351 |
| 352 NOTREACHED(); | 352 NOTREACHED(); |
| 353 return "denied"; | 353 return "denied"; |
| 354 } | 354 } |
| 355 | 355 |
| 356 String Notification::permission(ExecutionContext* context) { | 356 String Notification::permission(ScriptState* scriptState) { |
| 357 ExecutionContext* context = scriptState->getExecutionContext(); |
| 357 return permissionString( | 358 return permissionString( |
| 358 NotificationManager::from(context)->permissionStatus(context)); | 359 NotificationManager::from(context)->permissionStatus(context)); |
| 359 } | 360 } |
| 360 | 361 |
| 361 ScriptPromise Notification::requestPermission( | 362 ScriptPromise Notification::requestPermission( |
| 362 ScriptState* scriptState, | 363 ScriptState* scriptState, |
| 363 NotificationPermissionCallback* deprecatedCallback) { | 364 NotificationPermissionCallback* deprecatedCallback) { |
| 364 ExecutionContext* context = scriptState->getExecutionContext(); | 365 ExecutionContext* context = scriptState->getExecutionContext(); |
| 365 if (!context->isSecureContext()) { | 366 if (!context->isSecureContext()) { |
| 366 Deprecation::countDeprecation( | 367 Deprecation::countDeprecation( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 } | 422 } |
| 422 | 423 |
| 423 DEFINE_TRACE(Notification) { | 424 DEFINE_TRACE(Notification) { |
| 424 visitor->trace(m_prepareShowMethodRunner); | 425 visitor->trace(m_prepareShowMethodRunner); |
| 425 visitor->trace(m_loader); | 426 visitor->trace(m_loader); |
| 426 EventTargetWithInlineData::trace(visitor); | 427 EventTargetWithInlineData::trace(visitor); |
| 427 ContextLifecycleObserver::trace(visitor); | 428 ContextLifecycleObserver::trace(visitor); |
| 428 } | 429 } |
| 429 | 430 |
| 430 } // namespace blink | 431 } // namespace blink |
| OLD | NEW |