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

Unified Diff: chrome/common/multi_process_notification_linux.cc

Issue 5970015: Add multi-process notification class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/multi_process_notification_linux.cc
diff --git a/chrome/common/multi_process_notification_linux.cc b/chrome/common/multi_process_notification_linux.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9262e983b314b7c7d9bca88962b6f8d0ad75892a
--- /dev/null
+++ b/chrome/common/multi_process_notification_linux.cc
@@ -0,0 +1,52 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/multi_process_notification.h"
+
+namespace multi_process_notification {
+
+bool Post(const std::string& name) {
+ // TODO(dmaclach): Implement
+ NOTIMPLEMENTED();
Mark Mentovai 2011/01/04 18:19:33 #include "base/logging.h"
dmac 2011/01/06 06:06:03 Done.
+ return false;
+}
+
+class ListenerImpl {
+ public:
+ ListenerImpl(const std::string& name,
+ Listener::Delegate* delegate);
+ virtual ~ListenerImpl();
Mark Mentovai 2011/01/04 18:19:33 Q. Why is this virtual? A. Because Start() is vir
dmac 2011/01/06 06:06:03 Done.
+
+ virtual bool Start();
+
+ private:
+ std::string name_;
+ Listener::Delegate* delegate_;
+};
+
+ListenerImpl::ListenerImpl(const std::string& name,
+ Listener::Delegate* delegate)
+ : name_(name), delegate_(delegate) {
+}
+
+ListenerImpl::~ListenerImpl() {
+}
+
+bool ListenerImpl::Start() {
+ // TODO(dmaclach): Implement
+ NOTIMPLEMENTED();
+ return false;
+}
+
+Listener::Listener(const std::string& name, Listener::Delegate* delegate)
Mark Mentovai 2011/01/04 18:19:33 Wait a sec. This is how you’re doing your factory?
dmac 2011/01/06 06:06:03 Done.
+ : impl_(new ListenerImpl(name, delegate)) {
+}
+
+Listener::~Listener() { }
Mark Mentovai 2011/01/04 18:19:33 Put the } on its own line.
dmac 2011/01/06 06:06:03 Done.
+
+bool Listener::Start() {
+ return impl_->Start();
+}
+
+} // namespace multi_process_notification

Powered by Google App Engine
This is Rietveld 408576698