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

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: Added name and domain accessors to Listener interface 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(MessageLoop* io_loop_to_listen_on);
24
25 std::string name() const { return name_; }
26 Domain domain() const { return domain_; }
24 27
25 private: 28 private:
26 std::string name_; 29 std::string name_;
27 Domain domain_; 30 Domain domain_;
28 Listener::Delegate* delegate_; 31 Listener::Delegate* delegate_;
29 32
30 DISALLOW_COPY_AND_ASSIGN(ListenerImpl); 33 DISALLOW_COPY_AND_ASSIGN(ListenerImpl);
31 }; 34 };
32 35
33 ListenerImpl::ListenerImpl(const std::string& name, 36 ListenerImpl::ListenerImpl(const std::string& name,
34 Domain domain, 37 Domain domain,
35 Listener::Delegate* delegate) 38 Listener::Delegate* delegate)
36 : name_(name), domain_(domain), delegate_(delegate) { 39 : name_(name), domain_(domain), delegate_(delegate) {
37 } 40 }
38 41
39 bool ListenerImpl::Start() { 42 bool ListenerImpl::Start(MessageLoop* io_loop_to_listen_on) {
40 // TODO(dmaclach): Implement 43 // TODO(dmaclach): Implement
41 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
42 return false; 45 return false;
43 } 46 }
44 47
45 Listener::Listener(const std::string& name, 48 Listener::Listener(const std::string& name,
46 Domain domain, 49 Domain domain,
47 Listener::Delegate* delegate) 50 Listener::Delegate* delegate)
48 : impl_(new ListenerImpl(name, domain, delegate)) { 51 : impl_(new ListenerImpl(name, domain, delegate)) {
49 } 52 }
50 53
51 Listener::~Listener() { 54 Listener::~Listener() {
52 } 55 }
53 56
54 bool Listener::Start() { 57 bool Listener::Start(MessageLoop* io_loop_to_listen_on) {
55 return impl_->Start(); 58 return impl_->Start(io_loop_to_listen_on);
59 }
60
61 std::string Listener::name() const {
62 return impl_->name();
63 }
64
65 Domain Listener::domain() const {
66 return impl_->domain();
56 } 67 }
57 68
58 } // namespace multi_process_notification 69 } // namespace multi_process_notification
OLDNEW
« no previous file with comments | « chrome/browser/multi_process_notification.h ('k') | chrome/browser/multi_process_notification_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698