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<CefXmlReader> CefXmlReader::Create(CefRefPtr<CefStreamReader> stream,
EncodingType encodingType, const CefString& URI)
{
EncodingType encodingType, const CefString& URI) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: stream; type: refptr_same
@@ -43,8 +42,7 @@ CefRefPtr<CefXmlReader> CefXmlReader::Create(CefRefPtr<CefStreamReader> stream,
// VIRTUAL METHODS - Body may be edited by hand.
bool CefXmlReaderCToCpp::MoveToNextNode()
{
bool CefXmlReaderCToCpp::MoveToNextNode() {
if (CEF_MEMBER_MISSING(struct_, move_to_next_node))
return false;
@@ -57,8 +55,7 @@ bool CefXmlReaderCToCpp::MoveToNextNode()
return _retval?true:false;
}
bool CefXmlReaderCToCpp::Close()
{
bool CefXmlReaderCToCpp::Close() {
if (CEF_MEMBER_MISSING(struct_, close))
return false;
@@ -71,8 +68,7 @@ bool CefXmlReaderCToCpp::Close()
return _retval?true:false;
}
bool CefXmlReaderCToCpp::HasError()
{
bool CefXmlReaderCToCpp::HasError() {
if (CEF_MEMBER_MISSING(struct_, has_error))
return false;
@@ -85,8 +81,7 @@ bool CefXmlReaderCToCpp::HasError()
return _retval?true:false;
}
CefString CefXmlReaderCToCpp::GetError()
{
CefString CefXmlReaderCToCpp::GetError() {
if (CEF_MEMBER_MISSING(struct_, get_error))
return CefString();
@@ -101,8 +96,7 @@ CefString CefXmlReaderCToCpp::GetError()
return _retvalStr;
}
CefXmlReader::NodeType CefXmlReaderCToCpp::GetType()
{
CefXmlReader::NodeType CefXmlReaderCToCpp::GetType() {
if (CEF_MEMBER_MISSING(struct_, get_type))
return XML_NODE_UNSUPPORTED;
@@ -115,8 +109,7 @@ CefXmlReader::NodeType CefXmlReaderCToCpp::GetType()
return _retval;
}
int CefXmlReaderCToCpp::GetDepth()
{
int CefXmlReaderCToCpp::GetDepth() {
if (CEF_MEMBER_MISSING(struct_, get_depth))
return 0;
@@ -129,8 +122,7 @@ int CefXmlReaderCToCpp::GetDepth()
return _retval;
}
CefString CefXmlReaderCToCpp::GetLocalName()
{
CefString CefXmlReaderCToCpp::GetLocalName() {
if (CEF_MEMBER_MISSING(struct_, get_local_name))
return CefString();
@@ -145,8 +137,7 @@ CefString CefXmlReaderCToCpp::GetLocalName()
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetPrefix()
{
CefString CefXmlReaderCToCpp::GetPrefix() {
if (CEF_MEMBER_MISSING(struct_, get_prefix))
return CefString();
@@ -161,8 +152,7 @@ CefString CefXmlReaderCToCpp::GetPrefix()
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetQualifiedName()
{
CefString CefXmlReaderCToCpp::GetQualifiedName() {
if (CEF_MEMBER_MISSING(struct_, get_qualified_name))
return CefString();
@@ -177,8 +167,7 @@ CefString CefXmlReaderCToCpp::GetQualifiedName()
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetNamespaceURI()
{
CefString CefXmlReaderCToCpp::GetNamespaceURI() {
if (CEF_MEMBER_MISSING(struct_, get_namespace_uri))
return CefString();
@@ -193,8 +182,7 @@ CefString CefXmlReaderCToCpp::GetNamespaceURI()
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetBaseURI()
{
CefString CefXmlReaderCToCpp::GetBaseURI() {
if (CEF_MEMBER_MISSING(struct_, get_base_uri))
return CefString();
@@ -209,8 +197,7 @@ CefString CefXmlReaderCToCpp::GetBaseURI()
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetXmlLang()
{
CefString CefXmlReaderCToCpp::GetXmlLang() {
if (CEF_MEMBER_MISSING(struct_, get_xml_lang))
return CefString();
@@ -225,8 +212,7 @@ CefString CefXmlReaderCToCpp::GetXmlLang()
return _retvalStr;
}
bool CefXmlReaderCToCpp::IsEmptyElement()
{
bool CefXmlReaderCToCpp::IsEmptyElement() {
if (CEF_MEMBER_MISSING(struct_, is_empty_element))
return false;
@@ -239,8 +225,7 @@ bool CefXmlReaderCToCpp::IsEmptyElement()
return _retval?true:false;
}
bool CefXmlReaderCToCpp::HasValue()
{
bool CefXmlReaderCToCpp::HasValue() {
if (CEF_MEMBER_MISSING(struct_, has_value))
return false;
@@ -253,8 +238,7 @@ bool CefXmlReaderCToCpp::HasValue()
return _retval?true:false;
}
CefString CefXmlReaderCToCpp::GetValue()
{
CefString CefXmlReaderCToCpp::GetValue() {
if (CEF_MEMBER_MISSING(struct_, get_value))
return CefString();
@@ -269,8 +253,7 @@ CefString CefXmlReaderCToCpp::GetValue()
return _retvalStr;
}
bool CefXmlReaderCToCpp::HasAttributes()
{
bool CefXmlReaderCToCpp::HasAttributes() {
if (CEF_MEMBER_MISSING(struct_, has_attributes))
return false;
@@ -283,8 +266,7 @@ bool CefXmlReaderCToCpp::HasAttributes()
return _retval?true:false;
}
size_t CefXmlReaderCToCpp::GetAttributeCount()
{
size_t CefXmlReaderCToCpp::GetAttributeCount() {
if (CEF_MEMBER_MISSING(struct_, get_attribute_count))
return 0;
@@ -297,15 +279,14 @@ size_t CefXmlReaderCToCpp::GetAttributeCount()
return _retval;
}
CefString CefXmlReaderCToCpp::GetAttribute(int index)
{
CefString CefXmlReaderCToCpp::GetAttribute(int index) {
if (CEF_MEMBER_MISSING(struct_, get_attribute_byindex))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
DCHECK_GE(index, 0);
if (index < 0)
return CefString();
@@ -319,8 +300,7 @@ CefString CefXmlReaderCToCpp::GetAttribute(int index)
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetAttribute(const CefString& qualifiedName)
{
CefString CefXmlReaderCToCpp::GetAttribute(const CefString& qualifiedName) {
if (CEF_MEMBER_MISSING(struct_, get_attribute_byqname))
return CefString();
@@ -342,8 +322,7 @@ CefString CefXmlReaderCToCpp::GetAttribute(const CefString& qualifiedName)
}
CefString CefXmlReaderCToCpp::GetAttribute(const CefString& localName,
const CefString& namespaceURI)
{
const CefString& namespaceURI) {
if (CEF_MEMBER_MISSING(struct_, get_attribute_bylname))
return CefString();
@@ -369,8 +348,7 @@ CefString CefXmlReaderCToCpp::GetAttribute(const CefString& localName,
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetInnerXml()
{
CefString CefXmlReaderCToCpp::GetInnerXml() {
if (CEF_MEMBER_MISSING(struct_, get_inner_xml))
return CefString();
@@ -385,8 +363,7 @@ CefString CefXmlReaderCToCpp::GetInnerXml()
return _retvalStr;
}
CefString CefXmlReaderCToCpp::GetOuterXml()
{
CefString CefXmlReaderCToCpp::GetOuterXml() {
if (CEF_MEMBER_MISSING(struct_, get_outer_xml))
return CefString();
@@ -401,8 +378,7 @@ CefString CefXmlReaderCToCpp::GetOuterXml()
return _retvalStr;
}
int CefXmlReaderCToCpp::GetLineNumber()
{
int CefXmlReaderCToCpp::GetLineNumber() {
if (CEF_MEMBER_MISSING(struct_, get_line_number))
return 0;
@@ -415,15 +391,14 @@ int CefXmlReaderCToCpp::GetLineNumber()
return _retval;
}
bool CefXmlReaderCToCpp::MoveToAttribute(int index)
{
bool CefXmlReaderCToCpp::MoveToAttribute(int index) {
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byindex))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
DCHECK_GE(index, 0);
if (index < 0)
return false;
@@ -435,8 +410,7 @@ bool CefXmlReaderCToCpp::MoveToAttribute(int index)
return _retval?true:false;
}
bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& qualifiedName)
{
bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& qualifiedName) {
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byqname))
return false;
@@ -456,8 +430,7 @@ bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& qualifiedName)
}
bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& localName,
const CefString& namespaceURI)
{
const CefString& namespaceURI) {
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_bylname))
return false;
@@ -481,8 +454,7 @@ bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& localName,
return _retval?true:false;
}
bool CefXmlReaderCToCpp::MoveToFirstAttribute()
{
bool CefXmlReaderCToCpp::MoveToFirstAttribute() {
if (CEF_MEMBER_MISSING(struct_, move_to_first_attribute))
return false;
@@ -495,8 +467,7 @@ bool CefXmlReaderCToCpp::MoveToFirstAttribute()
return _retval?true:false;
}
bool CefXmlReaderCToCpp::MoveToNextAttribute()
{
bool CefXmlReaderCToCpp::MoveToNextAttribute() {
if (CEF_MEMBER_MISSING(struct_, move_to_next_attribute))
return false;
@@ -509,8 +480,7 @@ bool CefXmlReaderCToCpp::MoveToNextAttribute()
return _retval?true:false;
}
bool CefXmlReaderCToCpp::MoveToCarryingElement()
{
bool CefXmlReaderCToCpp::MoveToCarryingElement() {
if (CEF_MEMBER_MISSING(struct_, move_to_carrying_element))
return false;