| OLD | NEW |
| 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/service_worker/service_worker_internals_ui.h" | 5 #include "content/browser/service_worker/service_worker_internals_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 value->SetString("sourceURL", message.source_url.spec()); | 370 value->SetString("sourceURL", message.source_url.spec()); |
| 371 args.push_back(value.release()); | 371 args.push_back(value.release()); |
| 372 web_ui_->CallJavascriptFunction("serviceworker.onConsoleMessageReported", | 372 web_ui_->CallJavascriptFunction("serviceworker.onConsoleMessageReported", |
| 373 args.get()); | 373 args.get()); |
| 374 } | 374 } |
| 375 void OnRegistrationStored(const GURL& pattern) override { | 375 void OnRegistrationStored(const GURL& pattern) override { |
| 376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 377 web_ui_->CallJavascriptFunction("serviceworker.onRegistrationStored", | 377 web_ui_->CallJavascriptFunction("serviceworker.onRegistrationStored", |
| 378 StringValue(pattern.spec())); | 378 StringValue(pattern.spec())); |
| 379 } | 379 } |
| 380 void OnRegistrationDeleted(const GURL& pattern) override { | 380 void OnRegistrationDeleted(int64 registration_id, |
| 381 const GURL& pattern) override { |
| 381 web_ui_->CallJavascriptFunction("serviceworker.onRegistrationDeleted", | 382 web_ui_->CallJavascriptFunction("serviceworker.onRegistrationDeleted", |
| 382 StringValue(pattern.spec())); | 383 StringValue(pattern.spec())); |
| 383 } | 384 } |
| 384 int partition_id() const { return partition_id_; } | 385 int partition_id() const { return partition_id_; } |
| 385 | 386 |
| 386 private: | 387 private: |
| 387 const int partition_id_; | 388 const int partition_id_; |
| 388 WebUI* const web_ui_; | 389 WebUI* const web_ui_; |
| 389 }; | 390 }; |
| 390 | 391 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 return; | 669 return; |
| 669 } | 670 } |
| 670 | 671 |
| 671 base::Callback<void(ServiceWorkerStatusCode)> callback = | 672 base::Callback<void(ServiceWorkerStatusCode)> callback = |
| 672 base::Bind(OperationCompleteCallback, AsWeakPtr(), callback_id); | 673 base::Bind(OperationCompleteCallback, AsWeakPtr(), callback_id); |
| 673 FindRegistrationForPattern( | 674 FindRegistrationForPattern( |
| 674 context, GURL(scope_string), base::Bind(StartActiveWorker, callback)); | 675 context, GURL(scope_string), base::Bind(StartActiveWorker, callback)); |
| 675 } | 676 } |
| 676 | 677 |
| 677 } // namespace content | 678 } // namespace content |
| OLD | NEW |