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

Side by Side Diff: device/serial/serial_io_handler_win.h

Issue 646053002: Implement permission_broker for serial devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix device_unittests. Created 6 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
« no previous file with comments | « device/serial/serial_io_handler_posix.cc ('k') | device/serial/serial_io_handler_win.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ 5 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_
6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ 6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "device/serial/serial_io_handler.h" 10 #include "device/serial/serial_io_handler.h"
(...skipping 13 matching lines...) Expand all
24 virtual bool SetControlSignals( 24 virtual bool SetControlSignals(
25 const serial::HostControlSignals& control_signals) override; 25 const serial::HostControlSignals& control_signals) override;
26 virtual bool ConfigurePort(const serial::ConnectionOptions& options) override; 26 virtual bool ConfigurePort(const serial::ConnectionOptions& options) override;
27 virtual serial::ConnectionInfoPtr GetPortInfo() const override; 27 virtual serial::ConnectionInfoPtr GetPortInfo() const override;
28 virtual bool PostOpen() override; 28 virtual bool PostOpen() override;
29 29
30 private: 30 private:
31 friend class SerialIoHandler; 31 friend class SerialIoHandler;
32 32
33 explicit SerialIoHandlerWin( 33 explicit SerialIoHandlerWin(
34 scoped_refptr<base::MessageLoopProxy> file_thread_message_loop); 34 scoped_refptr<base::MessageLoopProxy> file_thread_message_loop,
35 scoped_refptr<base::MessageLoopProxy> ui_thread_message_loop);
35 virtual ~SerialIoHandlerWin(); 36 virtual ~SerialIoHandlerWin();
36 37
37 // base::MessageLoopForIO::IOHandler implementation. 38 // base::MessageLoopForIO::IOHandler implementation.
38 virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context, 39 virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context,
39 DWORD bytes_transfered, 40 DWORD bytes_transfered,
40 DWORD error) override; 41 DWORD error) override;
41 42
42 // Context used for asynchronous WaitCommEvent calls. 43 // Context used for asynchronous WaitCommEvent calls.
43 scoped_ptr<base::MessageLoopForIO::IOContext> comm_context_; 44 scoped_ptr<base::MessageLoopForIO::IOContext> comm_context_;
44 45
(...skipping 10 matching lines...) Expand all
55 // WaitCommEvent, as opposed to waiting on actual ReadFile completion 56 // WaitCommEvent, as opposed to waiting on actual ReadFile completion
56 // after a corresponding WaitCommEvent has completed. 57 // after a corresponding WaitCommEvent has completed.
57 bool is_comm_pending_; 58 bool is_comm_pending_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerWin); 60 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerWin);
60 }; 61 };
61 62
62 } // namespace device 63 } // namespace device
63 64
64 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ 65 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_
OLDNEW
« no previous file with comments | « device/serial/serial_io_handler_posix.cc ('k') | device/serial/serial_io_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698