| 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/embedded_worker_instance.h" | 5 #include "content/browser/service_worker/embedded_worker_instance.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // |rph| may be NULL in unit tests. | 88 // |rph| may be NULL in unit tests. |
| 89 worker_devtools_agent_route_id = rph->GetNextRoutingID(); | 89 worker_devtools_agent_route_id = rph->GetNextRoutingID(); |
| 90 wait_for_debugger = | 90 wait_for_debugger = |
| 91 ServiceWorkerDevToolsManager::GetInstance()->WorkerCreated( | 91 ServiceWorkerDevToolsManager::GetInstance()->WorkerCreated( |
| 92 process_id, worker_devtools_agent_route_id, | 92 process_id, worker_devtools_agent_route_id, |
| 93 ServiceWorkerDevToolsManager::ServiceWorkerIdentifier( | 93 ServiceWorkerDevToolsManager::ServiceWorkerIdentifier( |
| 94 service_worker_context, service_worker_context_weak, | 94 service_worker_context, service_worker_context_weak, |
| 95 service_worker_version_id, url, scope), | 95 service_worker_version_id, url, scope), |
| 96 is_installed); | 96 is_installed); |
| 97 if (request.is_pending()) | 97 if (request.is_pending()) |
| 98 rph->GetRemoteInterfaces()->GetInterface(std::move(request)); | 98 BindInterface(rph, std::move(request)); |
| 99 } | 99 } |
| 100 BrowserThread::PostTask( | 100 BrowserThread::PostTask( |
| 101 BrowserThread::IO, | 101 BrowserThread::IO, |
| 102 FROM_HERE, | 102 FROM_HERE, |
| 103 base::Bind(callback, worker_devtools_agent_route_id, wait_for_debugger)); | 103 base::Bind(callback, worker_devtools_agent_route_id, wait_for_debugger)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void CallDetach(EmbeddedWorkerInstance* instance) { | 106 void CallDetach(EmbeddedWorkerInstance* instance) { |
| 107 // This could be called on the UI thread if |client_| still be valid when the | 107 // This could be called on the UI thread if |client_| still be valid when the |
| 108 // message loop on the UI thread gets destructed. | 108 // message loop on the UI thread gets destructed. |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 case SCRIPT_READ_FINISHED: | 919 case SCRIPT_READ_FINISHED: |
| 920 return "Script read finished"; | 920 return "Script read finished"; |
| 921 case STARTING_PHASE_MAX_VALUE: | 921 case STARTING_PHASE_MAX_VALUE: |
| 922 NOTREACHED(); | 922 NOTREACHED(); |
| 923 } | 923 } |
| 924 NOTREACHED() << phase; | 924 NOTREACHED() << phase; |
| 925 return std::string(); | 925 return std::string(); |
| 926 } | 926 } |
| 927 | 927 |
| 928 } // namespace content | 928 } // namespace content |
| OLD | NEW |