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

Side by Side Diff: content/renderer/service_worker/service_worker_script_context.cc

Issue 140893002: Adding slightly clearer separation between SW and EmbeddedWorker (still incomplete) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit fixes 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
« no previous file with comments | « content/renderer/service_worker/service_worker_script_context.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/renderer/service_worker/service_worker_script_context.h"
6
7 #include "base/logging.h"
8 #include "content/common/service_worker/service_worker_messages.h"
9 #include "content/renderer/service_worker/embedded_worker_context_client.h"
10 #include "ipc/ipc_message.h"
11 #include "third_party/WebKit/public/web/WebServiceWorkerContextProxy.h"
12
13 namespace content {
14
15 ServiceWorkerScriptContext::ServiceWorkerScriptContext(
16 EmbeddedWorkerContextClient* embedded_context,
17 blink::WebServiceWorkerContextProxy* proxy)
18 : embedded_context_(embedded_context),
19 proxy_(proxy) {
20 }
21
22 ServiceWorkerScriptContext::~ServiceWorkerScriptContext() {}
23
24 void ServiceWorkerScriptContext::OnMessageReceived(
25 const IPC::Message& message) {
26 bool handled = true;
27 IPC_BEGIN_MESSAGE_MAP(ServiceWorkerScriptContext, message)
28 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_FetchEvent, OnFetchEvent)
29 IPC_MESSAGE_UNHANDLED(handled = false)
30 IPC_END_MESSAGE_MAP()
31 DCHECK(handled);
32 }
33
34 void ServiceWorkerScriptContext::Send(const IPC::Message& message) {
35 embedded_context_->SendMessageToBrowser(message);
36 }
37
38 void ServiceWorkerScriptContext::OnFetchEvent(
39 const ServiceWorkerFetchRequest& request) {
40 NOTIMPLEMENTED();
41 }
42
43 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/service_worker/service_worker_script_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698