From 9accdc8b01661a0ad7b5df9b91b732dbdc1dd4b2 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 12 Dec 2012 14:43:57 +0000 Subject: [PATCH] Allow empty |client| parameter to CreateBrowser and CreateBrowserSync. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@949 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- include/cef_browser.h | 4 ++-- libcef_dll/cpptoc/browser_host_cpptoc.cc | 12 ++---------- libcef_dll/ctocpp/browser_host_ctocpp.cc | 12 ++---------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/include/cef_browser.h b/include/cef_browser.h index ea9aaafb7..7a28605d3 100644 --- a/include/cef_browser.h +++ b/include/cef_browser.h @@ -219,7 +219,7 @@ class CefBrowserHost : public virtual CefBase { // will be created on the UI thread. This method can be called on any browser // process thread and will not block. /// - /*--cef(optional_param=url)--*/ + /*--cef(optional_param=client,optional_param=url)--*/ static bool CreateBrowser(const CefWindowInfo& windowInfo, CefRefPtr client, const CefString& url, @@ -230,7 +230,7 @@ class CefBrowserHost : public virtual CefBase { // |windowInfo|. This method can only be called on the browser process UI // thread. /// - /*--cef(optional_param=url)--*/ + /*--cef(optional_param=client,optional_param=url)--*/ static CefRefPtr CreateBrowserSync( const CefWindowInfo& windowInfo, CefRefPtr client, diff --git a/libcef_dll/cpptoc/browser_host_cpptoc.cc b/libcef_dll/cpptoc/browser_host_cpptoc.cc index 06acd3cc2..d172dd783 100644 --- a/libcef_dll/cpptoc/browser_host_cpptoc.cc +++ b/libcef_dll/cpptoc/browser_host_cpptoc.cc @@ -28,15 +28,11 @@ CEF_EXPORT int cef_browser_host_create_browser( DCHECK(windowInfo); if (!windowInfo) return 0; - // Verify param: client; type: refptr_diff - DCHECK(client); - if (!client) - return 0; // Verify param: settings; type: struct_byref_const DCHECK(settings); if (!settings) return 0; - // Unverified params: url + // Unverified params: client, url // Translate param: windowInfo; type: struct_byref_const CefWindowInfo windowInfoObj; @@ -67,15 +63,11 @@ CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync( DCHECK(windowInfo); if (!windowInfo) return NULL; - // Verify param: client; type: refptr_diff - DCHECK(client); - if (!client) - return NULL; // Verify param: settings; type: struct_byref_const DCHECK(settings); if (!settings) return NULL; - // Unverified params: url + // Unverified params: client, url // Translate param: windowInfo; type: struct_byref_const CefWindowInfo windowInfoObj; diff --git a/libcef_dll/ctocpp/browser_host_ctocpp.cc b/libcef_dll/ctocpp/browser_host_ctocpp.cc index 3bac2e5b1..9de89a302 100644 --- a/libcef_dll/ctocpp/browser_host_ctocpp.cc +++ b/libcef_dll/ctocpp/browser_host_ctocpp.cc @@ -24,11 +24,7 @@ bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo, const CefBrowserSettings& settings) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return false; - // Unverified params: url + // Unverified params: client, url // Execute int _retval = cef_browser_host_create_browser( @@ -46,11 +42,7 @@ CefRefPtr CefBrowserHost::CreateBrowserSync( const CefString& url, const CefBrowserSettings& settings) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return NULL; - // Unverified params: url + // Unverified params: client, url // Execute cef_browser_t* _retval = cef_browser_host_create_browser_sync(