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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.h

Issue 258513002: Introduce WorkerStoragePartitionId and use it in SharedWorkerInstance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold WorkerStoragePartition in SharedWorkerMessageFilter Created 6 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 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_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 11 matching lines...) Expand all
22 class Message; 22 class Message;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 26
27 class SharedWorkerInstance; 27 class SharedWorkerInstance;
28 class SharedWorkerHost; 28 class SharedWorkerHost;
29 class SharedWorkerMessageFilter; 29 class SharedWorkerMessageFilter;
30 class ResourceContext; 30 class ResourceContext;
31 class WorkerServiceObserver; 31 class WorkerServiceObserver;
32 class WorkerStoragePartition; 32 class WorkerStoragePartitionId;
33 33
34 // If "enable-embedded-shared-worker" is set this class will be used instead of 34 // If "enable-embedded-shared-worker" is set this class will be used instead of
35 // WorkerServiceImpl. 35 // WorkerServiceImpl.
36 // TODO(horo): implement this class. 36 // TODO(horo): implement this class.
37 class CONTENT_EXPORT SharedWorkerServiceImpl 37 class CONTENT_EXPORT SharedWorkerServiceImpl
38 : public NON_EXPORTED_BASE(WorkerService) { 38 : public NON_EXPORTED_BASE(WorkerService) {
39 public: 39 public:
40 // Returns the SharedWorkerServiceImpl singleton. 40 // Returns the SharedWorkerServiceImpl singleton.
41 static SharedWorkerServiceImpl* GetInstance(); 41 static SharedWorkerServiceImpl* GetInstance();
42 42
43 // WorkerService implementation: 43 // WorkerService implementation:
44 virtual bool TerminateWorker(int process_id, int route_id) OVERRIDE; 44 virtual bool TerminateWorker(int process_id, int route_id) OVERRIDE;
45 virtual std::vector<WorkerInfo> GetWorkers() OVERRIDE; 45 virtual std::vector<WorkerInfo> GetWorkers() OVERRIDE;
46 virtual void AddObserver(WorkerServiceObserver* observer) OVERRIDE; 46 virtual void AddObserver(WorkerServiceObserver* observer) OVERRIDE;
47 virtual void RemoveObserver(WorkerServiceObserver* observer) OVERRIDE; 47 virtual void RemoveObserver(WorkerServiceObserver* observer) OVERRIDE;
48 48
49 // These methods correspond to worker related IPCs. 49 // These methods correspond to worker related IPCs.
50 void CreateWorker(const ViewHostMsg_CreateWorker_Params& params, 50 void CreateWorker(const ViewHostMsg_CreateWorker_Params& params,
51 int route_id, 51 int route_id,
52 SharedWorkerMessageFilter* filter, 52 SharedWorkerMessageFilter* filter,
53 ResourceContext* resource_context, 53 ResourceContext* resource_context,
54 const WorkerStoragePartition& worker_partition, 54 const WorkerStoragePartitionId& partition_id,
55 bool* url_mismatch); 55 bool* url_mismatch);
56 void ForwardToWorker(const IPC::Message& message, 56 void ForwardToWorker(const IPC::Message& message,
57 SharedWorkerMessageFilter* filter); 57 SharedWorkerMessageFilter* filter);
58 void DocumentDetached(unsigned long long document_id, 58 void DocumentDetached(unsigned long long document_id,
59 SharedWorkerMessageFilter* filter); 59 SharedWorkerMessageFilter* filter);
60 void WorkerContextClosed(int worker_route_id, 60 void WorkerContextClosed(int worker_route_id,
61 SharedWorkerMessageFilter* filter); 61 SharedWorkerMessageFilter* filter);
62 void WorkerContextDestroyed(int worker_route_id, 62 void WorkerContextDestroyed(int worker_route_id,
63 SharedWorkerMessageFilter* filter); 63 SharedWorkerMessageFilter* filter);
64 void WorkerScriptLoaded(int worker_route_id, 64 void WorkerScriptLoaded(int worker_route_id,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 int next_pending_instance_id_; 167 int next_pending_instance_id_;
168 168
169 ObserverList<WorkerServiceObserver> observers_; 169 ObserverList<WorkerServiceObserver> observers_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl); 171 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl);
172 }; 172 };
173 173
174 } // namespace content 174 } // namespace content
175 175
176 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 176 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698