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

Side by Side Diff: content/child/service_worker/web_service_worker_impl.h

Issue 688413002: Add terminateServiceWorker method for layout tests - chromium side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move message Created 6 years, 1 month 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_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void OnStateChanged(blink::WebServiceWorkerState new_state); 45 void OnStateChanged(blink::WebServiceWorkerState new_state);
46 46
47 virtual void setProxy(blink::WebServiceWorkerProxy* proxy); 47 virtual void setProxy(blink::WebServiceWorkerProxy* proxy);
48 virtual blink::WebServiceWorkerProxy* proxy(); 48 virtual blink::WebServiceWorkerProxy* proxy();
49 virtual void proxyReadyChanged(); 49 virtual void proxyReadyChanged();
50 virtual blink::WebURL scope() const; 50 virtual blink::WebURL scope() const;
51 virtual blink::WebURL url() const; 51 virtual blink::WebURL url() const;
52 virtual blink::WebServiceWorkerState state() const; 52 virtual blink::WebServiceWorkerState state() const;
53 virtual void postMessage(const blink::WebString& message, 53 virtual void postMessage(const blink::WebString& message,
54 blink::WebMessagePortChannelArray* channels); 54 blink::WebMessagePortChannelArray* channels);
55 virtual void terminate();
55 56
56 private: 57 private:
57 // Commits the new state internally and notifies the proxy of the change. 58 // Commits the new state internally and notifies the proxy of the change.
58 void CommitState(blink::WebServiceWorkerState new_state); 59 void CommitState(blink::WebServiceWorkerState new_state);
59 60
60 scoped_ptr<ServiceWorkerHandleReference> handle_ref_; 61 scoped_ptr<ServiceWorkerHandleReference> handle_ref_;
61 blink::WebServiceWorkerState state_; 62 blink::WebServiceWorkerState state_;
62 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 63 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
63 blink::WebServiceWorkerProxy* proxy_; 64 blink::WebServiceWorkerProxy* proxy_;
64 std::vector<blink::WebServiceWorkerState> queued_states_; 65 std::vector<blink::WebServiceWorkerState> queued_states_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); 67 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl);
67 }; 68 };
68 69
69 } // namespace content 70 } // namespace content
70 71
71 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 72 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698