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

Side by Side Diff: content/browser/service_worker/service_worker_internals_ui.cc

Issue 2263843002: DevTools: merge devtools target with devtools host, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 3 Created 4 years, 3 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
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/service_worker/service_worker_internals_ui.h" 5 #include "content/browser/service_worker/service_worker_internals_ui.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 base::Callback<void(ServiceWorkerStatusCode)> callback = 524 base::Callback<void(ServiceWorkerStatusCode)> callback =
525 base::Bind(OperationCompleteCallback, AsWeakPtr(), callback_id); 525 base::Bind(OperationCompleteCallback, AsWeakPtr(), callback_id);
526 scoped_refptr<DevToolsAgentHostImpl> agent_host( 526 scoped_refptr<DevToolsAgentHostImpl> agent_host(
527 ServiceWorkerDevToolsManager::GetInstance() 527 ServiceWorkerDevToolsManager::GetInstance()
528 ->GetDevToolsAgentHostForWorker(process_host_id, 528 ->GetDevToolsAgentHostForWorker(process_host_id,
529 devtools_agent_route_id)); 529 devtools_agent_route_id));
530 if (!agent_host.get()) { 530 if (!agent_host.get()) {
531 callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND); 531 callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND);
532 return; 532 return;
533 } 533 }
534 agent_host->Inspect(web_ui()->GetWebContents()->GetBrowserContext()); 534 agent_host->Inspect();
535 callback.Run(SERVICE_WORKER_OK); 535 callback.Run(SERVICE_WORKER_OK);
536 } 536 }
537 537
538 void ServiceWorkerInternalsUI::Unregister(const ListValue* args) { 538 void ServiceWorkerInternalsUI::Unregister(const ListValue* args) {
539 DCHECK_CURRENTLY_ON(BrowserThread::UI); 539 DCHECK_CURRENTLY_ON(BrowserThread::UI);
540 int callback_id; 540 int callback_id;
541 int partition_id; 541 int partition_id;
542 std::string scope_string; 542 std::string scope_string;
543 const DictionaryValue* cmd_args = NULL; 543 const DictionaryValue* cmd_args = NULL;
544 scoped_refptr<ServiceWorkerContextWrapper> context; 544 scoped_refptr<ServiceWorkerContextWrapper> context;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 callback.Run(SERVICE_WORKER_ERROR_ABORT); 590 callback.Run(SERVICE_WORKER_ERROR_ABORT);
591 return; 591 return;
592 } 592 }
593 593
594 // ServiceWorkerContextWrapper::UnregisterServiceWorker doesn't work here 594 // ServiceWorkerContextWrapper::UnregisterServiceWorker doesn't work here
595 // because that reduces a status code to boolean. 595 // because that reduces a status code to boolean.
596 context->context()->UnregisterServiceWorker(scope, callback); 596 context->context()->UnregisterServiceWorker(scope, callback);
597 } 597 }
598 598
599 } // namespace content 599 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/worker_devtools_agent_host.cc ('k') | content/public/browser/devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698