OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" |
| 12 #include "content/common/service_worker/service_worker_status_code.h" |
| 13 #include "content/public/browser/web_ui_controller.h" |
| 14 |
| 15 namespace base { |
| 16 class ListValue; |
| 17 class DictionaryValue; |
| 18 } |
| 19 |
| 20 namespace content { |
| 21 |
| 22 class StoragePartition; |
| 23 class ServiceWorkerContextWrapper; |
| 24 class ServiceWorkerRegistration; |
| 25 class ServiceWorkerVersion; |
| 26 |
| 27 class ServiceWorkerInternalsUI |
| 28 : public WebUIController, |
| 29 public base::SupportsWeakPtr<ServiceWorkerInternalsUI> { |
| 30 public: |
| 31 explicit ServiceWorkerInternalsUI(WebUI* web_ui); |
| 32 |
| 33 private: |
| 34 class OperationProxy; |
| 35 |
| 36 virtual ~ServiceWorkerInternalsUI(); |
| 37 void AddContextFromStoragePartition(StoragePartition* partition); |
| 38 |
| 39 // Called from Javascript. |
| 40 void GetAllRegistrations(const base::ListValue* args); |
| 41 void StartWorker(const base::ListValue* args); |
| 42 void StopWorker(const base::ListValue* args); |
| 43 void Unregister(const base::ListValue* args); |
| 44 |
| 45 bool GetRegistrationInfo( |
| 46 const base::ListValue* args, |
| 47 base::FilePath* partition_path, |
| 48 GURL* scope, |
| 49 scoped_refptr<ServiceWorkerContextWrapper>* context) const; |
| 50 }; |
| 51 |
| 52 } // namespace content |
| 53 |
| 54 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ |
OLD | NEW |