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

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

Issue 205563006: Add a status code to install event handled message from Service Worker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix expected -> expected_status 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 | 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_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_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"
11 #include "content/common/service_worker/service_worker_types.h" 11 #include "content/common/service_worker/service_worker_types.h"
12 #include "ipc/ipc_listener.h" 12 #include "ipc/ipc_listener.h"
13 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
13 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" 14 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 16
16 namespace base { 17 namespace base {
17 class MessageLoopProxy; 18 class MessageLoopProxy;
18 class TaskRunner; 19 class TaskRunner;
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 23
(...skipping 25 matching lines...) Expand all
48 49
49 bool OnMessageReceived(const IPC::Message& msg); 50 bool OnMessageReceived(const IPC::Message& msg);
50 51
51 void SendMessageToBrowser(int request_id, const IPC::Message& message); 52 void SendMessageToBrowser(int request_id, const IPC::Message& message);
52 53
53 // WebServiceWorkerContextClient overrides, some of them are just dispatched 54 // WebServiceWorkerContextClient overrides, some of them are just dispatched
54 // on to script_context_. 55 // on to script_context_.
55 virtual void workerContextFailedToStart(); 56 virtual void workerContextFailedToStart();
56 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy); 57 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy);
57 virtual void workerContextDestroyed(); 58 virtual void workerContextDestroyed();
58 virtual void didHandleInstallEvent(int request_id); 59 virtual void didHandleInstallEvent(int request_id,
60 blink::WebServiceWorkerEventResult result);
59 virtual void didHandleFetchEvent(int request_id); 61 virtual void didHandleFetchEvent(int request_id);
60 virtual void didHandleFetchEvent( 62 virtual void didHandleFetchEvent(
61 int request_id, 63 int request_id,
62 const blink::WebServiceWorkerResponse& response); 64 const blink::WebServiceWorkerResponse& response);
63 65
64 // TODO: Implement DevTools related method overrides. 66 // TODO: Implement DevTools related method overrides.
65 67
66 int embedded_worker_id() const { return embedded_worker_id_; } 68 int embedded_worker_id() const { return embedded_worker_id_; }
67 base::MessageLoopProxy* main_thread_proxy() const { 69 base::MessageLoopProxy* main_thread_proxy() const {
68 return main_thread_proxy_; 70 return main_thread_proxy_;
(...skipping 16 matching lines...) Expand all
85 scoped_ptr<ServiceWorkerScriptContext> script_context_; 87 scoped_ptr<ServiceWorkerScriptContext> script_context_;
86 88
87 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; 89 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_;
88 90
89 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); 91 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient);
90 }; 92 };
91 93
92 } // namespace content 94 } // namespace content
93 95
94 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ 96 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698