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

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

Issue 489253002: Allow the browser to Send messages to an embedded worker once the script as been loaded without hav… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 int request_id, 96 int request_id,
97 int active_version_id); 97 int active_version_id);
98 virtual void OnFetchEvent(int embedded_worker_id, 98 virtual void OnFetchEvent(int embedded_worker_id,
99 int request_id, 99 int request_id,
100 const ServiceWorkerFetchRequest& request); 100 const ServiceWorkerFetchRequest& request);
101 101
102 // These functions simulate sending an EmbeddedHostMsg message to the 102 // These functions simulate sending an EmbeddedHostMsg message to the
103 // browser. 103 // browser.
104 void SimulatePausedAfterDownload(int embedded_worker_id); 104 void SimulatePausedAfterDownload(int embedded_worker_id);
105 void SimulateWorkerReadyForInspection(int embedded_worker_id); 105 void SimulateWorkerReadyForInspection(int embedded_worker_id);
106 void SimulateWorkerScriptLoaded(int embedded_worker_id); 106 void SimulateWorkerScriptLoaded(int thread_id, int embedded_worker_id);
107 void SimulateWorkerStarted(int thread_id, int embedded_worker_id); 107 void SimulateWorkerStarted(int embedded_worker_id);
108 void SimulateWorkerStopped(int embedded_worker_id); 108 void SimulateWorkerStopped(int embedded_worker_id);
109 void SimulateSend(IPC::Message* message); 109 void SimulateSend(IPC::Message* message);
110 110
111 EmbeddedWorkerRegistry* registry(); 111 EmbeddedWorkerRegistry* registry();
112 112
113 private: 113 private:
114 void OnStartWorkerStub(const EmbeddedWorkerMsg_StartWorker_Params& params); 114 void OnStartWorkerStub(const EmbeddedWorkerMsg_StartWorker_Params& params);
115 void OnResumeAfterDownloadStub(int embedded_worker_id); 115 void OnResumeAfterDownloadStub(int embedded_worker_id);
116 void OnStopWorkerStub(int embedded_worker_id); 116 void OnStopWorkerStub(int embedded_worker_id);
117 void OnMessageToWorkerStub(int thread_id, 117 void OnMessageToWorkerStub(int thread_id,
(...skipping 16 matching lines...) Expand all
134 int current_embedded_worker_id_; 134 int current_embedded_worker_id_;
135 135
136 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_; 136 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper); 138 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper);
139 }; 139 };
140 140
141 } // namespace content 141 } // namespace content
142 142
143 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 143 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698