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

Side by Side Diff: services/native_support/redirectors.h

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SERVICES_NATIVE_SUPPORT_REDIRECTORS_H_ 5 #ifndef SERVICES_NATIVE_SUPPORT_REDIRECTORS_H_
6 #define SERVICES_NATIVE_SUPPORT_REDIRECTORS_H_ 6 #define SERVICES_NATIVE_SUPPORT_REDIRECTORS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "mojo/public/cpp/bindings/array.h" 16 #include "mojo/public/cpp/bindings/array.h"
17 #include "mojo/services/files/public/interfaces/file.mojom.h" 17 #include "mojo/services/files/interfaces/file.mojom.h"
18 #include "mojo/services/files/public/interfaces/types.mojom.h" 18 #include "mojo/services/files/interfaces/types.mojom.h"
19 19
20 namespace native_support { 20 namespace native_support {
21 21
22 // Reads from an FD (as possible without blocking) and writes the result to a 22 // Reads from an FD (as possible without blocking) and writes the result to a
23 // |mojo::files::File*|. This object must be used on an I/O thread. 23 // |mojo::files::File*|. This object must be used on an I/O thread.
24 class FDToMojoFileRedirector : public base::MessageLoopForIO::Watcher { 24 class FDToMojoFileRedirector : public base::MessageLoopForIO::Watcher {
25 public: 25 public:
26 // Both |fd| and |file| must outlive this object. 26 // Both |fd| and |file| must outlive this object.
27 FDToMojoFileRedirector(int fd, mojo::files::File* file, size_t buffer_size); 27 FDToMojoFileRedirector(int fd, mojo::files::File* file, size_t buffer_size);
28 ~FDToMojoFileRedirector() override; 28 ~FDToMojoFileRedirector() override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool read_pending_; 75 bool read_pending_;
76 76
77 base::WeakPtrFactory<MojoFileToFDRedirector> weak_factory_; 77 base::WeakPtrFactory<MojoFileToFDRedirector> weak_factory_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(MojoFileToFDRedirector); 79 DISALLOW_COPY_AND_ASSIGN(MojoFileToFDRedirector);
80 }; 80 };
81 81
82 } // namespace native_support 82 } // namespace native_support
83 83
84 #endif // SERVICES_NATIVE_SUPPORT_REDIRECTORS_H_ 84 #endif // SERVICES_NATIVE_SUPPORT_REDIRECTORS_H_
OLDNEW
« no previous file with comments | « services/native_support/process_io_redirection.h ('k') | services/python/content_handler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698