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

Side by Side Diff: mojo/public/cpp/bindings/lib/connector.cc

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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/public/cpp/bindings/lib/connector.h" 5 #include "mojo/public/cpp/bindings/lib/connector.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
14 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
15 #include "mojo/public/cpp/bindings/lib/sync_handle_watcher.h" 16 #include "mojo/public/cpp/bindings/lib/sync_handle_watcher.h"
16 17
17 namespace mojo { 18 namespace mojo {
18 namespace internal { 19 namespace internal {
19 20
20 namespace { 21 namespace {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (sync_watcher_) 355 if (sync_watcher_)
355 return; 356 return;
356 sync_watcher_.reset(new SyncHandleWatcher( 357 sync_watcher_.reset(new SyncHandleWatcher(
357 message_pipe_.get(), MOJO_HANDLE_SIGNAL_READABLE, 358 message_pipe_.get(), MOJO_HANDLE_SIGNAL_READABLE,
358 base::Bind(&Connector::OnSyncHandleWatcherHandleReady, 359 base::Bind(&Connector::OnSyncHandleWatcherHandleReady,
359 base::Unretained(this)))); 360 base::Unretained(this))));
360 } 361 }
361 362
362 } // namespace internal 363 } // namespace internal
363 } // namespace mojo 364 } // namespace mojo
OLDNEW
« no previous file with comments | « content/renderer/usb/web_usb_client_impl.cc ('k') | mojo/public/cpp/bindings/lib/sync_handle_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698