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

Side by Side Diff: mojo/message_pump/handle_watcher.h

Issue 2069663002: Some scoped_ptr -> std::unique_ptr conversion, especially under //mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « mojo/gles2/gles2_context.h ('k') | mojo/message_pump/handle_watcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_ 5 #ifndef MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
6 #define MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_ 6 #define MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
7 7
8 #include <memory>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/run_loop.h" 12 #include "base/run_loop.h"
12 #include "mojo/public/c/system/time.h" 13 #include "mojo/public/c/system/time.h"
13 #include "mojo/public/cpp/system/handle.h" 14 #include "mojo/public/cpp/system/handle.h"
14 15
15 namespace base { 16 namespace base {
16 class Thread; 17 class Thread;
17 } 18 }
18 19
19 namespace mojo { 20 namespace mojo {
20 namespace common { 21 namespace common {
(...skipping 24 matching lines...) Expand all
45 46
46 // Stops listening. Does nothing if not in the process of listening. Blocks 47 // Stops listening. Does nothing if not in the process of listening. Blocks
47 // until no longer listening on the handle. 48 // until no longer listening on the handle.
48 void Stop(); 49 void Stop();
49 50
50 private: 51 private:
51 class StateBase; 52 class StateBase;
52 class SameThreadWatchingState; 53 class SameThreadWatchingState;
53 class SecondaryThreadWatchingState; 54 class SecondaryThreadWatchingState;
54 55
55 // If non-NULL Start() has been invoked. 56 // If non-null, Start() has been invoked.
56 scoped_ptr<StateBase> state_; 57 std::unique_ptr<StateBase> state_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(HandleWatcher); 59 DISALLOW_COPY_AND_ASSIGN(HandleWatcher);
59 }; 60 };
60 61
61 } // namespace common 62 } // namespace common
62 } // namespace mojo 63 } // namespace mojo
63 64
64 #endif // MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_ 65 #endif // MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
OLDNEW
« no previous file with comments | « mojo/gles2/gles2_context.h ('k') | mojo/message_pump/handle_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698