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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 case WebServiceWorkerStateActivated: | 94 case WebServiceWorkerStateActivated: |
95 return "activated"; | 95 return "activated"; |
96 case WebServiceWorkerStateRedundant: | 96 case WebServiceWorkerStateRedundant: |
97 return "redundant"; | 97 return "redundant"; |
98 default: | 98 default: |
99 ASSERT_NOT_REACHED(); | 99 ASSERT_NOT_REACHED(); |
100 return nullAtom; | 100 return nullAtom; |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
| 104 String ServiceWorker::id() const |
| 105 { |
| 106 return m_outerWorker->id(); |
| 107 } |
| 108 |
104 PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::from(ExecutionContext* exec
utionContext, WebType* worker) | 109 PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::from(ExecutionContext* exec
utionContext, WebType* worker) |
105 { | 110 { |
106 if (!worker) | 111 if (!worker) |
107 return nullptr; | 112 return nullptr; |
108 | 113 |
109 RefPtrWillBeRawPtr<ServiceWorker> serviceWorker = getOrCreate(executionConte
xt, worker); | 114 RefPtrWillBeRawPtr<ServiceWorker> serviceWorker = getOrCreate(executionConte
xt, worker); |
110 return serviceWorker.release(); | 115 return serviceWorker.release(); |
111 } | 116 } |
112 | 117 |
113 bool ServiceWorker::hasPendingActivity() const | 118 bool ServiceWorker::hasPendingActivity() const |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 { | 152 { |
148 ASSERT(m_outerWorker); | 153 ASSERT(m_outerWorker); |
149 m_outerWorker->setProxy(this); | 154 m_outerWorker->setProxy(this); |
150 } | 155 } |
151 | 156 |
152 ServiceWorker::~ServiceWorker() | 157 ServiceWorker::~ServiceWorker() |
153 { | 158 { |
154 } | 159 } |
155 | 160 |
156 } // namespace blink | 161 } // namespace blink |
OLD | NEW |