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

Unified Diff: mojo/shell/public/cpp/message_loop_ref.h

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_test.cc ('k') | mojo/shell/public/cpp/names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/message_loop_ref.h
diff --git a/mojo/shell/public/cpp/message_loop_ref.h b/mojo/shell/public/cpp/message_loop_ref.h
deleted file mode 100644
index f678746f3f6d410a8a86f728d0bf5bc3569cb826..0000000000000000000000000000000000000000
--- a/mojo/shell/public/cpp/message_loop_ref.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef MOJO_SHELL_PUBLIC_CPP_MESSAGE_LOOP_REF_H_
-#define MOJO_SHELL_PUBLIC_CPP_MESSAGE_LOOP_REF_H_
-
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
-#include "mojo/public/cpp/system/core.h"
-
-namespace mojo {
-
-class MessageLoopRefImpl;
-
-// An interface implementation can keep this object as a member variable to
-// hold a reference to the ShellConnection, keeping it alive as long as the
-// bound implementation exists.
-// Since interface implementations can be bound on different threads than the
-// ShellConnection, this class is safe to use on any thread. However, each
-// instance should only be used on one thread at a time (otherwise there'll be
-// races between the AddRef resulting from cloning and destruction).
-class MessageLoopRef {
- public:
- virtual ~MessageLoopRef() {}
-
- virtual scoped_ptr<MessageLoopRef> Clone() = 0;
-};
-
-class MessageLoopRefFactory {
- public:
- MessageLoopRefFactory();
- ~MessageLoopRefFactory();
-
- void set_quit_closure(const base::Closure& quit_closure) {
- quit_closure_ = quit_closure;
- }
-
- scoped_ptr<MessageLoopRef> CreateRef();
-
- private:
- friend MessageLoopRefImpl;
-
- // Called from MessageLoopRefImpl.
- void AddRef();
- void Release();
-
- base::Closure quit_closure_;
- int ref_count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(MessageLoopRefFactory);
-};
-
-} // namespace mojo
-
-#endif // MOJO_SHELL_PUBLIC_CPP_MESSAGE_LOOP_REF_H_
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_test.cc ('k') | mojo/shell/public/cpp/names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698