| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/service_worker/service_worker_dispatcher_host.h" | 5 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 callback)); | 729 callback)); |
| 730 break; | 730 break; |
| 731 case SERVICE_WORKER_PROVIDER_FOR_CONTROLLER: | 731 case SERVICE_WORKER_PROVIDER_FOR_CONTROLLER: |
| 732 RunSoon(base::Bind( | 732 RunSoon(base::Bind( |
| 733 &ServiceWorkerDispatcherHost::DispatchExtendableMessageEventInternal< | 733 &ServiceWorkerDispatcherHost::DispatchExtendableMessageEventInternal< |
| 734 ServiceWorkerObjectInfo>, | 734 ServiceWorkerObjectInfo>, |
| 735 this, worker, message, source_origin, sent_message_ports, callback, | 735 this, worker, message, source_origin, sent_message_ports, callback, |
| 736 sender_provider_host->GetOrCreateServiceWorkerHandle( | 736 sender_provider_host->GetOrCreateServiceWorkerHandle( |
| 737 sender_provider_host->running_hosted_version()))); | 737 sender_provider_host->running_hosted_version()))); |
| 738 break; | 738 break; |
| 739 case SERVICE_WORKER_PROVIDER_FOR_SANDBOXED_FRAME: | |
| 740 case SERVICE_WORKER_PROVIDER_UNKNOWN: | 739 case SERVICE_WORKER_PROVIDER_UNKNOWN: |
| 740 default: |
| 741 NOTREACHED() << sender_provider_host->provider_type(); | 741 NOTREACHED() << sender_provider_host->provider_type(); |
| 742 break; | 742 break; |
| 743 } | 743 } |
| 744 } | 744 } |
| 745 | 745 |
| 746 void ServiceWorkerDispatcherHost::OnProviderCreated( | 746 void ServiceWorkerDispatcherHost::OnProviderCreated( |
| 747 int provider_id, | 747 int provider_id, |
| 748 int route_id, | 748 int route_id, |
| 749 ServiceWorkerProviderType provider_type) { | 749 ServiceWorkerProviderType provider_type) { |
| 750 // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed. | 750 // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed. |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 if (!handle) { | 1406 if (!handle) { |
| 1407 bad_message::ReceivedBadMessage(this, | 1407 bad_message::ReceivedBadMessage(this, |
| 1408 bad_message::SWDH_TERMINATE_BAD_HANDLE); | 1408 bad_message::SWDH_TERMINATE_BAD_HANDLE); |
| 1409 return; | 1409 return; |
| 1410 } | 1410 } |
| 1411 handle->version()->StopWorker( | 1411 handle->version()->StopWorker( |
| 1412 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); | 1412 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 } // namespace content | 1415 } // namespace content |
| OLD | NEW |