Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | |
| 9 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 10 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" | 11 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" |
| 11 #include "third_party/WebKit/public/platform/WebServiceWorker.h" | 12 #include "third_party/WebKit/public/platform/WebServiceWorker.h" |
| 12 #include "third_party/WebKit/public/web/WebFrame.h" | 13 #include "third_party/WebKit/public/web/WebFrame.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 class ThreadSafeSender; | 16 class ThreadSafeSender; |
| 16 | 17 |
| 17 class WebServiceWorkerImpl | 18 class WebServiceWorkerImpl |
| 18 : NON_EXPORTED_BASE(public blink::WebServiceWorker) { | 19 : NON_EXPORTED_BASE(public blink::WebServiceWorker) { |
| 19 public: | 20 public: |
| 20 WebServiceWorkerImpl(int64 registration_id, | 21 WebServiceWorkerImpl(int handle_id, |
| 21 int64 version_id, | 22 int64 version_id, |
| 22 ThreadSafeSender* thread_safe_sender) | 23 ThreadSafeSender* thread_safe_sender); |
| 23 : registration_id_(registration_id), | |
| 24 version_id_(version_id), | |
| 25 thread_safe_sender_(thread_safe_sender) {} | |
| 26 virtual ~WebServiceWorkerImpl(); | 24 virtual ~WebServiceWorkerImpl(); |
| 27 | 25 |
| 28 virtual void postMessage(const blink::WebString& message, | 26 virtual void postMessage(const blink::WebString& message, |
| 29 blink::WebMessagePortChannelArray* channels); | 27 blink::WebMessagePortChannelArray* channels); |
| 30 | 28 |
| 31 private: | 29 private: |
| 32 int64 registration_id_; | 30 const int handle_id_; |
| 33 int64 version_id_; | 31 const int64 version_id_; |
| 34 ThreadSafeSender* thread_safe_sender_; | 32 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
|
michaeln
2014/04/08 01:21:41
thnx for fixing
| |
| 35 | 33 |
| 36 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); | 34 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); |
| 37 }; | 35 }; |
| 38 | 36 |
| 39 } // namespace content | 37 } // namespace content |
| 40 | 38 |
| 41 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ | 39 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ |
| OLD | NEW |