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

Side by Side Diff: mojo/common/scoped_message_pipe.h

Issue 64973002: Moves some files into mojo/common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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_SHELL_SCOPED_MESSAGE_PIPE_H_ 5 #ifndef MOJO_COMMON_SCOPED_MESSAGE_PIPE_H_
6 #define MOJO_SHELL_SCOPED_MESSAGE_PIPE_H_ 6 #define MOJO_COMMON_SCOPED_MESSAGE_PIPE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "mojo/common/mojo_common_export.h"
9 #include "mojo/public/system/core.h" 10 #include "mojo/public/system/core.h"
10 11
11 namespace mojo { 12 namespace mojo {
12 namespace shell { 13 namespace common {
13 14
14 // Simple scoper that creates a message pipe in constructor and closes it in 15 // Simple scoper that creates a message pipe in constructor and closes it in
15 // destructor. Test for success by comparing handles with MOJO_HANDLE_INVALID. 16 // destructor. Test for success by comparing handles with MOJO_HANDLE_INVALID.
16 class ScopedMessagePipe { 17 class MOJO_COMMON_EXPORT ScopedMessagePipe {
darin (slow to review) 2013/11/07 18:41:24 This may end up being something we just want to ha
17 public: 18 public:
18 ScopedMessagePipe(); 19 ScopedMessagePipe();
19 ~ScopedMessagePipe(); 20 ~ScopedMessagePipe();
20 21
21 MojoHandle handle_0() const { return handle_0_; } 22 MojoHandle handle_0() const { return handle_0_; }
22 MojoHandle handle_1() const { return handle_1_; } 23 MojoHandle handle_1() const { return handle_1_; }
23 24
24 private: 25 private:
25 MojoHandle handle_0_; 26 MojoHandle handle_0_;
26 MojoHandle handle_1_; 27 MojoHandle handle_1_;
27 28
28 DISALLOW_COPY_AND_ASSIGN(ScopedMessagePipe); 29 DISALLOW_COPY_AND_ASSIGN(ScopedMessagePipe);
29 }; 30 };
30 31
31 } // namespace shell 32 } // namespace common
32 } // namespace mojo 33 } // namespace mojo
33 34
34 #endif // MOJO_SHELL_SCOPED_MESSAGE_PIPE_H_ 35 #endif // MOJO_COMMON_SCOPED_MESSAGE_PIPE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698