| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 Response Disable(); | 51 Response Disable(); |
| 52 Response SendMessage(const std::string& worker_id, | 52 Response SendMessage(const std::string& worker_id, |
| 53 const std::string& message); | 53 const std::string& message); |
| 54 Response Stop(const std::string& worker_id); | 54 Response Stop(const std::string& worker_id); |
| 55 Response Unregister(const std::string& scope_url); | 55 Response Unregister(const std::string& scope_url); |
| 56 Response StartWorker(const std::string& scope_url); | 56 Response StartWorker(const std::string& scope_url); |
| 57 Response StopWorker(const std::string& version_id); | 57 Response StopWorker(const std::string& version_id); |
| 58 Response UpdateRegistration(const std::string& scope_url); | 58 Response UpdateRegistration(const std::string& scope_url); |
| 59 Response InspectWorker(const std::string& version_id); | 59 Response InspectWorker(const std::string& version_id); |
| 60 Response SetDebugOnStart(bool debug_on_start); | 60 Response SetDebugOnStart(bool debug_on_start); |
| 61 Response SetForceUpdateOnPageLoad(const std::string& registration_id, | 61 Response SetForceUpdateOnPageLoad(bool force_update_on_page_load); |
| 62 bool force_update_on_page_load); | |
| 63 Response DeliverPushMessage(const std::string& origin, | 62 Response DeliverPushMessage(const std::string& origin, |
| 64 const std::string& registration_id, | 63 const std::string& registration_id, |
| 65 const std::string& data); | 64 const std::string& data); |
| 66 Response GetTargetInfo(const std::string& target_id, | 65 Response GetTargetInfo(const std::string& target_id, |
| 67 scoped_refptr<TargetInfo>* target_info); | 66 scoped_refptr<TargetInfo>* target_info); |
| 68 Response ActivateTarget(const std::string& target_id); | 67 Response ActivateTarget(const std::string& target_id); |
| 69 | 68 |
| 70 // WorkerDevToolsManager::Observer implementation. | 69 // WorkerDevToolsManager::Observer implementation. |
| 71 void WorkerCreated(ServiceWorkerDevToolsAgentHost* host) override; | 70 void WorkerCreated(ServiceWorkerDevToolsAgentHost* host) override; |
| 72 void WorkerReadyForInspection(ServiceWorkerDevToolsAgentHost* host) override; | 71 void WorkerReadyForInspection(ServiceWorkerDevToolsAgentHost* host) override; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 94 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); | 93 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); |
| 95 void ClearForceUpdate(); | 94 void ClearForceUpdate(); |
| 96 | 95 |
| 97 scoped_refptr<ServiceWorkerContextWrapper> context_; | 96 scoped_refptr<ServiceWorkerContextWrapper> context_; |
| 98 scoped_ptr<Client> client_; | 97 scoped_ptr<Client> client_; |
| 99 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; | 98 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; |
| 100 bool enabled_; | 99 bool enabled_; |
| 101 std::set<GURL> urls_; | 100 std::set<GURL> urls_; |
| 102 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; | 101 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; |
| 103 RenderFrameHostImpl* render_frame_host_; | 102 RenderFrameHostImpl* render_frame_host_; |
| 104 std::set<int> force_update_enabled_registrations_; | |
| 105 | 103 |
| 106 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; | 104 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; |
| 107 | 105 |
| 108 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); | 106 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); |
| 109 }; | 107 }; |
| 110 | 108 |
| 111 } // namespace service_worker | 109 } // namespace service_worker |
| 112 } // namespace devtools | 110 } // namespace devtools |
| 113 } // namespace content | 111 } // namespace content |
| 114 | 112 |
| 115 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 113 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
| OLD | NEW |