| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 observer.OnStopping(); | 508 observer.OnStopping(); |
| 509 return true; | 509 return true; |
| 510 } | 510 } |
| 511 | 511 |
| 512 void EmbeddedWorkerInstance::StopIfIdle() { | 512 void EmbeddedWorkerInstance::StopIfIdle() { |
| 513 if (devtools_attached_) { | 513 if (devtools_attached_) { |
| 514 if (devtools_proxy_) { | 514 if (devtools_proxy_) { |
| 515 // Check ShouldNotifyWorkerStopIgnored not to show the same message | 515 // Check ShouldNotifyWorkerStopIgnored not to show the same message |
| 516 // multiple times in DevTools. | 516 // multiple times in DevTools. |
| 517 if (devtools_proxy_->ShouldNotifyWorkerStopIgnored()) { | 517 if (devtools_proxy_->ShouldNotifyWorkerStopIgnored()) { |
| 518 AddMessageToConsole(blink::WebConsoleMessage::LevelDebug, | 518 AddMessageToConsole(blink::WebConsoleMessage::LevelVerbose, |
| 519 kServiceWorkerTerminationCanceledMesage); | 519 kServiceWorkerTerminationCanceledMesage); |
| 520 devtools_proxy_->WorkerStopIgnoredNotified(); | 520 devtools_proxy_->WorkerStopIgnoredNotified(); |
| 521 } | 521 } |
| 522 } | 522 } |
| 523 return; | 523 return; |
| 524 } | 524 } |
| 525 Stop(); | 525 Stop(); |
| 526 } | 526 } |
| 527 | 527 |
| 528 ServiceWorkerStatusCode EmbeddedWorkerInstance::SendMessage( | 528 ServiceWorkerStatusCode EmbeddedWorkerInstance::SendMessage( |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 case SCRIPT_READ_FINISHED: | 920 case SCRIPT_READ_FINISHED: |
| 921 return "Script read finished"; | 921 return "Script read finished"; |
| 922 case STARTING_PHASE_MAX_VALUE: | 922 case STARTING_PHASE_MAX_VALUE: |
| 923 NOTREACHED(); | 923 NOTREACHED(); |
| 924 } | 924 } |
| 925 NOTREACHED() << phase; | 925 NOTREACHED() << phase; |
| 926 return std::string(); | 926 return std::string(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 } // namespace content | 929 } // namespace content |
| OLD | NEW |