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

Side by Side Diff: mojo/public/cpp/bindings/lib/sync_handle_watcher.h

Issue 1900953002: Mojo C++ bindings: make SyncHandleRegistry a ref-counted object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_HANDLE_WATCHER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_HANDLE_WATCHER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_HANDLE_WATCHER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_HANDLE_WATCHER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 const Handle handle_; 55 const Handle handle_;
56 const MojoHandleSignals handle_signals_; 56 const MojoHandleSignals handle_signals_;
57 SyncHandleRegistry::HandleCallback callback_; 57 SyncHandleRegistry::HandleCallback callback_;
58 58
59 // Whether |handle_| has been registered with SyncHandleRegistry. 59 // Whether |handle_| has been registered with SyncHandleRegistry.
60 bool registered_; 60 bool registered_;
61 // If non-zero, |handle_| should be registered with SyncHandleRegistry. 61 // If non-zero, |handle_| should be registered with SyncHandleRegistry.
62 size_t register_request_count_; 62 size_t register_request_count_;
63 63
64 scoped_refptr<SyncHandleRegistry> registry_;
65
64 scoped_refptr<base::RefCountedData<bool>> destroyed_; 66 scoped_refptr<base::RefCountedData<bool>> destroyed_;
65 67
66 base::ThreadChecker thread_checker_; 68 base::ThreadChecker thread_checker_;
67 69
68 DISALLOW_COPY_AND_ASSIGN(SyncHandleWatcher); 70 DISALLOW_COPY_AND_ASSIGN(SyncHandleWatcher);
69 }; 71 };
70 72
71 } // namespace internal 73 } // namespace internal
72 } // namespace mojo 74 } // namespace mojo
73 75
74 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_HANDLE_WATCHER_H_ 76 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_HANDLE_WATCHER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/sync_handle_registry.cc ('k') | mojo/public/cpp/bindings/lib/sync_handle_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698