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

Side by Side Diff: content/renderer/service_worker/embedded_worker_context_client.h

Issue 1171173002: [Background Sync] Use Mojo IPC to fire background sync events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting fixes Created 5 years, 6 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 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_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 const blink::WebString& name); 133 const blink::WebString& name);
134 134
135 // TODO: Implement DevTools related method overrides. 135 // TODO: Implement DevTools related method overrides.
136 136
137 int embedded_worker_id() const { return embedded_worker_id_; } 137 int embedded_worker_id() const { return embedded_worker_id_; }
138 base::SingleThreadTaskRunner* main_thread_task_runner() const { 138 base::SingleThreadTaskRunner* main_thread_task_runner() const {
139 return main_thread_task_runner_.get(); 139 return main_thread_task_runner_.get();
140 } 140 }
141 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } 141 ThreadSafeSender* thread_safe_sender() { return sender_.get(); }
142 142
143 // TEMP
144 ServiceWorkerScriptContext* script_context() { return script_context_.get(); }
145
143 private: 146 private:
144 void OnMessageToWorker(int thread_id, 147 void OnMessageToWorker(int thread_id,
145 int embedded_worker_id, 148 int embedded_worker_id,
146 const IPC::Message& message); 149 const IPC::Message& message);
147 void SendWorkerStarted(); 150 void SendWorkerStarted();
148 void SetRegistrationInServiceWorkerGlobalScope(); 151 void SetRegistrationInServiceWorkerGlobalScope();
149 152
150 const int embedded_worker_id_; 153 const int embedded_worker_id_;
151 const int64 service_worker_version_id_; 154 const int64 service_worker_version_id_;
152 const GURL service_worker_scope_; 155 const GURL service_worker_scope_;
153 const GURL script_url_; 156 const GURL script_url_;
154 const int worker_devtools_agent_route_id_; 157 const int worker_devtools_agent_route_id_;
155 scoped_refptr<ThreadSafeSender> sender_; 158 scoped_refptr<ThreadSafeSender> sender_;
156 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 159 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
157 scoped_refptr<base::TaskRunner> worker_task_runner_; 160 scoped_refptr<base::TaskRunner> worker_task_runner_;
158 161
159 scoped_ptr<ServiceWorkerScriptContext> script_context_; 162 scoped_ptr<ServiceWorkerScriptContext> script_context_;
160 scoped_refptr<ServiceWorkerProviderContext> provider_context_; 163 scoped_refptr<ServiceWorkerProviderContext> provider_context_;
161 164
162 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; 165 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_;
163 166
164 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); 167 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient);
165 }; 168 };
166 169
167 } // namespace content 170 } // namespace content
168 171
169 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 172 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698