| Index: chrome/browser/operation_output_win.h
|
| diff --git a/chrome/browser/operation_output_win.h b/chrome/browser/operation_output_win.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fe8b51dc5cae137852048374dff6d3b31bb0a6f4
|
| --- /dev/null
|
| +++ b/chrome/browser/operation_output_win.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +//
|
| +// See apps/app_host/operation_launcher.h for information on how operation
|
| +// output channels are established on Windows.
|
| +
|
| +#ifndef CHROME_BROWSER_OPERATION_OUTPUT_WIN_H_
|
| +#define CHROME_BROWSER_OPERATION_OUTPUT_WIN_H_
|
| +
|
| +#include "chrome/browser/operation_output.h"
|
| +
|
| +#include <windows.h>
|
| +#include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| +#include "base/win/scoped_handle.h"
|
| +
|
| +// Implements an OperationOutput channel on Windows, using one writable HANDLE
|
| +// each for the output and the exit code.
|
| +class OperationOutputWin : public OperationOutput {
|
| + public:
|
| + // Instantiates an OperationOutputWin. |output_pipe| and |exit_code_pipe| must
|
| + // be valid in the current process.
|
| + OperationOutputWin(base::win::ScopedHandle output_pipe,
|
| + base::win::ScopedHandle exit_code_pipe);
|
| +
|
| + // OperationOutput implementation.
|
| + virtual bool Write(const char* data, unsigned int length) OVERRIDE;
|
| +
|
| + private:
|
| + // OperationOutput implementation.
|
| + virtual bool SetExitCode(unsigned int exit_code) OVERRIDE;
|
| +
|
| + base::win::ScopedHandle output_pipe_;
|
| + base::win::ScopedHandle exit_code_pipe_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(OperationOutputWin);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_OPERATION_OUTPUT_WIN_H_
|
|
|