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

Side by Side Diff: chrome/browser/extensions/api/terminal/terminal_private_api.h

Issue 2579833005: chrome: Add support for custom crosh command. (Closed)
Patch Set: Created 4 years 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 Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_PRIVATE_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
(...skipping 18 matching lines...) Expand all
29 using ProcessOutputCallback = 29 using ProcessOutputCallback =
30 base::Callback<void(int terminal_id, 30 base::Callback<void(int terminal_id,
31 const std::string& output_type, 31 const std::string& output_type,
32 const std::string& output)>; 32 const std::string& output)>;
33 using OpenProcessCallback = base::Callback<void(int terminal_id)>; 33 using OpenProcessCallback = base::Callback<void(int terminal_id)>;
34 34
35 void OpenOnFileThread(const ProcessOutputCallback& output_callback, 35 void OpenOnFileThread(const ProcessOutputCallback& output_callback,
36 const OpenProcessCallback& callback); 36 const OpenProcessCallback& callback);
37 void RespondOnUIThread(int terminal_id); 37 void RespondOnUIThread(int terminal_id);
38 38
39 const char* command_; 39 std::string command_;
40 }; 40 };
41 41
42 // Send input to the terminal process specified by the terminal ID, which is set 42 // Send input to the terminal process specified by the terminal ID, which is set
43 // as an argument. 43 // as an argument.
44 class TerminalPrivateSendInputFunction : public UIThreadExtensionFunction { 44 class TerminalPrivateSendInputFunction : public UIThreadExtensionFunction {
45 public: 45 public:
46 DECLARE_EXTENSION_FUNCTION("terminalPrivate.sendInput", 46 DECLARE_EXTENSION_FUNCTION("terminalPrivate.sendInput",
47 TERMINALPRIVATE_SENDINPUT) 47 TERMINALPRIVATE_SENDINPUT)
48 48
49 protected: 49 protected:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 ExtensionFunction::ResponseAction Run() override; 101 ExtensionFunction::ResponseAction Run() override;
102 102
103 private: 103 private:
104 void AckOutputOnFileThread(int terminal_id); 104 void AckOutputOnFileThread(int terminal_id);
105 }; 105 };
106 106
107 } // namespace extensions 107 } // namespace extensions
108 108
109 #endif // CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_PRIVATE_API_H_ 109 #endif // CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698