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

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

Issue 140893002: Adding slightly clearer separation between SW and EmbeddedWorker (still incomplete) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_REGISTRY_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 int embedded_worker_id, 45 int embedded_worker_id,
46 int64 service_worker_version_id, 46 int64 service_worker_version_id,
47 const GURL& script_url); 47 const GURL& script_url);
48 bool StopWorker(int process_id, 48 bool StopWorker(int process_id,
49 int embedded_worker_id); 49 int embedded_worker_id);
50 50
51 // Called back from EmbeddedWorker in the child process, relayed via 51 // Called back from EmbeddedWorker in the child process, relayed via
52 // ServiceWorkerDispatcherHost. 52 // ServiceWorkerDispatcherHost.
53 void OnWorkerStarted(int process_id, int thread_id, int embedded_worker_id); 53 void OnWorkerStarted(int process_id, int thread_id, int embedded_worker_id);
54 void OnWorkerStopped(int process_id, int embedded_worker_id); 54 void OnWorkerStopped(int process_id, int embedded_worker_id);
55 void OnSendMessageToBrowser(int embedded_worker_id,
56 const IPC::Message& message);
55 57
56 // Keeps a map from process_id to sender information. 58 // Keeps a map from process_id to sender information.
57 void AddChildProcessSender(int process_id, IPC::Sender* sender); 59 void AddChildProcessSender(int process_id, IPC::Sender* sender);
58 void RemoveChildProcessSender(int process_id); 60 void RemoveChildProcessSender(int process_id);
59 61
60 private: 62 private:
61 friend class base::RefCounted<EmbeddedWorkerRegistry>; 63 friend class base::RefCounted<EmbeddedWorkerRegistry>;
62 friend class EmbeddedWorkerInstance; 64 friend class EmbeddedWorkerInstance;
63 65
64 typedef std::map<int, EmbeddedWorkerInstance*> WorkerInstanceMap; 66 typedef std::map<int, EmbeddedWorkerInstance*> WorkerInstanceMap;
(...skipping 16 matching lines...) Expand all
81 std::map<int, int> worker_process_map_; 83 std::map<int, int> worker_process_map_;
82 84
83 int next_embedded_worker_id_; 85 int next_embedded_worker_id_;
84 86
85 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); 87 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry);
86 }; 88 };
87 89
88 } // namespace content 90 } // namespace content
89 91
90 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ 92 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698