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

Side by Side Diff: runtime/bin/platform.h

Issue 2739683005: [dart:io] Adds Platform.ansiSupported (Closed)
Patch Set: Created 3 years, 9 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_BIN_PLATFORM_H_ 5 #ifndef RUNTIME_BIN_PLATFORM_H_
6 #define RUNTIME_BIN_PLATFORM_H_ 6 #define RUNTIME_BIN_PLATFORM_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 // Stores and gets the flags passed to the executable. 78 // Stores and gets the flags passed to the executable.
79 static void SetExecutableArguments(int script_index, char** argv) { 79 static void SetExecutableArguments(int script_index, char** argv) {
80 script_index_ = script_index; 80 script_index_ = script_index;
81 argv_ = argv; 81 argv_ = argv;
82 } 82 }
83 static int GetScriptIndex() { return script_index_; } 83 static int GetScriptIndex() { return script_index_; }
84 static char** GetArgv() { return argv_; } 84 static char** GetArgv() { return argv_; }
85 85
86 static bool AnsiSupported();
87
86 static DART_NORETURN void Exit(int exit_code); 88 static DART_NORETURN void Exit(int exit_code);
87 89
88 private: 90 private:
89 // The path to the executable. 91 // The path to the executable.
90 static const char* executable_name_; 92 static const char* executable_name_;
91 // The path to the resolved executable. 93 // The path to the resolved executable.
92 static char* resolved_executable_name_; 94 static char* resolved_executable_name_;
93 95
94 static int script_index_; 96 static int script_index_;
95 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] 97 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1]
96 98
97 DISALLOW_ALLOCATION(); 99 DISALLOW_ALLOCATION();
98 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); 100 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform);
99 }; 101 };
100 102
101 } // namespace bin 103 } // namespace bin
102 } // namespace dart 104 } // namespace dart
103 105
104 #endif // RUNTIME_BIN_PLATFORM_H_ 106 #endif // RUNTIME_BIN_PLATFORM_H_
OLDNEW
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/platform.cc » ('j') | runtime/bin/platform.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698