mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -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.
|
||||
//
|
||||
@@ -20,8 +20,7 @@
|
||||
|
||||
bool CefBrowser::CreateBrowser(CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client, const CefString& url,
|
||||
const CefBrowserSettings& settings)
|
||||
{
|
||||
const CefBrowserSettings& settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
@@ -43,8 +42,7 @@ bool CefBrowser::CreateBrowser(CefWindowInfo& windowInfo,
|
||||
|
||||
CefRefPtr<CefBrowser> CefBrowser::CreateBrowserSync(CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client, const CefString& url,
|
||||
const CefBrowserSettings& settings)
|
||||
{
|
||||
const CefBrowserSettings& settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
@@ -67,8 +65,7 @@ CefRefPtr<CefBrowser> CefBrowser::CreateBrowserSync(CefWindowInfo& windowInfo,
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
void CefBrowserCToCpp::ParentWindowWillClose()
|
||||
{
|
||||
void CefBrowserCToCpp::ParentWindowWillClose() {
|
||||
if (CEF_MEMBER_MISSING(struct_, parent_window_will_close))
|
||||
return;
|
||||
|
||||
@@ -78,8 +75,7 @@ void CefBrowserCToCpp::ParentWindowWillClose()
|
||||
struct_->parent_window_will_close(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::CloseBrowser()
|
||||
{
|
||||
void CefBrowserCToCpp::CloseBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_browser))
|
||||
return;
|
||||
|
||||
@@ -89,8 +85,7 @@ void CefBrowserCToCpp::CloseBrowser()
|
||||
struct_->close_browser(struct_);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::CanGoBack()
|
||||
{
|
||||
bool CefBrowserCToCpp::CanGoBack() {
|
||||
if (CEF_MEMBER_MISSING(struct_, can_go_back))
|
||||
return false;
|
||||
|
||||
@@ -103,8 +98,7 @@ bool CefBrowserCToCpp::CanGoBack()
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GoBack()
|
||||
{
|
||||
void CefBrowserCToCpp::GoBack() {
|
||||
if (CEF_MEMBER_MISSING(struct_, go_back))
|
||||
return;
|
||||
|
||||
@@ -114,8 +108,7 @@ void CefBrowserCToCpp::GoBack()
|
||||
struct_->go_back(struct_);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::CanGoForward()
|
||||
{
|
||||
bool CefBrowserCToCpp::CanGoForward() {
|
||||
if (CEF_MEMBER_MISSING(struct_, can_go_forward))
|
||||
return false;
|
||||
|
||||
@@ -128,8 +121,7 @@ bool CefBrowserCToCpp::CanGoForward()
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GoForward()
|
||||
{
|
||||
void CefBrowserCToCpp::GoForward() {
|
||||
if (CEF_MEMBER_MISSING(struct_, go_forward))
|
||||
return;
|
||||
|
||||
@@ -139,8 +131,7 @@ void CefBrowserCToCpp::GoForward()
|
||||
struct_->go_forward(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::Reload()
|
||||
{
|
||||
void CefBrowserCToCpp::Reload() {
|
||||
if (CEF_MEMBER_MISSING(struct_, reload))
|
||||
return;
|
||||
|
||||
@@ -150,8 +141,7 @@ void CefBrowserCToCpp::Reload()
|
||||
struct_->reload(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::ReloadIgnoreCache()
|
||||
{
|
||||
void CefBrowserCToCpp::ReloadIgnoreCache() {
|
||||
if (CEF_MEMBER_MISSING(struct_, reload_ignore_cache))
|
||||
return;
|
||||
|
||||
@@ -161,8 +151,7 @@ void CefBrowserCToCpp::ReloadIgnoreCache()
|
||||
struct_->reload_ignore_cache(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::StopLoad()
|
||||
{
|
||||
void CefBrowserCToCpp::StopLoad() {
|
||||
if (CEF_MEMBER_MISSING(struct_, stop_load))
|
||||
return;
|
||||
|
||||
@@ -172,8 +161,7 @@ void CefBrowserCToCpp::StopLoad()
|
||||
struct_->stop_load(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SetFocus(bool enable)
|
||||
{
|
||||
void CefBrowserCToCpp::SetFocus(bool enable) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_focus))
|
||||
return;
|
||||
|
||||
@@ -184,8 +172,7 @@ void CefBrowserCToCpp::SetFocus(bool enable)
|
||||
enable);
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserCToCpp::GetWindowHandle()
|
||||
{
|
||||
CefWindowHandle CefBrowserCToCpp::GetWindowHandle() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_window_handle))
|
||||
return NULL;
|
||||
|
||||
@@ -198,8 +185,7 @@ CefWindowHandle CefBrowserCToCpp::GetWindowHandle()
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserCToCpp::GetOpenerWindowHandle()
|
||||
{
|
||||
CefWindowHandle CefBrowserCToCpp::GetOpenerWindowHandle() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_opener_window_handle))
|
||||
return NULL;
|
||||
|
||||
@@ -212,8 +198,7 @@ CefWindowHandle CefBrowserCToCpp::GetOpenerWindowHandle()
|
||||
return _retval;
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::IsPopup()
|
||||
{
|
||||
bool CefBrowserCToCpp::IsPopup() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_popup))
|
||||
return false;
|
||||
|
||||
@@ -226,8 +211,7 @@ bool CefBrowserCToCpp::IsPopup()
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::HasDocument()
|
||||
{
|
||||
bool CefBrowserCToCpp::HasDocument() {
|
||||
if (CEF_MEMBER_MISSING(struct_, has_document))
|
||||
return false;
|
||||
|
||||
@@ -240,8 +224,7 @@ bool CefBrowserCToCpp::HasDocument()
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefClient> CefBrowserCToCpp::GetClient()
|
||||
{
|
||||
CefRefPtr<CefClient> CefBrowserCToCpp::GetClient() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_client))
|
||||
return NULL;
|
||||
|
||||
@@ -254,8 +237,7 @@ CefRefPtr<CefClient> CefBrowserCToCpp::GetClient()
|
||||
return CefClientCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetMainFrame()
|
||||
{
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetMainFrame() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_main_frame))
|
||||
return NULL;
|
||||
|
||||
@@ -268,8 +250,7 @@ CefRefPtr<CefFrame> CefBrowserCToCpp::GetMainFrame()
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFocusedFrame()
|
||||
{
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFocusedFrame() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_focused_frame))
|
||||
return NULL;
|
||||
|
||||
@@ -282,8 +263,7 @@ CefRefPtr<CefFrame> CefBrowserCToCpp::GetFocusedFrame()
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFrame(const CefString& name)
|
||||
{
|
||||
CefRefPtr<CefFrame> CefBrowserCToCpp::GetFrame(const CefString& name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame))
|
||||
return NULL;
|
||||
|
||||
@@ -302,8 +282,7 @@ CefRefPtr<CefFrame> CefBrowserCToCpp::GetFrame(const CefString& name)
|
||||
return CefFrameCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::GetFrameNames(std::vector<CefString>& names)
|
||||
{
|
||||
void CefBrowserCToCpp::GetFrameNames(std::vector<CefString>& names) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_frame_names))
|
||||
return;
|
||||
|
||||
@@ -328,8 +307,7 @@ void CefBrowserCToCpp::GetFrameNames(std::vector<CefString>& names)
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::Find(int identifier, const CefString& searchText,
|
||||
bool forward, bool matchCase, bool findNext)
|
||||
{
|
||||
bool forward, bool matchCase, bool findNext) {
|
||||
if (CEF_MEMBER_MISSING(struct_, find))
|
||||
return;
|
||||
|
||||
@@ -349,8 +327,7 @@ void CefBrowserCToCpp::Find(int identifier, const CefString& searchText,
|
||||
findNext);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::StopFinding(bool clearSelection)
|
||||
{
|
||||
void CefBrowserCToCpp::StopFinding(bool clearSelection) {
|
||||
if (CEF_MEMBER_MISSING(struct_, stop_finding))
|
||||
return;
|
||||
|
||||
@@ -361,8 +338,7 @@ void CefBrowserCToCpp::StopFinding(bool clearSelection)
|
||||
clearSelection);
|
||||
}
|
||||
|
||||
double CefBrowserCToCpp::GetZoomLevel()
|
||||
{
|
||||
double CefBrowserCToCpp::GetZoomLevel() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_zoom_level))
|
||||
return 0;
|
||||
|
||||
@@ -375,8 +351,7 @@ double CefBrowserCToCpp::GetZoomLevel()
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SetZoomLevel(double zoomLevel)
|
||||
{
|
||||
void CefBrowserCToCpp::SetZoomLevel(double zoomLevel) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_zoom_level))
|
||||
return;
|
||||
|
||||
@@ -387,8 +362,7 @@ void CefBrowserCToCpp::SetZoomLevel(double zoomLevel)
|
||||
zoomLevel);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::ClearHistory()
|
||||
{
|
||||
void CefBrowserCToCpp::ClearHistory() {
|
||||
if (CEF_MEMBER_MISSING(struct_, clear_history))
|
||||
return;
|
||||
|
||||
@@ -398,8 +372,7 @@ void CefBrowserCToCpp::ClearHistory()
|
||||
struct_->clear_history(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::ShowDevTools()
|
||||
{
|
||||
void CefBrowserCToCpp::ShowDevTools() {
|
||||
if (CEF_MEMBER_MISSING(struct_, show_dev_tools))
|
||||
return;
|
||||
|
||||
@@ -409,8 +382,7 @@ void CefBrowserCToCpp::ShowDevTools()
|
||||
struct_->show_dev_tools(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::CloseDevTools()
|
||||
{
|
||||
void CefBrowserCToCpp::CloseDevTools() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_dev_tools))
|
||||
return;
|
||||
|
||||
@@ -420,8 +392,7 @@ void CefBrowserCToCpp::CloseDevTools()
|
||||
struct_->close_dev_tools(struct_);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::IsWindowRenderingDisabled()
|
||||
{
|
||||
bool CefBrowserCToCpp::IsWindowRenderingDisabled() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_window_rendering_disabled))
|
||||
return false;
|
||||
|
||||
@@ -434,8 +405,7 @@ bool CefBrowserCToCpp::IsWindowRenderingDisabled()
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::GetSize(PaintElementType type, int& width, int& height)
|
||||
{
|
||||
bool CefBrowserCToCpp::GetSize(PaintElementType type, int& width, int& height) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_size))
|
||||
return false;
|
||||
|
||||
@@ -451,8 +421,7 @@ bool CefBrowserCToCpp::GetSize(PaintElementType type, int& width, int& height)
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SetSize(PaintElementType type, int width, int height)
|
||||
{
|
||||
void CefBrowserCToCpp::SetSize(PaintElementType type, int width, int height) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_size))
|
||||
return;
|
||||
|
||||
@@ -465,8 +434,7 @@ void CefBrowserCToCpp::SetSize(PaintElementType type, int width, int height)
|
||||
height);
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::IsPopupVisible()
|
||||
{
|
||||
bool CefBrowserCToCpp::IsPopupVisible() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_popup_visible))
|
||||
return false;
|
||||
|
||||
@@ -479,8 +447,7 @@ bool CefBrowserCToCpp::IsPopupVisible()
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::HidePopup()
|
||||
{
|
||||
void CefBrowserCToCpp::HidePopup() {
|
||||
if (CEF_MEMBER_MISSING(struct_, hide_popup))
|
||||
return;
|
||||
|
||||
@@ -490,8 +457,7 @@ void CefBrowserCToCpp::HidePopup()
|
||||
struct_->hide_popup(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::Invalidate(const CefRect& dirtyRect)
|
||||
{
|
||||
void CefBrowserCToCpp::Invalidate(const CefRect& dirtyRect) {
|
||||
if (CEF_MEMBER_MISSING(struct_, invalidate))
|
||||
return;
|
||||
|
||||
@@ -503,8 +469,7 @@ void CefBrowserCToCpp::Invalidate(const CefRect& dirtyRect)
|
||||
}
|
||||
|
||||
bool CefBrowserCToCpp::GetImage(PaintElementType type, int width, int height,
|
||||
void* buffer)
|
||||
{
|
||||
void* buffer) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_image))
|
||||
return false;
|
||||
|
||||
@@ -527,8 +492,7 @@ bool CefBrowserCToCpp::GetImage(PaintElementType type, int width, int height,
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SendKeyEvent(KeyType type, int key, int modifiers,
|
||||
bool sysChar, bool imeChar)
|
||||
{
|
||||
bool sysChar, bool imeChar) {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_key_event))
|
||||
return;
|
||||
|
||||
@@ -544,8 +508,7 @@ void CefBrowserCToCpp::SendKeyEvent(KeyType type, int key, int modifiers,
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SendMouseClickEvent(int x, int y, MouseButtonType type,
|
||||
bool mouseUp, int clickCount)
|
||||
{
|
||||
bool mouseUp, int clickCount) {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_mouse_click_event))
|
||||
return;
|
||||
|
||||
@@ -560,8 +523,7 @@ void CefBrowserCToCpp::SendMouseClickEvent(int x, int y, MouseButtonType type,
|
||||
clickCount);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SendMouseMoveEvent(int x, int y, bool mouseLeave)
|
||||
{
|
||||
void CefBrowserCToCpp::SendMouseMoveEvent(int x, int y, bool mouseLeave) {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_mouse_move_event))
|
||||
return;
|
||||
|
||||
@@ -574,8 +536,7 @@ void CefBrowserCToCpp::SendMouseMoveEvent(int x, int y, bool mouseLeave)
|
||||
mouseLeave);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SendMouseWheelEvent(int x, int y, int delta)
|
||||
{
|
||||
void CefBrowserCToCpp::SendMouseWheelEvent(int x, int y, int delta) {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_mouse_wheel_event))
|
||||
return;
|
||||
|
||||
@@ -588,8 +549,7 @@ void CefBrowserCToCpp::SendMouseWheelEvent(int x, int y, int delta)
|
||||
delta);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SendFocusEvent(bool setFocus)
|
||||
{
|
||||
void CefBrowserCToCpp::SendFocusEvent(bool setFocus) {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_focus_event))
|
||||
return;
|
||||
|
||||
@@ -600,8 +560,7 @@ void CefBrowserCToCpp::SendFocusEvent(bool setFocus)
|
||||
setFocus);
|
||||
}
|
||||
|
||||
void CefBrowserCToCpp::SendCaptureLostEvent()
|
||||
{
|
||||
void CefBrowserCToCpp::SendCaptureLostEvent() {
|
||||
if (CEF_MEMBER_MISSING(struct_, send_capture_lost_event))
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user