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

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

Issue 177043003: Implement SharedWorkerServiceImpl::CreateWorker and SharedWorkerInstance and SharedWorkerHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::string and base::StringPiece Created 6 years, 9 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 "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_vector.h"
9 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
10 #include "base/observer_list.h" 11 #include "base/observer_list.h"
11 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
13 #include "content/public/browser/worker_service.h" 14 #include "content/public/browser/worker_service.h"
14 15
15 struct ViewHostMsg_CreateWorker_Params; 16 struct ViewHostMsg_CreateWorker_Params;
16 17
17 namespace IPC { 18 namespace IPC {
18 class Message; 19 class Message;
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 23
24 class SharedWorkerInstance;
25 class SharedWorkerHost;
23 class SharedWorkerMessageFilter; 26 class SharedWorkerMessageFilter;
24 class ResourceContext; 27 class ResourceContext;
25 class WorkerServiceObserver; 28 class WorkerServiceObserver;
26 class WorkerStoragePartition; 29 class WorkerStoragePartition;
27 30
28 // If "enable-embedded-shared-worker" is set this class will be used instead of 31 // If "enable-embedded-shared-worker" is set this class will be used instead of
29 // WorkerServiceImpl. 32 // WorkerServiceImpl.
30 // TODO(horo): implement this class. 33 // TODO(horo): implement this class.
31 class CONTENT_EXPORT SharedWorkerServiceImpl 34 class CONTENT_EXPORT SharedWorkerServiceImpl
32 : public NON_EXPORTED_BASE(WorkerService) { 35 : public NON_EXPORTED_BASE(WorkerService) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 84
82 void OnSharedWorkerMessageFilterClosing( 85 void OnSharedWorkerMessageFilterClosing(
83 SharedWorkerMessageFilter* filter); 86 SharedWorkerMessageFilter* filter);
84 87
85 private: 88 private:
86 friend struct DefaultSingletonTraits<SharedWorkerServiceImpl>; 89 friend struct DefaultSingletonTraits<SharedWorkerServiceImpl>;
87 90
88 SharedWorkerServiceImpl(); 91 SharedWorkerServiceImpl();
89 virtual ~SharedWorkerServiceImpl(); 92 virtual ~SharedWorkerServiceImpl();
90 93
94 SharedWorkerInstance* FindSharedWorkerInstance(
95 const GURL& url,
96 const base::string16& name,
97 const WorkerStoragePartition& worker_partition,
98 ResourceContext* resource_context);
99
100 ScopedVector<SharedWorkerHost> worker_hosts_;
91 ObserverList<WorkerServiceObserver> observers_; 101 ObserverList<WorkerServiceObserver> observers_;
92 102
93 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl); 103 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl);
94 }; 104 };
95 105
96 } // namespace content 106 } // namespace content
97 107
98 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 108 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698