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

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

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

Powered by Google App Engine
This is Rietveld 408576698