2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_COMMON_COMMAND_LINE_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_COMMON_COMMAND_LINE_IMPL_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "include/cef_command_line.h"
|
|
|
|
#include "libcef/common/value_base.h"
|
|
|
|
|
|
|
|
#include "base/command_line.h"
|
|
|
|
|
|
|
|
// CefCommandLine implementation
|
2017-05-17 11:29:28 +02:00
|
|
|
class CefCommandLineImpl
|
|
|
|
: public CefValueBase<CefCommandLine, base::CommandLine> {
|
2012-04-03 03:34:16 +02:00
|
|
|
public:
|
2015-01-09 18:22:10 +01:00
|
|
|
CefCommandLineImpl(base::CommandLine* value,
|
2012-04-03 03:34:16 +02:00
|
|
|
bool will_delete,
|
|
|
|
bool read_only);
|
|
|
|
|
2021-12-06 21:40:25 +01:00
|
|
|
CefCommandLineImpl(const CefCommandLineImpl&) = delete;
|
|
|
|
CefCommandLineImpl& operator=(const CefCommandLineImpl&) = delete;
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// CefCommandLine methods.
|
2014-11-12 20:25:15 +01:00
|
|
|
bool IsValid() override;
|
|
|
|
bool IsReadOnly() override;
|
|
|
|
CefRefPtr<CefCommandLine> Copy() override;
|
|
|
|
void InitFromArgv(int argc, const char* const* argv) override;
|
|
|
|
void InitFromString(const CefString& command_line) override;
|
|
|
|
void Reset() override;
|
|
|
|
void GetArgv(std::vector<CefString>& argv) override;
|
|
|
|
CefString GetCommandLineString() override;
|
|
|
|
CefString GetProgram() override;
|
|
|
|
void SetProgram(const CefString& program) override;
|
|
|
|
bool HasSwitches() override;
|
|
|
|
bool HasSwitch(const CefString& name) override;
|
|
|
|
CefString GetSwitchValue(const CefString& name) override;
|
|
|
|
void GetSwitches(SwitchMap& switches) override;
|
|
|
|
void AppendSwitch(const CefString& name) override;
|
|
|
|
void AppendSwitchWithValue(const CefString& name,
|
|
|
|
const CefString& value) override;
|
|
|
|
bool HasArguments() override;
|
|
|
|
void GetArguments(ArgumentList& arguments) override;
|
|
|
|
void AppendArgument(const CefString& argument) override;
|
|
|
|
void PrependWrapper(const CefString& wrapper) override;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2012-06-26 18:47:05 +02:00
|
|
|
// Must hold the controller lock while using this value.
|
2015-01-09 18:22:10 +01:00
|
|
|
const base::CommandLine& command_line() { return const_value(); }
|
2012-04-03 03:34:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COMMON_COMMAND_LINE_IMPL_H_
|