Merge revision 434 and 436 changes:

- Make the |url| parameter to OnBeforePopup() optional.
- Include CEF and Chromium version information in binary distributions (issue #325).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@437 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-12-21 19:25:38 +00:00
parent 5bd72a4688
commit 11edadd02c
7 changed files with 61 additions and 32 deletions

View File

@ -1142,7 +1142,7 @@ public:
// modify the object that |client| points to. To change the settings for the
// new window modify the |settings| structure.
///
/*--cef()--*/
/*--cef(optional_param=url)--*/
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo,

View File

@ -40,10 +40,6 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
DCHECK(windowInfo);
if (!windowInfo)
return 0;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return 0;
// Verify param: client; type: refptr_same_byref
DCHECK(client);
if (!client)
@ -52,6 +48,7 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
DCHECK(settings);
if (!settings)
return 0;
// Unverified params: url
// Translate param: popupFeatures; type: struct_byref_const
CefPopupFeatures popupFeaturesObj;

View File

@ -31,10 +31,7 @@ bool CefLifeSpanHandlerCToCpp::OnBeforePopup(
DCHECK(parentBrowser.get());
if (!parentBrowser.get())
return false;
// Verify param: url; type: string_byref_const
DCHECK(!url.empty());
if (url.empty())
return false;
// Unverified params: url
// Translate param: client; type: refptr_same_byref
cef_client_t* clientStruct = NULL;

View File

@ -1,10 +1,15 @@
Chromium Embedded Framework (CEF) Binary Distribution
-------------------------------------------------------------------------------
CEF Revision: $CEF_REV$
Chromium Revision: $CHROMIUM_REV$
Date: $DATE$
CEF Version: $CEF_VER$
CEF URL: $CEF_URL$@$CEF_REV$
Chromium Verison: $CHROMIUM_VER$
Chromium URL: $CHROMIUM_URL$@$CHROMIUM_REV$
This distribution contains all components necessary to build and distribute an
application using CEF. Please see the LICENSING section of this document for
licensing terms and conditions.

View File

@ -1,10 +1,15 @@
Chromium Embedded Framework (CEF) Binary Distribution
-------------------------------------------------------------------------------
CEF Revision: $CEF_REV$
Chromium Revision: $CHROMIUM_REV$
Date: $DATE$
CEF Version: $CEF_VER$
CEF URL: $CEF_URL$@$CEF_REV$
Chromium Verison: $CHROMIUM_VER$
Chromium URL: $CHROMIUM_URL$@$CHROMIUM_REV$
This distribution contains all components necessary to build and distribute an
application using CEF. Please see the LICENSING section of this document for
licensing terms and conditions.

View File

@ -1,10 +1,15 @@
Chromium Embedded Framework (CEF) Binary Distribution
-------------------------------------------------------------------------------
CEF Revision: $CEF_REV$
Chromium Revision: $CHROMIUM_REV$
Date: $DATE$
CEF Version: $CEF_VER$
CEF URL: $CEF_URL$@$CEF_REV$
Chromium Verison: $CHROMIUM_VER$
Chromium URL: $CHROMIUM_URL$@$CHROMIUM_REV$
This distribution contains all components necessary to build and distribute an
application using CEF. Please see the LICENSING section of this document for
licensing terms and conditions.

View File

@ -28,11 +28,16 @@ def create_archive(input_dir, zip_file):
addDir(input_dir)
zf.close()
def create_readme(src, output_dir, cef_rev, chromium_rev, date):
def create_readme(src, output_dir, cef_url, cef_rev, cef_ver, chromium_url, \
chromium_rev, chromium_ver, date):
""" Creates the README.TXT file. """
data = read_file(src)
data = data.replace('$CEF_URL$', cef_url)
data = data.replace('$CEF_REV$', cef_rev)
data = data.replace('$CEF_VER$', cef_ver)
data = data.replace('$CHROMIUM_URL$', chromium_url)
data = data.replace('$CHROMIUM_REV$', chromium_rev)
data = data.replace('$CHROMIUM_VER$', chromium_ver)
data = data.replace('$DATE$', date)
write_file(os.path.join(output_dir, 'README.txt'), data)
if not options.quiet:
@ -145,17 +150,32 @@ if options.outputdir is None:
parser.print_help(sys.stdout)
sys.exit()
# retrieve revision and date information
cef_rev = get_revision()
chromium_rev = get_revision('../../')
date = get_date()
# script directory
script_dir = os.path.dirname(__file__)
# CEF root directory
cef_dir = os.path.abspath(os.path.join(script_dir, os.pardir))
# retrieve url, revision and date information
cef_info = get_svn_info(cef_dir)
cef_url = cef_info['url']
cef_rev = cef_info['revision']
chromium_info = get_svn_info(os.path.join(cef_dir, os.pardir))
chromium_url = chromium_info['url']
chromium_rev = chromium_info['revision']
date = get_date()
# Read and parse the version file (key=value pairs, one per line)
chrome = {}
lines = read_file(os.path.join(cef_dir, '../chrome/VERSION')).split("\n")
for line in lines:
parts = line.split('=', 1)
if len(parts) == 2:
chrome[parts[0]] = parts[1]
cef_ver = '1.'+chrome['BUILD']+'.'+cef_rev
chromium_ver = chrome['MAJOR']+'.'+chrome['MINOR']+'.'+chrome['BUILD']+'.'+chrome['PATCH']
# Test the operating system.
platform = '';
if sys.platform == 'win32':
@ -167,13 +187,13 @@ elif sys.platform.startswith('linux'):
# output directory
output_dir = os.path.abspath(os.path.join(options.outputdir, \
'cef_binary_r'+cef_rev+'_'+platform))
'cef_binary_'+cef_ver+'_'+platform))
remove_dir(output_dir, options.quiet)
make_dir(output_dir, options.quiet)
# symbol directory
symbol_dir = os.path.abspath(os.path.join(options.outputdir, \
'cef_binary_r'+cef_rev+'_'+platform+'_symbols'))
'cef_binary_'+cef_ver+'_'+platform+'_symbols'))
remove_dir(symbol_dir, options.quiet)
make_dir(symbol_dir, options.quiet)
@ -221,8 +241,8 @@ transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/transfer.c
if platform == 'windows':
# create the README.TXT file
create_readme(os.path.join(script_dir, 'distrib/win/README.txt'), output_dir, cef_rev, \
chromium_rev, date)
create_readme(os.path.join(script_dir, 'distrib/win/README.txt'), output_dir, cef_url, \
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
# transfer include files
transfer_gypi_files(cef_dir, cef_paths['includes_win'], \
@ -292,8 +312,8 @@ if platform == 'windows':
elif platform == 'macosx':
# create the README.TXT file
create_readme(os.path.join(script_dir, 'distrib/mac/README.txt'), output_dir, cef_rev, \
chromium_rev, date)
create_readme(os.path.join(script_dir, 'distrib/mac/README.txt'), output_dir, cef_url, \
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
# transfer include files
transfer_gypi_files(cef_dir, cef_paths['includes_mac'], \
@ -355,8 +375,8 @@ elif platform == 'linux':
linux_build_dir = os.path.join(cef_dir, os.pardir, 'out')
# create the README.TXT file
create_readme(os.path.join(script_dir, 'distrib/linux/README.txt'), output_dir, cef_rev, \
chromium_rev, date)
create_readme(os.path.join(script_dir, 'distrib/linux/README.txt'), output_dir, cef_url, \
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
# transfer build/Debug files
if not options.allowpartial or path_exists(os.path.join(linux_build_dir, 'Debug')):