Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: content/browser/notifications/notification_event_dispatcher_impl.cc

Issue 871853002: ServiceWorker: add ServiceWorkerClients.claim() support (2/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove assignment within conditional expression Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/push_messaging/push_messaging_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/notifications/notification_event_dispatcher_impl.h" 5 #include "content/browser/notifications/notification_event_dispatcher_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "content/browser/service_worker/service_worker_context_wrapper.h" 8 #include "content/browser/service_worker/service_worker_context_wrapper.h"
9 #include "content/browser/service_worker/service_worker_registration.h" 9 #include "content/browser/service_worker/service_worker_registration.h"
10 #include "content/browser/service_worker/service_worker_storage.h" 10 #include "content/browser/service_worker/service_worker_storage.h"
(...skipping 28 matching lines...) Expand all
39 case SERVICE_WORKER_ERROR_ABORT: 39 case SERVICE_WORKER_ERROR_ABORT:
40 case SERVICE_WORKER_ERROR_START_WORKER_FAILED: 40 case SERVICE_WORKER_ERROR_START_WORKER_FAILED:
41 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: 41 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND:
42 case SERVICE_WORKER_ERROR_NOT_FOUND: 42 case SERVICE_WORKER_ERROR_NOT_FOUND:
43 case SERVICE_WORKER_ERROR_EXISTS: 43 case SERVICE_WORKER_ERROR_EXISTS:
44 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED: 44 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED:
45 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: 45 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED:
46 case SERVICE_WORKER_ERROR_IPC_FAILED: 46 case SERVICE_WORKER_ERROR_IPC_FAILED:
47 case SERVICE_WORKER_ERROR_NETWORK: 47 case SERVICE_WORKER_ERROR_NETWORK:
48 case SERVICE_WORKER_ERROR_SECURITY: 48 case SERVICE_WORKER_ERROR_SECURITY:
49 case SERVICE_WORKER_ERROR_STATE:
49 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR; 50 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR;
50 break; 51 break;
51 } 52 }
52 53
53 BrowserThread::PostTask(BrowserThread::UI, 54 BrowserThread::PostTask(BrowserThread::UI,
54 FROM_HERE, 55 FROM_HERE,
55 base::Bind(dispatch_complete_callback, status)); 56 base::Bind(dispatch_complete_callback, status));
56 } 57 }
57 58
58 // Dispatches the notificationclick on |service_worker_registration| if the 59 // Dispatches the notificationclick on |service_worker_registration| if the
(...skipping 27 matching lines...) Expand all
86 case SERVICE_WORKER_ERROR_ABORT: 87 case SERVICE_WORKER_ERROR_ABORT:
87 case SERVICE_WORKER_ERROR_START_WORKER_FAILED: 88 case SERVICE_WORKER_ERROR_START_WORKER_FAILED:
88 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: 89 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND:
89 case SERVICE_WORKER_ERROR_EXISTS: 90 case SERVICE_WORKER_ERROR_EXISTS:
90 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED: 91 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED:
91 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: 92 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED:
92 case SERVICE_WORKER_ERROR_IPC_FAILED: 93 case SERVICE_WORKER_ERROR_IPC_FAILED:
93 case SERVICE_WORKER_ERROR_NETWORK: 94 case SERVICE_WORKER_ERROR_NETWORK:
94 case SERVICE_WORKER_ERROR_SECURITY: 95 case SERVICE_WORKER_ERROR_SECURITY:
95 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED: 96 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED:
97 case SERVICE_WORKER_ERROR_STATE:
96 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR; 98 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR;
97 break; 99 break;
98 case SERVICE_WORKER_OK: 100 case SERVICE_WORKER_OK:
99 NOTREACHED(); 101 NOTREACHED();
100 break; 102 break;
101 } 103 }
102 104
103 BrowserThread::PostTask(BrowserThread::UI, 105 BrowserThread::PostTask(BrowserThread::UI,
104 FROM_HERE, 106 FROM_HERE,
105 base::Bind(dispatch_complete_callback, status)); 107 base::Bind(dispatch_complete_callback, status));
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 base::Bind(&FindServiceWorkerRegistration, 164 base::Bind(&FindServiceWorkerRegistration,
163 origin, 165 origin,
164 service_worker_registration_id, 166 service_worker_registration_id,
165 notification_id, 167 notification_id,
166 notification_data, 168 notification_data,
167 dispatch_complete_callback, 169 dispatch_complete_callback,
168 service_worker_context)); 170 service_worker_context));
169 } 171 }
170 172
171 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/push_messaging/push_messaging_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698