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

Side by Side Diff: content/browser/service_worker/embedded_worker_test_helper.h

Issue 252633003: Introduce worker_devtools_agent_route_id for EmbeddedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RenderProcessHostImpl::GetNextRoutingIDForProcess Created 6 years, 7 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void SimulateWorkerStopped(int embedded_worker_id); 95 void SimulateWorkerStopped(int embedded_worker_id);
96 void SimulateSend(IPC::Message* message); 96 void SimulateSend(IPC::Message* message);
97 97
98 protected: 98 protected:
99 EmbeddedWorkerRegistry* registry(); 99 EmbeddedWorkerRegistry* registry();
100 100
101 private: 101 private:
102 void OnStartWorkerStub(int embedded_worker_id, 102 void OnStartWorkerStub(int embedded_worker_id,
103 int64 service_worker_version_id, 103 int64 service_worker_version_id,
104 const GURL& scope, 104 const GURL& scope,
105 const GURL& script_url); 105 const GURL& script_url,
106 int worker_devtools_agent_route_id);
106 void OnStopWorkerStub(int embedded_worker_id); 107 void OnStopWorkerStub(int embedded_worker_id);
107 void OnMessageToWorkerStub(int thread_id, 108 void OnMessageToWorkerStub(int thread_id,
108 int embedded_worker_id, 109 int embedded_worker_id,
109 const IPC::Message& message); 110 const IPC::Message& message);
110 void OnActivateEventStub(int request_id); 111 void OnActivateEventStub(int request_id);
111 void OnInstallEventStub(int request_id, int active_version_id); 112 void OnInstallEventStub(int request_id, int active_version_id);
112 void OnFetchEventStub(int request_id, 113 void OnFetchEventStub(int request_id,
113 const ServiceWorkerFetchRequest& request); 114 const ServiceWorkerFetchRequest& request);
114 115
115 base::WeakPtr<ServiceWorkerContextCore> context_; 116 base::WeakPtr<ServiceWorkerContextCore> context_;
116 117
117 IPC::TestSink sink_; 118 IPC::TestSink sink_;
118 IPC::TestSink inner_sink_; 119 IPC::TestSink inner_sink_;
119 120
120 int next_thread_id_; 121 int next_thread_id_;
121 122
122 // Updated each time MessageToWorker message is received. 123 // Updated each time MessageToWorker message is received.
123 int current_embedded_worker_id_; 124 int current_embedded_worker_id_;
124 125
125 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_; 126 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_;
126 127
127 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper); 128 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper);
128 }; 129 };
129 130
130 } // namespace content 131 } // namespace content
131 132
132 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 133 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698