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

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

Issue 1011643002: ServiceWorker: Introduce SWMessageSender in order to mock IPC messaging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_MESSAGE_SENDER_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_MESSAGE_SENDER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h"
10
11 namespace IPC {
12 class Message;
13 }
14
15 namespace content {
16
17 class ThreadSafeSender;
18
19 class CONTENT_EXPORT ServiceWorkerMessageSender
Kunihiko Sakamoto 2015/03/17 03:40:38 Can you add a short class comment that says this p
nhiroki 2015/03/17 07:36:53 Added. In addition, I made this class ThreadSafe
20 : public base::RefCounted<ServiceWorkerMessageSender> {
21 public:
22 explicit ServiceWorkerMessageSender(ThreadSafeSender* sender);
23
24 virtual bool Send(IPC::Message* message);
25
26 protected:
27 virtual ~ServiceWorkerMessageSender();
28
29 private:
30 friend class base::RefCounted<ServiceWorkerMessageSender>;
31
32 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
33
34 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerMessageSender);
35 };
36
37 } // namespace content
38
39 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_MESSAGE_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698