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

Side by Side Diff: apps/moterm/moterm_driver.cc

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
« no previous file with comments | « apps/moterm/moterm_driver.h ('k') | apps/moterm/moterm_driver_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 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 #include "apps/moterm/moterm_driver.h" 5 #include "apps/moterm/moterm_driver.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "mojo/services/files/public/interfaces/ioctl.mojom.h" 11 #include "mojo/services/files/interfaces/ioctl.mojom.h"
12 #include "mojo/services/files/public/interfaces/ioctl_terminal.mojom.h" 12 #include "mojo/services/files/interfaces/ioctl_terminal.mojom.h"
13 13
14 // Character constants: 14 // Character constants:
15 const uint8_t kEOT = 4; 15 const uint8_t kEOT = 4;
16 const uint8_t kNL = 10; 16 const uint8_t kNL = 10;
17 const uint8_t kCR = 13; 17 const uint8_t kCR = 13;
18 const uint8_t kDEL = 127; 18 const uint8_t kDEL = 127;
19 19
20 // Short forms for various counts/indices used for the get/set settings ioctls. 20 // Short forms for various counts/indices used for the get/set settings ioctls.
21 const size_t kBaseFieldCount = mojo::files::kIoctlTerminalTermiosBaseFieldCount; 21 const size_t kBaseFieldCount = mojo::files::kIoctlTerminalTermiosBaseFieldCount;
22 const size_t kTotalFieldCount = 22 const size_t kTotalFieldCount =
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 482 }
483 if (1 + kVEOFIdx < in_values.size()) { 483 if (1 + kVEOFIdx < in_values.size()) {
484 uint32_t value = in_values[1 + kVEOFIdx]; 484 uint32_t value = in_values[1 + kVEOFIdx];
485 if (value > std::numeric_limits<uint8_t>::max()) 485 if (value > std::numeric_limits<uint8_t>::max())
486 return mojo::files::Error::INVALID_ARGUMENT; 486 return mojo::files::Error::INVALID_ARGUMENT;
487 veof_ = static_cast<uint8_t>(value); 487 veof_ = static_cast<uint8_t>(value);
488 } 488 }
489 489
490 return mojo::files::Error::OK; 490 return mojo::files::Error::OK;
491 } 491 }
OLDNEW
« no previous file with comments | « apps/moterm/moterm_driver.h ('k') | apps/moterm/moterm_driver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698