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

Side by Side Diff: chrome/browser/multi_process_notification_linux.cc

Issue 6312007: Fix up notifications so that they aren't only on Browser IOThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/multi_process_notification.h" 5 #include "chrome/browser/multi_process_notification.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace multi_process_notification { 9 namespace multi_process_notification {
10 10
11 bool Post(const std::string& name, Domain domain) { 11 bool Post(const std::string& name, Domain domain) {
12 // TODO(dmaclach): Implement 12 // TODO(dmaclach): Implement
13 NOTIMPLEMENTED(); 13 NOTIMPLEMENTED();
14 return false; 14 return false;
15 } 15 }
16 16
17 class ListenerImpl { 17 class ListenerImpl {
18 public: 18 public:
19 ListenerImpl(const std::string& name, 19 ListenerImpl(const std::string& name,
20 Domain domain, 20 Domain domain,
21 Listener::Delegate* delegate); 21 Listener::Delegate* delegate);
22 22
23 bool Start(); 23 bool Start(MessageLoopForIO* loop_to_listen_on);
24 24
25 private: 25 private:
26 std::string name_; 26 std::string name_;
27 Domain domain_; 27 Domain domain_;
28 Listener::Delegate* delegate_; 28 Listener::Delegate* delegate_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(ListenerImpl); 30 DISALLOW_COPY_AND_ASSIGN(ListenerImpl);
31 }; 31 };
32 32
33 ListenerImpl::ListenerImpl(const std::string& name, 33 ListenerImpl::ListenerImpl(const std::string& name,
34 Domain domain, 34 Domain domain,
35 Listener::Delegate* delegate) 35 Listener::Delegate* delegate)
36 : name_(name), domain_(domain), delegate_(delegate) { 36 : name_(name), domain_(domain), delegate_(delegate) {
37 } 37 }
38 38
39 bool ListenerImpl::Start() { 39 bool ListenerImpl::Start(MessageLoop* io_loop_to_listen_on) {
40 // TODO(dmaclach): Implement 40 // TODO(dmaclach): Implement
41 NOTIMPLEMENTED(); 41 NOTIMPLEMENTED();
42 return false; 42 return false;
43 } 43 }
44 44
45 Listener::Listener(const std::string& name, 45 Listener::Listener(const std::string& name,
46 Domain domain, 46 Domain domain,
47 Listener::Delegate* delegate) 47 Listener::Delegate* delegate)
48 : impl_(new ListenerImpl(name, domain, delegate)) { 48 : impl_(new ListenerImpl(name, domain, delegate)) {
49 } 49 }
50 50
51 Listener::~Listener() { 51 Listener::~Listener() {
52 } 52 }
53 53
54 bool Listener::Start() { 54 bool Listener::Start(MessageLoop* io_loop_to_listen_on) {
55 return impl_->Start(); 55 return impl_->Start(io_loop_to_listen_on);
56 } 56 }
57 57
58 } // namespace multi_process_notification 58 } // namespace multi_process_notification
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698