Make CEF compliant with Google/Chromium style (issue #473).

- Add a new check_style tool based on Google's cpplint that can be used to verify compliance of pending changes and specific files/directories.
- Update existing CEF source code to be compliant with the style requirements.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@463 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-01-09 23:46:23 +00:00
parent 9cc61f448b
commit 1073577d03
558 changed files with 9002 additions and 10977 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// 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.
//
@@ -17,8 +17,7 @@
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefCommandLine> CefCommandLine::CreateCommandLine()
{
CefRefPtr<CefCommandLine> CefCommandLine::CreateCommandLine() {
int build_revision = cef_build_revision();
if (build_revision != CEF_REVISION) {
// The libcef build revision does not match the CEF API revision.
@@ -38,8 +37,7 @@ CefRefPtr<CefCommandLine> CefCommandLine::CreateCommandLine()
// VIRTUAL METHODS - Body may be edited by hand.
void CefCommandLineCToCpp::InitFromArgv(int argc, const char* const* argv)
{
void CefCommandLineCToCpp::InitFromArgv(int argc, const char* const* argv) {
if (CEF_MEMBER_MISSING(struct_, init_from_argv))
return;
@@ -56,8 +54,7 @@ void CefCommandLineCToCpp::InitFromArgv(int argc, const char* const* argv)
argv);
}
void CefCommandLineCToCpp::InitFromString(const CefString& command_line)
{
void CefCommandLineCToCpp::InitFromString(const CefString& command_line) {
if (CEF_MEMBER_MISSING(struct_, init_from_string))
return;
@@ -73,8 +70,7 @@ void CefCommandLineCToCpp::InitFromString(const CefString& command_line)
command_line.GetStruct());
}
CefString CefCommandLineCToCpp::GetCommandLineString()
{
CefString CefCommandLineCToCpp::GetCommandLineString() {
if (CEF_MEMBER_MISSING(struct_, get_command_line_string))
return CefString();
@@ -89,8 +85,7 @@ CefString CefCommandLineCToCpp::GetCommandLineString()
return _retvalStr;
}
CefString CefCommandLineCToCpp::GetProgram()
{
CefString CefCommandLineCToCpp::GetProgram() {
if (CEF_MEMBER_MISSING(struct_, get_program))
return CefString();
@@ -105,8 +100,7 @@ CefString CefCommandLineCToCpp::GetProgram()
return _retvalStr;
}
void CefCommandLineCToCpp::SetProgram(const CefString& program)
{
void CefCommandLineCToCpp::SetProgram(const CefString& program) {
if (CEF_MEMBER_MISSING(struct_, set_program))
return;
@@ -122,8 +116,7 @@ void CefCommandLineCToCpp::SetProgram(const CefString& program)
program.GetStruct());
}
bool CefCommandLineCToCpp::HasSwitches()
{
bool CefCommandLineCToCpp::HasSwitches() {
if (CEF_MEMBER_MISSING(struct_, has_switches))
return false;
@@ -136,8 +129,7 @@ bool CefCommandLineCToCpp::HasSwitches()
return _retval?true:false;
}
bool CefCommandLineCToCpp::HasSwitch(const CefString& name)
{
bool CefCommandLineCToCpp::HasSwitch(const CefString& name) {
if (CEF_MEMBER_MISSING(struct_, has_switch))
return false;
@@ -156,8 +148,7 @@ bool CefCommandLineCToCpp::HasSwitch(const CefString& name)
return _retval?true:false;
}
CefString CefCommandLineCToCpp::GetSwitchValue(const CefString& name)
{
CefString CefCommandLineCToCpp::GetSwitchValue(const CefString& name) {
if (CEF_MEMBER_MISSING(struct_, get_switch_value))
return CefString();
@@ -178,8 +169,7 @@ CefString CefCommandLineCToCpp::GetSwitchValue(const CefString& name)
return _retvalStr;
}
void CefCommandLineCToCpp::GetSwitches(SwitchMap& switches)
{
void CefCommandLineCToCpp::GetSwitches(SwitchMap& switches) {
if (CEF_MEMBER_MISSING(struct_, get_switches))
return;
@@ -203,8 +193,7 @@ void CefCommandLineCToCpp::GetSwitches(SwitchMap& switches)
}
}
void CefCommandLineCToCpp::AppendSwitch(const CefString& name)
{
void CefCommandLineCToCpp::AppendSwitch(const CefString& name) {
if (CEF_MEMBER_MISSING(struct_, append_switch))
return;
@@ -221,8 +210,7 @@ void CefCommandLineCToCpp::AppendSwitch(const CefString& name)
}
void CefCommandLineCToCpp::AppendSwitchWithValue(const CefString& name,
const CefString& value)
{
const CefString& value) {
if (CEF_MEMBER_MISSING(struct_, append_switch_with_value))
return;
@@ -243,8 +231,7 @@ void CefCommandLineCToCpp::AppendSwitchWithValue(const CefString& name,
value.GetStruct());
}
bool CefCommandLineCToCpp::HasArguments()
{
bool CefCommandLineCToCpp::HasArguments() {
if (CEF_MEMBER_MISSING(struct_, has_arguments))
return false;
@@ -257,8 +244,7 @@ bool CefCommandLineCToCpp::HasArguments()
return _retval?true:false;
}
void CefCommandLineCToCpp::GetArguments(ArgumentList& arguments)
{
void CefCommandLineCToCpp::GetArguments(ArgumentList& arguments) {
if (CEF_MEMBER_MISSING(struct_, get_arguments))
return;
@@ -282,8 +268,7 @@ void CefCommandLineCToCpp::GetArguments(ArgumentList& arguments)
}
}
void CefCommandLineCToCpp::AppendArgument(const CefString& argument)
{
void CefCommandLineCToCpp::AppendArgument(const CefString& argument) {
if (CEF_MEMBER_MISSING(struct_, append_argument))
return;