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

Side by Side Diff: content/browser/devtools/protocol/service_worker_handler.h

Issue 1872673002: DevTools: introduce the bypass service worker checkbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Response Enable(); 50 Response Enable();
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 SetForceUpdateOnPageLoad(bool force_update_on_page_load); 60 Response SetUpdateOnPageLoad(bool update_on_page_load);
61 Response SetFallbackToNetwork(bool fallback_to_network);
61 Response DeliverPushMessage(const std::string& origin, 62 Response DeliverPushMessage(const std::string& origin,
62 const std::string& registration_id, 63 const std::string& registration_id,
63 const std::string& data); 64 const std::string& data);
64 Response GetTargetInfo(const std::string& target_id, 65 Response GetTargetInfo(const std::string& target_id,
65 scoped_refptr<TargetInfo>* target_info); 66 scoped_refptr<TargetInfo>* target_info);
66 Response ActivateTarget(const std::string& target_id); 67 Response ActivateTarget(const std::string& target_id);
67 68
68 // WorkerDevToolsManager::Observer implementation. 69 // WorkerDevToolsManager::Observer implementation.
69 void WorkerCreated(ServiceWorkerDevToolsAgentHost* host) override; 70 void WorkerCreated(ServiceWorkerDevToolsAgentHost* host) override;
70 void WorkerReadyForInspection(ServiceWorkerDevToolsAgentHost* host) override; 71 void WorkerReadyForInspection(ServiceWorkerDevToolsAgentHost* host) override;
(...skipping 11 matching lines...) Expand all
82 83
83 void OnWorkerRegistrationUpdated( 84 void OnWorkerRegistrationUpdated(
84 const std::vector<ServiceWorkerRegistrationInfo>& registrations); 85 const std::vector<ServiceWorkerRegistrationInfo>& registrations);
85 void OnWorkerVersionUpdated( 86 void OnWorkerVersionUpdated(
86 const std::vector<ServiceWorkerVersionInfo>& registrations); 87 const std::vector<ServiceWorkerVersionInfo>& registrations);
87 void OnErrorReported(int64_t registration_id, 88 void OnErrorReported(int64_t registration_id,
88 int64_t version_id, 89 int64_t version_id,
89 const ServiceWorkerContextObserver::ErrorInfo& info); 90 const ServiceWorkerContextObserver::ErrorInfo& info);
90 91
91 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); 92 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id);
92 void ClearForceUpdate(); 93 void ClearOverrides();
93 94
94 scoped_refptr<ServiceWorkerContextWrapper> context_; 95 scoped_refptr<ServiceWorkerContextWrapper> context_;
95 scoped_ptr<Client> client_; 96 scoped_ptr<Client> client_;
96 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; 97 ServiceWorkerDevToolsAgentHost::Map attached_hosts_;
97 bool enabled_; 98 bool enabled_;
98 std::set<GURL> urls_; 99 std::set<GURL> urls_;
99 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; 100 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_;
100 RenderFrameHostImpl* render_frame_host_; 101 RenderFrameHostImpl* render_frame_host_;
101 102
102 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; 103 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_;
103 104
104 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); 105 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler);
105 }; 106 };
106 107
107 } // namespace service_worker 108 } // namespace service_worker
108 } // namespace devtools 109 } // namespace devtools
109 } // namespace content 110 } // namespace content
110 111
111 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ 112 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698