mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-21 14:40:49 +01:00
Remove the CEF1 trunk folder. Any future development will be in the 1453 branch.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1454 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
40892d9067
commit
52d374bc9a
@ -1,27 +0,0 @@
|
||||
# This file is an addendum to the Chromium AUTHORS file.
|
||||
# Names should be added to this file like so:
|
||||
# Name or Organization <email address>
|
||||
|
||||
Marshall Greenblatt <magreenblatt@gmail.com>
|
||||
Jamie Kirkpatrick <jkp@spotify.com>
|
||||
Johan Lindström <johanl@spotify.com>
|
||||
Igor Pavlov <igor.arabesc.pavlov@gmail.com>
|
||||
Yanko Yankov <yyankov@gmail.com>
|
||||
Emerick Rogul <emerick@gmail.com>
|
||||
Valve Corporation <mac@valvesoftware.com>
|
||||
Anthony Taranto <anthony.taranto@gmail.com>
|
||||
Joe Andrieu <joe@joeandrieu.com>
|
||||
Keith Poole <platima@gmail.com>
|
||||
Aviv Rind <avivrind@gmail.com>
|
||||
Michael Kaminski <mikeyk730@gmail.com>
|
||||
ADInstruments Ltd. <dev.team@adinstruments.com>
|
||||
Gus Verdun <gusverdun@gmail.com>
|
||||
Joinerysoft Ltd. <cpinfold@joinerysoft.com>
|
||||
Johan Björk <phb@spotify.com>
|
||||
Dmitry Azaraev <dmitry.azaraev@gmail.com>
|
||||
David Xue <ddxue27@gmail.com>
|
||||
Russell (Rusty) Richards <fe3o4y@gmail.com>
|
||||
Brian Power <powerbf.it@gmail.com>
|
||||
Corey Lucier <clucier@adobe.com>
|
||||
Mihai Tica <mitica@adobe.com>
|
||||
Czarek Tomczak <czarek.tomczak@gmail.com>
|
@ -1,21 +0,0 @@
|
||||
# The Chromium Embedded Framework (CEF) project is built on top of the Chromium
|
||||
# project source tree. Chromium should be updated to the URL and revision listed
|
||||
# below before building CEF. Chromium compatibility information for older CEF
|
||||
# revisions is available by viewing this file's change history.
|
||||
#
|
||||
# To configure a specific Chromium URL:
|
||||
# gclient config chromium_url
|
||||
#
|
||||
# To update to a specific Chromium revision:
|
||||
# gclient sync --revision src@chromium_revision --jobs 8 --force
|
||||
#
|
||||
# This file is integrated with the CEF Automation Tool. See the
|
||||
# tools/automate/automate.README.txt file for more information.
|
||||
#
|
||||
# For general gclient usage information visit:
|
||||
# http://dev.chromium.org/developers/how-tos/get-the-code
|
||||
|
||||
{
|
||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||
'chromium_revision': '194165',
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
hooks = [
|
||||
{
|
||||
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
|
||||
"pattern": ".",
|
||||
"action": ["python", "src/cef/tools/gclient_hook.py"],
|
||||
},
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
// Copyright (c) 2008-2013 Marshall A. Greenblatt. Portions Copyright (c)
|
||||
// 2006-2009 Google Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1 +0,0 @@
|
||||
CEF_MAJOR=1
|
861
cef1/cef.gyp
861
cef1/cef.gyp
@ -1,861 +0,0 @@
|
||||
# Copyright (c) 2011 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.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'pkg-config': 'pkg-config',
|
||||
'chromium_code': 1,
|
||||
'repack_locales_cmd': ['python', 'tools/repack_locales.py'],
|
||||
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef',
|
||||
'revision': '<!(python tools/revision.py)',
|
||||
# Need to be creative to match dylib version formatting requirements.
|
||||
'version_mac_dylib':
|
||||
'<!(python ../chrome/tools/build/version.py -f ../chrome/VERSION -t "1<(revision).@BUILD_HI@.@BUILD_LO@" -e "BUILD_HI=int(BUILD)/256" -e "BUILD_LO=int(BUILD)%256")',
|
||||
},
|
||||
'conditions': [
|
||||
[ 'os_posix==1 and OS!="mac" and OS!="android" and gcc_version>=46', {
|
||||
'target_defaults': {
|
||||
# Disable warnings about c++0x compatibility, as some names (such
|
||||
# as nullptr) conflict with upcoming c++0x types.
|
||||
'cflags_cc': ['-Wno-c++0x-compat'],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'includes': [
|
||||
# Bring in the source file lists.
|
||||
'cef_paths2.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'cefclient',
|
||||
'type': 'executable',
|
||||
'mac_bundle': 1,
|
||||
'msvs_guid': '6617FED9-C5D4-4907-BF55-A90062A6683F',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
|
||||
'libcef',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
# cefclient includes are relative to the tests directory to make
|
||||
# creation of binary releases easier.
|
||||
'tests'
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(cefclient_sources_common)',
|
||||
],
|
||||
'mac_bundle_resources': [
|
||||
'<@(cefclient_bundle_resources_mac)',
|
||||
'<(grit_out_dir)/devtools_resources.pak',
|
||||
],
|
||||
'mac_bundle_resources!': [
|
||||
# TODO(mark): Come up with a fancier way to do this (mac_info_plist?)
|
||||
# that automatically sets the correct INFOPLIST_FILE setting and adds
|
||||
# the file to a source group.
|
||||
'tests/cefclient/mac/Info.plist',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'tests/cefclient/mac/Info.plist',
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'variables': {
|
||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'repack_locales',
|
||||
'inputs': [
|
||||
'tools/repack_locales.py',
|
||||
# NOTE: Ideally the common command args would be shared
|
||||
# amongst inputs/outputs/action, but the args include shell
|
||||
# variables which need to be passed intact, and command
|
||||
# expansion wants to expand the shell variables. Adding the
|
||||
# explicit quoting here was the only way it seemed to work.
|
||||
'>!@(<(repack_locales_cmd) -i -g \"<(grit_out_dir)\" -s \"<(SHARED_INTERMEDIATE_DIR)\" -x \"<(INTERMEDIATE_DIR)\" <(locales))',
|
||||
],
|
||||
'outputs': [
|
||||
'>!@(<(repack_locales_cmd) -o -g \"<(grit_out_dir)\" -s \"<(SHARED_INTERMEDIATE_DIR)\" -x \"<(INTERMEDIATE_DIR)\" <(locales))',
|
||||
],
|
||||
'action': [
|
||||
'<@(repack_locales_cmd)',
|
||||
'-g', '<(grit_out_dir)',
|
||||
'-s', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-x', '<(INTERMEDIATE_DIR)',
|
||||
'<@(locales)',
|
||||
],
|
||||
},
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/locales',
|
||||
'files': [
|
||||
'<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))'
|
||||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<(grit_out_dir)/devtools_resources.pak'
|
||||
],
|
||||
},
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
# Set /SUBSYSTEM:WINDOWS.
|
||||
'SubSystem': '2',
|
||||
'EntryPointSymbol' : 'wWinMainCRTStartup',
|
||||
},
|
||||
},
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lcomctl32.lib',
|
||||
'-lshlwapi.lib',
|
||||
'-lrpcrt4.lib',
|
||||
'-lopengl32.lib',
|
||||
'-lglu32.lib',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
'<@(cefclient_sources_win)',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
'product_name': 'cefclient',
|
||||
'variables': {
|
||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||
'PRODUCT_NAME': 'cefclient',
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'repack_locales',
|
||||
'process_outputs_as_mac_bundle_resources': 1,
|
||||
'inputs': [
|
||||
'tools/repack_locales.py',
|
||||
# NOTE: Ideally the common command args would be shared
|
||||
# amongst inputs/outputs/action, but the args include shell
|
||||
# variables which need to be passed intact, and command
|
||||
# expansion wants to expand the shell variables. Adding the
|
||||
# explicit quoting here was the only way it seemed to work.
|
||||
'>!@(<(repack_locales_cmd) -i -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
|
||||
],
|
||||
'outputs': [
|
||||
'>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
|
||||
],
|
||||
'action': [
|
||||
'<@(repack_locales_cmd)',
|
||||
'-g', '<(grit_out_dir)',
|
||||
'-s', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-x', '<(INTERMEDIATE_DIR)',
|
||||
'<@(locales)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'repack_resources',
|
||||
'process_outputs_as_mac_bundle_resources': 1,
|
||||
'variables': {
|
||||
'pak_inputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
|
||||
],
|
||||
},
|
||||
'inputs': [
|
||||
'<(repack_path)',
|
||||
'<@(pak_inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/repack/chrome.pak',
|
||||
],
|
||||
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
|
||||
},
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
# Add library dependencies to the bundle.
|
||||
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/libcef.dylib',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Copy WebCore Resources',
|
||||
'action': [
|
||||
'cp',
|
||||
'-Rf',
|
||||
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/WebCore/Resources/',
|
||||
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/'
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(includes_mac)',
|
||||
'<@(cefclient_sources_mac)',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
'<@(cefclient_sources_linux)',
|
||||
],
|
||||
'variables': {
|
||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'repack_locales',
|
||||
'inputs': [
|
||||
'tools/repack_locales.py',
|
||||
# NOTE: Ideally the common command args would be shared
|
||||
# amongst inputs/outputs/action, but the args include shell
|
||||
# variables which need to be passed intact, and command
|
||||
# expansion wants to expand the shell variables. Adding the
|
||||
# explicit quoting here was the only way it seemed to work.
|
||||
'>!@(<(repack_locales_cmd) -i -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
|
||||
],
|
||||
'outputs': [
|
||||
'>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
|
||||
],
|
||||
'action': [
|
||||
'<@(repack_locales_cmd)',
|
||||
'-g', '<(grit_out_dir)',
|
||||
'-s', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-x', '<(INTERMEDIATE_DIR)',
|
||||
'<@(locales)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'repack_resources',
|
||||
'variables': {
|
||||
'pak_inputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
|
||||
],
|
||||
},
|
||||
'inputs': [
|
||||
'<(repack_path)',
|
||||
'<@(pak_inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/repack/chrome.pak',
|
||||
],
|
||||
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
|
||||
},
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/locales',
|
||||
'files': [
|
||||
'<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))'
|
||||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<(INTERMEDIATE_DIR)/repack/chrome.pak',
|
||||
'<(grit_out_dir)/devtools_resources.pak',
|
||||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/files',
|
||||
'files': [
|
||||
'<@(cefclient_bundle_resources_linux)',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'cef_unittests',
|
||||
'type': 'executable',
|
||||
'mac_bundle': 1,
|
||||
'msvs_guid': '8500027C-B11A-11DE-A16E-B80256D89593',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
'<(DEPTH)/base/base.gyp:base_i18n',
|
||||
'<(DEPTH)/base/base.gyp:test_support_base',
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
||||
'libcef',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'sources': [
|
||||
'tests/cefclient/cefclient_switches.cpp',
|
||||
'tests/cefclient/cefclient_switches.h',
|
||||
'tests/unittests/command_line_unittest.cc',
|
||||
'tests/unittests/content_filter_unittest.cc',
|
||||
'tests/unittests/cookie_unittest.cc',
|
||||
'tests/unittests/dom_unittest.cc',
|
||||
'tests/unittests/geolocation_unittest.cc',
|
||||
'tests/unittests/navigation_unittest.cc',
|
||||
'tests/unittests/request_unittest.cc',
|
||||
'tests/unittests/run_all_unittests.cc',
|
||||
'tests/unittests/scheme_handler_unittest.cc',
|
||||
'tests/unittests/stream_unittest.cc',
|
||||
'tests/unittests/string_unittest.cc',
|
||||
'tests/unittests/test_handler.cc',
|
||||
'tests/unittests/test_handler.h',
|
||||
'tests/unittests/test_suite.cc',
|
||||
'tests/unittests/test_suite.h',
|
||||
'tests/unittests/url_unittest.cc',
|
||||
'tests/unittests/v8_unittest.cc',
|
||||
'tests/unittests/web_urlrequest_unittest.cc',
|
||||
'tests/unittests/xml_reader_unittest.cc',
|
||||
'tests/unittests/zip_reader_unittest.cc',
|
||||
],
|
||||
'mac_bundle_resources': [
|
||||
'tests/unittests/mac/unittests.icns',
|
||||
'tests/unittests/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/unittests/mac/English.lproj/MainMenu.xib',
|
||||
'tests/unittests/mac/Info.plist',
|
||||
'<(grit_out_dir)/devtools_resources.pak',
|
||||
],
|
||||
'mac_bundle_resources!': [
|
||||
# TODO(mark): Come up with a fancier way to do this (mac_info_plist?)
|
||||
# that automatically sets the correct INFOPLIST_FILE setting and adds
|
||||
# the file to a source group.
|
||||
'tests/unittests/mac/Info.plist',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'tests/unittests/mac/Info.plist',
|
||||
},
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="mac"', {
|
||||
'product_name': 'cef_unittests',
|
||||
'variables': {
|
||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||
'PRODUCT_NAME': 'cef_unittests',
|
||||
},
|
||||
'run_as': {
|
||||
'action': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/MacOS/${PRODUCT_NAME}'],
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'repack_locales',
|
||||
'process_outputs_as_mac_bundle_resources': 1,
|
||||
'inputs': [
|
||||
'tools/repack_locales.py',
|
||||
# NOTE: Ideally the common command args would be shared
|
||||
# amongst inputs/outputs/action, but the args include shell
|
||||
# variables which need to be passed intact, and command
|
||||
# expansion wants to expand the shell variables. Adding the
|
||||
# explicit quoting here was the only way it seemed to work.
|
||||
'>!@(<(repack_locales_cmd) -i -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
|
||||
],
|
||||
'outputs': [
|
||||
'>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
|
||||
],
|
||||
'action': [
|
||||
'<@(repack_locales_cmd)',
|
||||
'-g', '<(grit_out_dir)',
|
||||
'-s', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-x', '<(INTERMEDIATE_DIR)',
|
||||
'<@(locales)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'repack_resources',
|
||||
'process_outputs_as_mac_bundle_resources': 1,
|
||||
'variables': {
|
||||
'pak_inputs': [
|
||||
'<(grit_out_dir)/devtools_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
|
||||
],
|
||||
},
|
||||
'inputs': [
|
||||
'<(repack_path)',
|
||||
'<@(pak_inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/repack/chrome.pak',
|
||||
],
|
||||
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
|
||||
},
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
# Add library dependencies to the bundle.
|
||||
'destination': '<(PRODUCT_DIR)/<(PRODUCT_NAME).app/Contents/MacOS/',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/libcef.dylib',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Copy WebCore Resources',
|
||||
'action': [
|
||||
'cp',
|
||||
'-Rf',
|
||||
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/WebCore/Resources/',
|
||||
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/'
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'tests/unittests/run_all_unittests_mac.mm',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'libcef',
|
||||
'type': 'shared_library',
|
||||
'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47',
|
||||
'dependencies': [
|
||||
'libcef_static',
|
||||
],
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_capi)',
|
||||
'<@(libcef_sources_common)',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INSTALL_PATH': '@executable_path',
|
||||
'DYLIB_INSTALL_NAME_BASE': '@executable_path',
|
||||
# The libcef_static target contains ObjC categories. Passing the -ObjC flag
|
||||
# is necessary to properly load them and avoid a "selector not recognized"
|
||||
# runtime error. See http://developer.apple.com/library/mac/#qa/qa1490/_index.html
|
||||
# for more information.
|
||||
'OTHER_LDFLAGS': ['-Wl,-ObjC'],
|
||||
'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
|
||||
'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="win" and win_use_allocator_shim==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
|
||||
'libcef_dll/libcef_dll.rc',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lcomctl32.lib',
|
||||
'-llocationapi.lib',
|
||||
],
|
||||
},
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
# Generate a PDB symbol file for both Debug and Release builds.
|
||||
'GenerateDebugInformation': 'true',
|
||||
},
|
||||
},
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'libcef_dll_wrapper',
|
||||
'type': 'static_library',
|
||||
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
|
||||
'libcef',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_capi)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(libcef_dll_wrapper_sources_common)',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'cef_extra_resources',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtools_grd',
|
||||
],
|
||||
# These resources end up in chrome.pak because they are resources
|
||||
# used by internal pages. Putting them in a spearate pak file makes
|
||||
# it easier for us to reference them internally.
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'devtools_resources',
|
||||
# This can't use ../build/grit_action.gypi because the grd file
|
||||
# is generated a build time, so the trick of using grit_info to get
|
||||
# the real inputs/outputs at GYP time isn't possible.
|
||||
'variables': {
|
||||
'grit_cmd': ['python', '../tools/grit/grit.py'],
|
||||
'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd',
|
||||
},
|
||||
'inputs': [
|
||||
'<(grit_grd_file)',
|
||||
'<!@pymod_do_main(grit_info --inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(grit_out_dir)/grit/devtools_resources.h',
|
||||
'<(grit_out_dir)/devtools_resources.pak',
|
||||
'<(grit_out_dir)/grit/devtools_resources_map.cc',
|
||||
'<(grit_out_dir)/grit/devtools_resources_map.h',
|
||||
],
|
||||
'action': ['<@(grit_cmd)',
|
||||
'-i', '<(grit_grd_file)', 'build',
|
||||
'-o', '<(grit_out_dir)',
|
||||
'-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)',
|
||||
'<@(grit_defines)' ],
|
||||
'message': 'Generating resources from <(grit_grd_file)',
|
||||
},
|
||||
],
|
||||
'includes': [ '../build/grit_target.gypi' ],
|
||||
},
|
||||
{
|
||||
'target_name': 'libcef_static',
|
||||
'type': 'static_library',
|
||||
'msvs_guid': 'FA39524D-3067-4141-888D-28A86C66F2B9',
|
||||
'defines': [
|
||||
'BUILDING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/public',
|
||||
'<(grit_out_dir)',
|
||||
],
|
||||
'dependencies': [
|
||||
'cef_extra_resources',
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
'<(DEPTH)/base/base.gyp:base_i18n',
|
||||
'<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
|
||||
'<(DEPTH)/net/net.gyp:net',
|
||||
'<(DEPTH)/net/net.gyp:net_resources',
|
||||
'<(DEPTH)/printing/printing.gyp:printing',
|
||||
'<(DEPTH)/sdch/sdch.gyp:sdch',
|
||||
'<(DEPTH)/skia/skia.gyp:skia',
|
||||
'<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
||||
'<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
|
||||
'<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
|
||||
'<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
|
||||
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
|
||||
'<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
|
||||
'<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64',
|
||||
'<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
|
||||
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
|
||||
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
|
||||
'<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
|
||||
'<(DEPTH)/ui/ui.gyp:ui_resources',
|
||||
'<(DEPTH)/ui/ui.gyp:ui',
|
||||
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:glue',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:user_agent',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_storage',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'libcef/browser_appcache_system.cc',
|
||||
'libcef/browser_appcache_system.h',
|
||||
'libcef/browser_database_system.cc',
|
||||
'libcef/browser_database_system.h',
|
||||
'libcef/browser_devtools_agent.cc',
|
||||
'libcef/browser_devtools_agent.h',
|
||||
'libcef/browser_devtools_callargs.cc',
|
||||
'libcef/browser_devtools_callargs.h',
|
||||
'libcef/browser_devtools_client.cc',
|
||||
'libcef/browser_devtools_client.h',
|
||||
'libcef/browser_devtools_scheme_handler.cc',
|
||||
'libcef/browser_devtools_scheme_handler.h',
|
||||
'libcef/browser_dom_storage_system.cc',
|
||||
'libcef/browser_dom_storage_system.h',
|
||||
'libcef/browser_file_system.cc',
|
||||
'libcef/browser_file_system.h',
|
||||
'libcef/browser_file_writer.cc',
|
||||
'libcef/browser_file_writer.h',
|
||||
'libcef/browser_impl.cc',
|
||||
'libcef/browser_impl.h',
|
||||
'libcef/browser_navigation_controller.cc',
|
||||
'libcef/browser_navigation_controller.h',
|
||||
'libcef/browser_network_delegate.cc',
|
||||
'libcef/browser_network_delegate.h',
|
||||
'libcef/browser_request_context.cc',
|
||||
'libcef/browser_request_context.h',
|
||||
'libcef/browser_request_context_proxy.cc',
|
||||
'libcef/browser_request_context_proxy.h',
|
||||
'libcef/browser_resource_loader_bridge.cc',
|
||||
'libcef/browser_resource_loader_bridge.h',
|
||||
'libcef/browser_settings.cc',
|
||||
'libcef/browser_settings.h',
|
||||
'libcef/browser_socket_stream_bridge.cc',
|
||||
'libcef/browser_socket_stream_bridge.h',
|
||||
'libcef/browser_thread_stub.cc',
|
||||
'libcef/browser_webcookiejar_impl.cc',
|
||||
'libcef/browser_webcookiejar_impl.h',
|
||||
'libcef/browser_webblobregistry_impl.cc',
|
||||
'libcef/browser_webblobregistry_impl.h',
|
||||
'libcef/browser_webkit_glue.cc',
|
||||
'libcef/browser_webkit_glue.h',
|
||||
'libcef/browser_webkit_init.cc',
|
||||
'libcef/browser_webkit_init.h',
|
||||
'libcef/browser_webview_delegate.cc',
|
||||
'libcef/browser_webview_delegate.h',
|
||||
'libcef/browser_zoom_map.cc',
|
||||
'libcef/browser_zoom_map.h',
|
||||
'libcef/cef_context.cc',
|
||||
'libcef/cef_context.h',
|
||||
'libcef/cef_process.cc',
|
||||
'libcef/cef_process.h',
|
||||
'libcef/cef_process_io_thread.cc',
|
||||
'libcef/cef_process_io_thread.h',
|
||||
'libcef/cef_process_sub_thread.cc',
|
||||
'libcef/cef_process_sub_thread.h',
|
||||
'libcef/cef_process_ui_thread.cc',
|
||||
'libcef/cef_process_ui_thread.h',
|
||||
'libcef/cef_string_list.cc',
|
||||
'libcef/cef_string_map.cc',
|
||||
'libcef/cef_string_multimap.cc',
|
||||
'libcef/cef_string_types.cc',
|
||||
'libcef/cef_thread.cc',
|
||||
'libcef/cef_thread.h',
|
||||
'libcef/cef_time.cc',
|
||||
'libcef/cef_time_util.h',
|
||||
'libcef/command_line_impl.cc',
|
||||
'libcef/cookie_manager_impl.cc',
|
||||
'libcef/cookie_manager_impl.h',
|
||||
'libcef/cookie_store_proxy.cc',
|
||||
'libcef/cookie_store_proxy.h',
|
||||
'libcef/drag_data_impl.cc',
|
||||
'libcef/drag_data_impl.h',
|
||||
'libcef/drag_download_file.cc',
|
||||
'libcef/drag_download_file.h',
|
||||
'libcef/drag_download_util.cc',
|
||||
'libcef/drag_download_util.h',
|
||||
'libcef/dom_document_impl.cc',
|
||||
'libcef/dom_document_impl.h',
|
||||
'libcef/dom_event_impl.cc',
|
||||
'libcef/dom_event_impl.h',
|
||||
'libcef/dom_node_impl.cc',
|
||||
'libcef/dom_node_impl.h',
|
||||
'libcef/download_util.cc',
|
||||
'libcef/download_util.h',
|
||||
'libcef/external_protocol_handler.h',
|
||||
'libcef/geolocation_client.cc',
|
||||
'libcef/geolocation_client.h',
|
||||
'libcef/geolocation_impl.cc',
|
||||
'libcef/http_header_utils.cc',
|
||||
'libcef/http_header_utils.h',
|
||||
'libcef/nplugin_impl.cc',
|
||||
'libcef/origin_whitelist_impl.cc',
|
||||
'libcef/request_impl.cc',
|
||||
'libcef/request_impl.h',
|
||||
'libcef/response_impl.cc',
|
||||
'libcef/response_impl.h',
|
||||
'libcef/scheme_impl.cc',
|
||||
'libcef/scheme_registrar_impl.cc',
|
||||
'libcef/scheme_registrar_impl.h',
|
||||
'libcef/simple_clipboard_impl.cc',
|
||||
'libcef/simple_clipboard_impl.h',
|
||||
'libcef/sqlite_diagnostics_stub.cc',
|
||||
'libcef/stream_impl.cc',
|
||||
'libcef/stream_impl.h',
|
||||
'libcef/task_impl.cc',
|
||||
'libcef/tracker.h',
|
||||
'libcef/url_impl.cc',
|
||||
'libcef/v8_impl.cc',
|
||||
'libcef/v8_impl.h',
|
||||
'libcef/web_plugin_impl.cc',
|
||||
'libcef/web_urlrequest_impl.cc',
|
||||
'libcef/web_urlrequest_impl.h',
|
||||
'libcef/webview_host.cc',
|
||||
'libcef/webview_host.h',
|
||||
'libcef/webwidget_host.cc',
|
||||
'libcef/webwidget_host.h',
|
||||
'libcef/xml_reader_impl.cc',
|
||||
'libcef/xml_reader_impl.h',
|
||||
'libcef/zip_reader_impl.cc',
|
||||
'libcef/zip_reader_impl.h',
|
||||
'<(DEPTH)/content/browser/net/sqlite_persistent_cookie_store.cc',
|
||||
'<(DEPTH)/content/browser/net/sqlite_persistent_cookie_store.h',
|
||||
# DevTools resource IDs generated by grit
|
||||
'<(grit_out_dir)/grit/devtools_resources_map.cc',
|
||||
# Geolocation implementation
|
||||
'<(DEPTH)/content/browser/geolocation/device_data_provider.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/empty_device_data_provider.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/geolocation_provider.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/location_arbitrator_impl.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/location_provider.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/network_location_provider.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/network_location_request.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/wifi_data_provider_common.cc',
|
||||
'<(DEPTH)/content/common/net/url_fetcher.cc',
|
||||
'<(DEPTH)/content/common/net/url_request_user_data.cc',
|
||||
'<(DEPTH)/content/public/browser/content_browser_client.cc',
|
||||
'<(DEPTH)/content/public/common/content_client.cc',
|
||||
'<(DEPTH)/content/public/common/geoposition.cc',
|
||||
'<(DEPTH)/google_apis/google_api_keys.cc',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler',
|
||||
'<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL',
|
||||
'<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
'libcef/browser_drag_delegate_win.cc',
|
||||
'libcef/browser_drag_delegate_win.h',
|
||||
'libcef/browser_impl_win.cc',
|
||||
'libcef/browser_webkit_glue_win.cc',
|
||||
'libcef/browser_webview_delegate_win.cc',
|
||||
'libcef/cef_process_ui_thread_win.cc',
|
||||
'libcef/external_protocol_handler_win.cc',
|
||||
'libcef/printing/print_settings.cc',
|
||||
'libcef/printing/print_settings.h',
|
||||
'libcef/printing/win_printing_context.cc',
|
||||
'libcef/printing/win_printing_context.h',
|
||||
'libcef/web_drag_source_win.cc',
|
||||
'libcef/web_drag_source_win.h',
|
||||
'libcef/web_drag_utils_win.cc',
|
||||
'libcef/web_drag_utils_win.h',
|
||||
'libcef/web_drop_target_win.cc',
|
||||
'libcef/web_drop_target_win.h',
|
||||
'libcef/webview_host_win.cc',
|
||||
'libcef/webwidget_host_win.cc',
|
||||
# Geolocation implementation
|
||||
'<(DEPTH)/content/browser/geolocation/wifi_data_provider_common_win.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/wifi_data_provider_win.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/win7_location_api_win.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/win7_location_provider_win.cc',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
'sources': [
|
||||
'<@(includes_mac)',
|
||||
'libcef/browser_impl_mac.mm',
|
||||
'libcef/browser_tooltip_mac.h',
|
||||
'libcef/browser_webview_delegate_mac.mm',
|
||||
'libcef/browser_webview_mac.h',
|
||||
'libcef/browser_webview_mac.mm',
|
||||
'libcef/cef_process_ui_thread_mac.mm',
|
||||
'libcef/external_popup_menu_mac.h',
|
||||
'libcef/external_popup_menu_mac.mm',
|
||||
'libcef/external_protocol_handler_mac.mm',
|
||||
'libcef/webview_host_mac.mm',
|
||||
'libcef/webwidget_host_mac.mm',
|
||||
'libcef/web_drag_source_mac.h',
|
||||
'libcef/web_drag_source_mac.mm',
|
||||
'libcef/web_drag_utils_mac.h',
|
||||
'libcef/web_drag_utils_mac.mm',
|
||||
'libcef/web_drop_target_mac.h',
|
||||
'libcef/web_drop_target_mac.mm',
|
||||
# Include necessary Mozilla sources.
|
||||
'<(DEPTH)/third_party/mozilla/NSPasteboard+Utils.h',
|
||||
'<(DEPTH)/third_party/mozilla/NSPasteboard+Utils.mm',
|
||||
'<(DEPTH)/third_party/mozilla/NSString+Utils.h',
|
||||
'<(DEPTH)/third_party/mozilla/NSString+Utils.mm',
|
||||
'<(DEPTH)/third_party/mozilla/NSURL+Utils.h',
|
||||
'<(DEPTH)/third_party/mozilla/NSURL+Utils.m',
|
||||
# Geolocation implementation
|
||||
'<(DEPTH)/content/browser/geolocation/core_location_data_provider_mac.mm',
|
||||
'<(DEPTH)/content/browser/geolocation/core_location_provider_mac.mm',
|
||||
'<(DEPTH)/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm',
|
||||
'<(DEPTH)/content/browser/geolocation/wifi_data_provider_mac.cc',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/build/linux/system.gyp:dbus',
|
||||
'<(DEPTH)/dbus/dbus.gyp:dbus',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
'libcef/browser_impl_gtk.cc',
|
||||
'libcef/browser_webview_delegate_gtk.cc',
|
||||
'libcef/cef_process_ui_thread_gtk.cc',
|
||||
'libcef/external_protocol_handler_gtk.cc',
|
||||
'libcef/webview_host_gtk.cc',
|
||||
'libcef/webwidget_host_gtk.cc',
|
||||
'libcef/web_drag_source_gtk.cc',
|
||||
'libcef/web_drag_source_gtk.h',
|
||||
'libcef/web_drag_utils_gtk.cc',
|
||||
'libcef/web_drag_utils_gtk.h',
|
||||
'libcef/web_drop_target_gtk.cc',
|
||||
'libcef/web_drop_target_gtk.h',
|
||||
# Include the files needed for drag&drop that are otherwise excluded
|
||||
# by 'toolkit_views=0' in ui/ui.gyp.
|
||||
'<(DEPTH)/ui/base/dragdrop/drag_drop_types_gtk.cc',
|
||||
'<(DEPTH)/ui/base/dragdrop/os_exchange_data.cc',
|
||||
'<(DEPTH)/ui/base/dragdrop/os_exchange_data.h',
|
||||
'<(DEPTH)/ui/base/dragdrop/os_exchange_data_provider_gtk.cc',
|
||||
'<(DEPTH)/ui/base/dragdrop/os_exchange_data_provider_gtk.h',
|
||||
# Geolocation implementation
|
||||
'<(DEPTH)/content/browser/geolocation/gps_location_provider_linux.cc',
|
||||
'<(DEPTH)/content/browser/geolocation/wifi_data_provider_linux.cc',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'conditions': [
|
||||
# Directory for CEF source files.
|
||||
[ 'OS=="win"', {
|
||||
'cef_directory' : '<!(echo %CEF_DIRECTORY%)',
|
||||
# Keep the build output in the CEF directory.
|
||||
'build_dir_prefix': '..\\<!(echo %CEF_DIRECTORY%)\\',
|
||||
# Use SKIA text rendering for transparency support.
|
||||
'enable_skia_text': 1,
|
||||
}, { # OS!="win"
|
||||
'cef_directory' : '<!(echo $CEF_DIRECTORY)',
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
# Don't use the chrome style plugin with CEF.
|
||||
'clang_use_chrome_plugins': 0,
|
||||
}],
|
||||
]
|
||||
}, 'conditions': [
|
||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
||||
'target_defaults': {
|
||||
'cflags_cc': ['-Wno-deprecated-declarations'],
|
||||
},
|
||||
}]
|
||||
]
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
@echo off
|
||||
..\third_party\python_26\python.exe tools\gclient_hook.py
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
python tools/gclient_hook.py
|
@ -1,345 +0,0 @@
|
||||
# Copyright (c) 2013 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.
|
||||
#
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# This file was generated by the CEF translator tool and should not edited
|
||||
# by hand. See the translator.README.txt file in the tools directory for
|
||||
# more information.
|
||||
#
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'autogen_cpp_includes': [
|
||||
'include/cef_app.h',
|
||||
'include/cef_browser.h',
|
||||
'include/cef_client.h',
|
||||
'include/cef_command_line.h',
|
||||
'include/cef_content_filter.h',
|
||||
'include/cef_cookie.h',
|
||||
'include/cef_display_handler.h',
|
||||
'include/cef_dom.h',
|
||||
'include/cef_download_handler.h',
|
||||
'include/cef_drag_data.h',
|
||||
'include/cef_drag_handler.h',
|
||||
'include/cef_find_handler.h',
|
||||
'include/cef_focus_handler.h',
|
||||
'include/cef_frame.h',
|
||||
'include/cef_geolocation.h',
|
||||
'include/cef_geolocation_handler.h',
|
||||
'include/cef_jsdialog_handler.h',
|
||||
'include/cef_keyboard_handler.h',
|
||||
'include/cef_life_span_handler.h',
|
||||
'include/cef_load_handler.h',
|
||||
'include/cef_menu_handler.h',
|
||||
'include/cef_origin_whitelist.h',
|
||||
'include/cef_permission_handler.h',
|
||||
'include/cef_print_handler.h',
|
||||
'include/cef_proxy_handler.h',
|
||||
'include/cef_render_handler.h',
|
||||
'include/cef_request.h',
|
||||
'include/cef_request_handler.h',
|
||||
'include/cef_resource_bundle_handler.h',
|
||||
'include/cef_response.h',
|
||||
'include/cef_scheme.h',
|
||||
'include/cef_stream.h',
|
||||
'include/cef_task.h',
|
||||
'include/cef_url.h',
|
||||
'include/cef_v8.h',
|
||||
'include/cef_v8context_handler.h',
|
||||
'include/cef_web_plugin.h',
|
||||
'include/cef_web_urlrequest.h',
|
||||
'include/cef_xml_reader.h',
|
||||
'include/cef_zip_reader.h',
|
||||
'include/cef_zoom_handler.h',
|
||||
],
|
||||
'autogen_capi_includes': [
|
||||
'include/capi/cef_app_capi.h',
|
||||
'include/capi/cef_browser_capi.h',
|
||||
'include/capi/cef_client_capi.h',
|
||||
'include/capi/cef_command_line_capi.h',
|
||||
'include/capi/cef_content_filter_capi.h',
|
||||
'include/capi/cef_cookie_capi.h',
|
||||
'include/capi/cef_display_handler_capi.h',
|
||||
'include/capi/cef_dom_capi.h',
|
||||
'include/capi/cef_download_handler_capi.h',
|
||||
'include/capi/cef_drag_data_capi.h',
|
||||
'include/capi/cef_drag_handler_capi.h',
|
||||
'include/capi/cef_find_handler_capi.h',
|
||||
'include/capi/cef_focus_handler_capi.h',
|
||||
'include/capi/cef_frame_capi.h',
|
||||
'include/capi/cef_geolocation_capi.h',
|
||||
'include/capi/cef_geolocation_handler_capi.h',
|
||||
'include/capi/cef_jsdialog_handler_capi.h',
|
||||
'include/capi/cef_keyboard_handler_capi.h',
|
||||
'include/capi/cef_life_span_handler_capi.h',
|
||||
'include/capi/cef_load_handler_capi.h',
|
||||
'include/capi/cef_menu_handler_capi.h',
|
||||
'include/capi/cef_origin_whitelist_capi.h',
|
||||
'include/capi/cef_permission_handler_capi.h',
|
||||
'include/capi/cef_print_handler_capi.h',
|
||||
'include/capi/cef_proxy_handler_capi.h',
|
||||
'include/capi/cef_render_handler_capi.h',
|
||||
'include/capi/cef_request_capi.h',
|
||||
'include/capi/cef_request_handler_capi.h',
|
||||
'include/capi/cef_resource_bundle_handler_capi.h',
|
||||
'include/capi/cef_response_capi.h',
|
||||
'include/capi/cef_scheme_capi.h',
|
||||
'include/capi/cef_stream_capi.h',
|
||||
'include/capi/cef_task_capi.h',
|
||||
'include/capi/cef_url_capi.h',
|
||||
'include/capi/cef_v8_capi.h',
|
||||
'include/capi/cef_v8context_handler_capi.h',
|
||||
'include/capi/cef_web_plugin_capi.h',
|
||||
'include/capi/cef_web_urlrequest_capi.h',
|
||||
'include/capi/cef_xml_reader_capi.h',
|
||||
'include/capi/cef_zip_reader_capi.h',
|
||||
'include/capi/cef_zoom_handler_capi.h',
|
||||
],
|
||||
'autogen_library_side': [
|
||||
'libcef_dll/ctocpp/app_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/app_ctocpp.h',
|
||||
'libcef_dll/cpptoc/browser_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/browser_cpptoc.h',
|
||||
'libcef_dll/ctocpp/client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/client_ctocpp.h',
|
||||
'libcef_dll/cpptoc/command_line_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/command_line_cpptoc.h',
|
||||
'libcef_dll/ctocpp/content_filter_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/content_filter_ctocpp.h',
|
||||
'libcef_dll/cpptoc/cookie_manager_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/cookie_manager_cpptoc.h',
|
||||
'libcef_dll/ctocpp/cookie_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/cookie_visitor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/domdocument_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domdocument_cpptoc.h',
|
||||
'libcef_dll/cpptoc/domevent_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domevent_cpptoc.h',
|
||||
'libcef_dll/ctocpp/domevent_listener_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domevent_listener_ctocpp.h',
|
||||
'libcef_dll/cpptoc/domnode_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domnode_cpptoc.h',
|
||||
'libcef_dll/ctocpp/domvisitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domvisitor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/display_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/display_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/download_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/download_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/drag_data_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/drag_data_cpptoc.h',
|
||||
'libcef_dll/ctocpp/drag_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/drag_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/find_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/find_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/focus_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/focus_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/frame_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/frame_cpptoc.h',
|
||||
'libcef_dll/cpptoc/geolocation_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/geolocation_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/geolocation_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/geolocation_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/get_geolocation_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h',
|
||||
'libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/jsdialog_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/keyboard_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/keyboard_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/life_span_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/life_span_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/load_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/load_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/menu_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/menu_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/permission_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/permission_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/post_data_cpptoc.h',
|
||||
'libcef_dll/cpptoc/post_data_element_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/post_data_element_cpptoc.h',
|
||||
'libcef_dll/ctocpp/print_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/print_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/proxy_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/proxy_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/read_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/render_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/request_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_cpptoc.h',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_handler_ctocpp.h',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/response_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/response_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_handler_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_handler_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_registrar_cpptoc.h',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/stream_reader_cpptoc.h',
|
||||
'libcef_dll/cpptoc/stream_writer_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/stream_writer_cpptoc.h',
|
||||
'libcef_dll/ctocpp/task_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/task_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8accessor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8accessor_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8context_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8context_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8context_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8context_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8exception_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8exception_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8stack_frame_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8stack_trace_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8stack_trace_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8value_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8value_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_urlrequest_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_urlrequest_cpptoc.h',
|
||||
'libcef_dll/ctocpp/web_urlrequest_client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_urlrequest_client_ctocpp.h',
|
||||
'libcef_dll/ctocpp/write_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/write_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/xml_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/xml_reader_cpptoc.h',
|
||||
'libcef_dll/cpptoc/zip_reader_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/zip_reader_cpptoc.h',
|
||||
'libcef_dll/ctocpp/zoom_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/zoom_handler_ctocpp.h',
|
||||
],
|
||||
'autogen_client_side': [
|
||||
'libcef_dll/cpptoc/app_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/app_cpptoc.h',
|
||||
'libcef_dll/ctocpp/browser_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/browser_ctocpp.h',
|
||||
'libcef_dll/cpptoc/client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/client_cpptoc.h',
|
||||
'libcef_dll/ctocpp/command_line_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/command_line_ctocpp.h',
|
||||
'libcef_dll/cpptoc/content_filter_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/content_filter_cpptoc.h',
|
||||
'libcef_dll/ctocpp/cookie_manager_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/cookie_manager_ctocpp.h',
|
||||
'libcef_dll/cpptoc/cookie_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/cookie_visitor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/domdocument_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domdocument_ctocpp.h',
|
||||
'libcef_dll/ctocpp/domevent_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domevent_ctocpp.h',
|
||||
'libcef_dll/cpptoc/domevent_listener_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domevent_listener_cpptoc.h',
|
||||
'libcef_dll/ctocpp/domnode_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/domnode_ctocpp.h',
|
||||
'libcef_dll/cpptoc/domvisitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/domvisitor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/display_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/display_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/download_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/download_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/drag_data_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/drag_data_ctocpp.h',
|
||||
'libcef_dll/cpptoc/drag_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/drag_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/find_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/find_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/focus_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/focus_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/frame_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/frame_ctocpp.h',
|
||||
'libcef_dll/ctocpp/geolocation_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/geolocation_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/geolocation_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/geolocation_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h',
|
||||
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/keyboard_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/keyboard_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/life_span_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/life_span_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/load_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/load_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/menu_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/menu_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/permission_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/permission_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/post_data_ctocpp.h',
|
||||
'libcef_dll/ctocpp/post_data_element_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/post_data_element_ctocpp.h',
|
||||
'libcef_dll/cpptoc/print_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/print_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/proxy_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/proxy_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/read_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/render_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/request_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/request_ctocpp.h',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/request_handler_cpptoc.h',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/response_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/response_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_handler_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_handler_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h',
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/scheme_registrar_ctocpp.h',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/stream_reader_ctocpp.h',
|
||||
'libcef_dll/ctocpp/stream_writer_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/stream_writer_ctocpp.h',
|
||||
'libcef_dll/cpptoc/task_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/task_cpptoc.h',
|
||||
'libcef_dll/cpptoc/v8accessor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8accessor_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8context_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8context_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8context_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8context_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8exception_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8exception_ctocpp.h',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/v8handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8stack_frame_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8stack_trace_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8stack_trace_ctocpp.h',
|
||||
'libcef_dll/ctocpp/v8value_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/v8value_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_urlrequest_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_urlrequest_ctocpp.h',
|
||||
'libcef_dll/cpptoc/web_urlrequest_client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h',
|
||||
'libcef_dll/cpptoc/write_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/write_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/xml_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/xml_reader_ctocpp.h',
|
||||
'libcef_dll/ctocpp/zip_reader_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/zip_reader_ctocpp.h',
|
||||
'libcef_dll/cpptoc/zoom_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/zoom_handler_cpptoc.h',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,177 +0,0 @@
|
||||
# Copyright (c) 2011 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.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
# Bring in the autogenerated source file lists.
|
||||
'cef_paths.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'includes_common': [
|
||||
'include/cef_base.h',
|
||||
'include/cef_nplugin.h',
|
||||
'include/cef_runnable.h',
|
||||
'include/cef_version.h',
|
||||
'include/internal/cef_build.h',
|
||||
'include/internal/cef_export.h',
|
||||
'include/internal/cef_nplugin_types.h',
|
||||
'include/internal/cef_ptr.h',
|
||||
'include/internal/cef_string.h',
|
||||
'include/internal/cef_string_list.h',
|
||||
'include/internal/cef_string_map.h',
|
||||
'include/internal/cef_string_multimap.h',
|
||||
'include/internal/cef_string_types.h',
|
||||
'include/internal/cef_string_wrappers.h',
|
||||
'include/internal/cef_time.h',
|
||||
'include/internal/cef_tuple.h',
|
||||
'include/internal/cef_types.h',
|
||||
'include/internal/cef_types_wrappers.h',
|
||||
'<@(autogen_cpp_includes)',
|
||||
],
|
||||
'includes_capi': [
|
||||
'include/capi/cef_base_capi.h',
|
||||
'include/capi/cef_nplugin_capi.h',
|
||||
'<@(autogen_capi_includes)',
|
||||
],
|
||||
'includes_wrapper': [
|
||||
'include/wrapper/cef_byte_read_handler.h',
|
||||
'include/wrapper/cef_xml_object.h',
|
||||
'include/wrapper/cef_zip_archive.h',
|
||||
],
|
||||
'includes_win': [
|
||||
'include/internal/cef_types_win.h',
|
||||
'include/internal/cef_win.h',
|
||||
],
|
||||
'includes_mac': [
|
||||
'include/cef_application_mac.h',
|
||||
'include/internal/cef_mac.h',
|
||||
'include/internal/cef_types_mac.h',
|
||||
],
|
||||
'includes_linux': [
|
||||
'include/internal/cef_linux.h',
|
||||
'include/internal/cef_types_linux.h',
|
||||
],
|
||||
'libcef_sources_common': [
|
||||
'libcef_dll/cef_logging.h',
|
||||
'libcef_dll/cpptoc/cpptoc.h',
|
||||
'libcef_dll/ctocpp/ctocpp.h',
|
||||
'libcef_dll/libcef_dll.cc',
|
||||
'libcef_dll/libcef_dll2.cc',
|
||||
'libcef_dll/resource.h',
|
||||
'libcef_dll/transfer_util.cpp',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'<@(autogen_library_side)',
|
||||
],
|
||||
'libcef_dll_wrapper_sources_common': [
|
||||
'libcef_dll/cef_logging.h',
|
||||
'libcef_dll/cpptoc/base_cpptoc.h',
|
||||
'libcef_dll/cpptoc/cpptoc.h',
|
||||
'libcef_dll/ctocpp/base_ctocpp.h',
|
||||
'libcef_dll/ctocpp/ctocpp.h',
|
||||
'libcef_dll/transfer_util.cpp',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper/cef_byte_read_handler.cc',
|
||||
'libcef_dll/wrapper/cef_xml_object.cc',
|
||||
'libcef_dll/wrapper/cef_zip_archive.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper.cc',
|
||||
'libcef_dll/wrapper/libcef_dll_wrapper2.cc',
|
||||
'<@(autogen_client_side)',
|
||||
],
|
||||
'cefclient_bundle_resources_common': [
|
||||
'tests/cefclient/res/binding.html',
|
||||
'tests/cefclient/res/dialogs.html',
|
||||
'tests/cefclient/res/domaccess.html',
|
||||
'tests/cefclient/res/extension.html',
|
||||
'tests/cefclient/res/localstorage.html',
|
||||
'tests/cefclient/res/logo.png',
|
||||
'tests/cefclient/res/other_tests.html',
|
||||
'tests/cefclient/res/performance.html',
|
||||
'tests/cefclient/res/transparency.html',
|
||||
'tests/cefclient/res/xmlhttprequest.html',
|
||||
],
|
||||
'cefclient_sources_common': [
|
||||
'tests/cefclient/binding_test.cpp',
|
||||
'tests/cefclient/binding_test.h',
|
||||
'tests/cefclient/cefclient.cpp',
|
||||
'tests/cefclient/cefclient.h',
|
||||
'tests/cefclient/cefclient_switches.cpp',
|
||||
'tests/cefclient/cefclient_switches.h',
|
||||
'tests/cefclient/client_handler.cpp',
|
||||
'tests/cefclient/client_handler.h',
|
||||
'tests/cefclient/client_popup_handler.cpp',
|
||||
'tests/cefclient/client_popup_handler.h',
|
||||
'tests/cefclient/download_handler.cpp',
|
||||
'tests/cefclient/download_handler.h',
|
||||
'tests/cefclient/extension_test.cpp',
|
||||
'tests/cefclient/extension_test.h',
|
||||
'tests/cefclient/performance_test.cpp',
|
||||
'tests/cefclient/performance_test.h',
|
||||
'tests/cefclient/performance_test_setup.h',
|
||||
'tests/cefclient/performance_test_tests.cpp',
|
||||
'tests/cefclient/resource_util.h',
|
||||
'tests/cefclient/scheme_test.cpp',
|
||||
'tests/cefclient/scheme_test.h',
|
||||
'tests/cefclient/string_util.cpp',
|
||||
'tests/cefclient/string_util.h',
|
||||
'tests/cefclient/util.h',
|
||||
'<@(cefclient_bundle_resources_common)',
|
||||
],
|
||||
'cefclient_sources_win': [
|
||||
'tests/cefclient/cefclient.rc',
|
||||
'tests/cefclient/cefclient_win.cpp',
|
||||
'tests/cefclient/client_handler_win.cpp',
|
||||
'tests/cefclient/clientplugin.cpp',
|
||||
'tests/cefclient/clientplugin.h',
|
||||
'tests/cefclient/osrenderer.cpp',
|
||||
'tests/cefclient/osrenderer.h',
|
||||
'tests/cefclient/osrplugin.cpp',
|
||||
'tests/cefclient/osrplugin.h',
|
||||
'tests/cefclient/osrplugin_test.cpp',
|
||||
'tests/cefclient/osrplugin_test.h',
|
||||
'tests/cefclient/plugin_test.cpp',
|
||||
'tests/cefclient/plugin_test.h',
|
||||
'tests/cefclient/Resource.h',
|
||||
'tests/cefclient/res/cefclient.ico',
|
||||
'tests/cefclient/res/logoball.png',
|
||||
'tests/cefclient/res/modaldialog.html',
|
||||
'tests/cefclient/res/modalmain.html',
|
||||
'tests/cefclient/res/osrplugin.html',
|
||||
'tests/cefclient/res/plugin.html',
|
||||
'tests/cefclient/res/small.ico',
|
||||
'tests/cefclient/res/uiplugin.html',
|
||||
'tests/cefclient/resource_util_win.cpp',
|
||||
'tests/cefclient/uiplugin.cpp',
|
||||
'tests/cefclient/uiplugin.h',
|
||||
'tests/cefclient/uiplugin_test.cpp',
|
||||
'tests/cefclient/uiplugin_test.h',
|
||||
],
|
||||
'cefclient_sources_mac': [
|
||||
'tests/cefclient/cefclient_mac.mm',
|
||||
'tests/cefclient/client_handler_mac.mm',
|
||||
'tests/cefclient/osrenderer.cpp',
|
||||
'tests/cefclient/osrenderer.h',
|
||||
'tests/cefclient/osrtest_mac.h',
|
||||
'tests/cefclient/osrtest_mac.mm',
|
||||
'tests/cefclient/resource_util_mac.mm',
|
||||
'tests/cefclient/resource_util_posix.cpp',
|
||||
],
|
||||
'cefclient_bundle_resources_mac': [
|
||||
'tests/cefclient/mac/cefclient.icns',
|
||||
'tests/cefclient/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/cefclient/mac/English.lproj/MainMenu.xib',
|
||||
'tests/cefclient/mac/Info.plist',
|
||||
'tests/cefclient/res/osrtest.html',
|
||||
'<@(cefclient_bundle_resources_common)',
|
||||
],
|
||||
'cefclient_sources_linux': [
|
||||
'tests/cefclient/cefclient_gtk.cpp',
|
||||
'tests/cefclient/client_handler_gtk.cpp',
|
||||
'tests/cefclient/resource_util_linux.cpp',
|
||||
'tests/cefclient/resource_util_posix.cpp',
|
||||
],
|
||||
'cefclient_bundle_resources_linux': [
|
||||
'<@(cefclient_bundle_resources_common)',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// This function should be called on the main application thread to initialize
|
||||
// CEF when the application is started. The |application| parameter may be NULL.
|
||||
// A return value of true (1) indicates that it succeeded and false (0)
|
||||
// indicates that it failed.
|
||||
///
|
||||
CEF_EXPORT int cef_initialize(const struct _cef_settings_t* settings,
|
||||
struct _cef_app_t* application);
|
||||
|
||||
///
|
||||
// This function should be called on the main application thread to shut down
|
||||
// CEF before the application exits.
|
||||
///
|
||||
CEF_EXPORT void cef_shutdown();
|
||||
|
||||
///
|
||||
// Perform a single iteration of CEF message loop processing. This function is
|
||||
// used to integrate the CEF message loop into an existing application message
|
||||
// loop. Care must be taken to balance performance against excessive CPU usage.
|
||||
// This function should only be called on the main application thread and only
|
||||
// if cef_initialize() is called with a CefSettings.multi_threaded_message_loop
|
||||
// value of false (0). This function will not block.
|
||||
///
|
||||
CEF_EXPORT void cef_do_message_loop_work();
|
||||
|
||||
///
|
||||
// Run the CEF message loop. Use this function instead of an application-
|
||||
// provided message loop to get the best balance between performance and CPU
|
||||
// usage. This function should only be called on the main application thread and
|
||||
// only if cef_initialize() is called with a
|
||||
// CefSettings.multi_threaded_message_loop value of false (0). This function
|
||||
// will block until a quit message is received by the system.
|
||||
///
|
||||
CEF_EXPORT void cef_run_message_loop();
|
||||
|
||||
///
|
||||
// Quit the CEF message loop that was started by calling cef_run_message_loop().
|
||||
// This function should only be called on the main application thread and only
|
||||
// if cef_run_message_loop() was used.
|
||||
///
|
||||
CEF_EXPORT void cef_quit_message_loop();
|
||||
|
||||
///
|
||||
// Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a
|
||||
// modal message loop. Set to false (0) after exiting the modal message loop.
|
||||
///
|
||||
CEF_EXPORT void cef_set_osmodal_loop(int osModalLoop);
|
||||
|
||||
///
|
||||
// Implement this structure to provide handler implementations. Methods will be
|
||||
// called on the thread indicated.
|
||||
///
|
||||
typedef struct _cef_app_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Provides an opportunity to register custom schemes. Do not keep a reference
|
||||
// to the |registrar| object. This function is called on the main thread for
|
||||
// each process and the registered schemes should be the same across all
|
||||
// processes.
|
||||
///
|
||||
void (CEF_CALLBACK *on_register_custom_schemes)(struct _cef_app_t* self,
|
||||
struct _cef_scheme_registrar_t* registrar);
|
||||
|
||||
///
|
||||
// Return the handler for resource bundle events. If
|
||||
// CefSettings.pack_loading_disabled is true (1) a handler must be returned.
|
||||
// If no handler is returned resources will be loaded from pack files. This
|
||||
// function is called on multiple threads.
|
||||
///
|
||||
struct _cef_resource_bundle_handler_t* (
|
||||
CEF_CALLBACK *get_resource_bundle_handler)(struct _cef_app_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for proxy events. If not handler is returned the default
|
||||
// system handler will be used. This function is called on the IO thread.
|
||||
///
|
||||
struct _cef_proxy_handler_t* (CEF_CALLBACK *get_proxy_handler)(
|
||||
struct _cef_app_t* self);
|
||||
} cef_app_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
|
@ -1,85 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
#include "include/internal/cef_string.h"
|
||||
#include "include/internal/cef_string_list.h"
|
||||
#include "include/internal/cef_string_map.h"
|
||||
#include "include/internal/cef_string_multimap.h"
|
||||
#include "include/internal/cef_types.h"
|
||||
|
||||
///
|
||||
// Structure defining the reference count implementation functions. All
|
||||
// framework structures must include the cef_base_t structure first.
|
||||
///
|
||||
typedef struct _cef_base_t {
|
||||
///
|
||||
// Size of the data structure.
|
||||
///
|
||||
size_t size;
|
||||
|
||||
///
|
||||
// Increment the reference count.
|
||||
///
|
||||
int (CEF_CALLBACK *add_ref)(struct _cef_base_t* self);
|
||||
|
||||
///
|
||||
// Decrement the reference count. Delete this object when no references
|
||||
// remain.
|
||||
///
|
||||
int (CEF_CALLBACK *release)(struct _cef_base_t* self);
|
||||
|
||||
///
|
||||
// Returns the current number of references.
|
||||
///
|
||||
int (CEF_CALLBACK *get_refct)(struct _cef_base_t* self);
|
||||
} cef_base_t;
|
||||
|
||||
|
||||
// Check that the structure |s|, which is defined with a cef_base_t member named
|
||||
// |base|, is large enough to contain the specified member |f|.
|
||||
#define CEF_MEMBER_EXISTS(s, f) \
|
||||
((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= (s)->base.size)
|
||||
|
||||
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
|
@ -1,330 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a browser window. The functions of this structure
|
||||
// may be called on any thread unless otherwise indicated in the comments.
|
||||
///
|
||||
typedef struct _cef_browser_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Call this function before destroying a contained browser window. This
|
||||
// function performs any internal cleanup that may be needed before the
|
||||
// browser window is destroyed.
|
||||
///
|
||||
void (CEF_CALLBACK *parent_window_will_close)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Closes this browser window.
|
||||
///
|
||||
void (CEF_CALLBACK *close_browser)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the browser can navigate backwards.
|
||||
///
|
||||
int (CEF_CALLBACK *can_go_back)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Navigate backwards.
|
||||
///
|
||||
void (CEF_CALLBACK *go_back)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the browser can navigate forwards.
|
||||
///
|
||||
int (CEF_CALLBACK *can_go_forward)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Navigate forwards.
|
||||
///
|
||||
void (CEF_CALLBACK *go_forward)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Reload the current page.
|
||||
///
|
||||
void (CEF_CALLBACK *reload)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Reload the current page ignoring any cached data.
|
||||
///
|
||||
void (CEF_CALLBACK *reload_ignore_cache)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Stop loading the page.
|
||||
///
|
||||
void (CEF_CALLBACK *stop_load)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Set focus for the browser window. If |enable| is true (1) focus will be set
|
||||
// to the window. Otherwise, focus will be removed.
|
||||
///
|
||||
void (CEF_CALLBACK *set_focus)(struct _cef_browser_t* self, int enable);
|
||||
|
||||
///
|
||||
// Retrieve the window handle for this browser.
|
||||
///
|
||||
cef_window_handle_t (CEF_CALLBACK *get_window_handle)(
|
||||
struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Retrieve the window handle of the browser that opened this browser. Will
|
||||
// return NULL for non-popup windows. This function can be used in combination
|
||||
// with custom handling of modal windows.
|
||||
///
|
||||
cef_window_handle_t (CEF_CALLBACK *get_opener_window_handle)(
|
||||
struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns the globally unique identifier for this browser.
|
||||
///
|
||||
int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the window is a popup window.
|
||||
///
|
||||
int (CEF_CALLBACK *is_popup)(struct _cef_browser_t* self);
|
||||
|
||||
// Returns true (1) if a document has been loaded in the browser.
|
||||
int (CEF_CALLBACK *has_document)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns the client for this browser.
|
||||
///
|
||||
struct _cef_client_t* (CEF_CALLBACK *get_client)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns the main (top-level) frame for the browser window.
|
||||
///
|
||||
struct _cef_frame_t* (CEF_CALLBACK *get_main_frame)(
|
||||
struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns the focused frame for the browser window. This function should only
|
||||
// be called on the UI thread.
|
||||
///
|
||||
struct _cef_frame_t* (CEF_CALLBACK *get_focused_frame)(
|
||||
struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns the frame with the specified name, or NULL if not found. This
|
||||
// function should only be called on the UI thread.
|
||||
///
|
||||
struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_browser_t* self,
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Returns the names of all existing frames. This function should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self,
|
||||
cef_string_list_t names);
|
||||
|
||||
///
|
||||
// Search for |searchText|. |identifier| can be used to have multiple searches
|
||||
// running simultaniously. |forward| indicates whether to search forward or
|
||||
// backward within the page. |matchCase| indicates whether the search should
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up.
|
||||
///
|
||||
void (CEF_CALLBACK *find)(struct _cef_browser_t* self, int identifier,
|
||||
const cef_string_t* searchText, int forward, int matchCase,
|
||||
int findNext);
|
||||
|
||||
///
|
||||
// Cancel all searches that are currently going on.
|
||||
///
|
||||
void (CEF_CALLBACK *stop_finding)(struct _cef_browser_t* self,
|
||||
int clearSelection);
|
||||
|
||||
///
|
||||
// Get the current zoom level. The default zoom level is 0.0. This function
|
||||
// can only be called on the UI thread.
|
||||
///
|
||||
double (CEF_CALLBACK *get_zoom_level)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Change the zoom level to the specified value. Specify 0.0 to reset the zoom
|
||||
// level. The change will be applied asynchronously on the UI thread.
|
||||
///
|
||||
void (CEF_CALLBACK *set_zoom_level)(struct _cef_browser_t* self,
|
||||
double zoomLevel);
|
||||
|
||||
///
|
||||
// Clear the back/forward browsing history.
|
||||
///
|
||||
void (CEF_CALLBACK *clear_history)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Open developer tools in its own window.
|
||||
///
|
||||
void (CEF_CALLBACK *show_dev_tools)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Explicitly close the developer tools window if one exists for this browser
|
||||
// instance.
|
||||
///
|
||||
void (CEF_CALLBACK *close_dev_tools)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if window rendering is disabled.
|
||||
///
|
||||
int (CEF_CALLBACK *is_window_rendering_disabled)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Get the size of the specified element. This function should only be called
|
||||
// on the UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *get_size)(struct _cef_browser_t* self,
|
||||
enum cef_paint_element_type_t type, int* width, int* height);
|
||||
|
||||
///
|
||||
// Set the size of the specified element. This function is only used when
|
||||
// window rendering is disabled.
|
||||
///
|
||||
void (CEF_CALLBACK *set_size)(struct _cef_browser_t* self,
|
||||
enum cef_paint_element_type_t type, int width, int height);
|
||||
|
||||
///
|
||||
// Returns true (1) if a popup is currently visible. This function should only
|
||||
// be called on the UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *is_popup_visible)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Hide the currently visible popup, if any.
|
||||
///
|
||||
void (CEF_CALLBACK *hide_popup)(struct _cef_browser_t* self);
|
||||
|
||||
///
|
||||
// Invalidate the |dirtyRect| region of the view. This function is only used
|
||||
// when window rendering is disabled and will result in a call to
|
||||
// HandlePaint().
|
||||
///
|
||||
void (CEF_CALLBACK *invalidate)(struct _cef_browser_t* self,
|
||||
const cef_rect_t* dirtyRect);
|
||||
|
||||
///
|
||||
// Get the raw image data contained in the specified element without
|
||||
// performing validation. The specified |width| and |height| dimensions must
|
||||
// match the current element size. On Windows |buffer| must be width*height*4
|
||||
// bytes in size and represents a BGRA image with an upper-left origin. This
|
||||
// function should only be called on the UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *get_image)(struct _cef_browser_t* self,
|
||||
enum cef_paint_element_type_t type, int width, int height,
|
||||
void* buffer);
|
||||
|
||||
///
|
||||
// Send a key event to the browser.
|
||||
///
|
||||
void (CEF_CALLBACK *send_key_event)(struct _cef_browser_t* self,
|
||||
enum cef_key_type_t type, const struct _cef_key_info_t* keyInfo,
|
||||
int modifiers);
|
||||
|
||||
///
|
||||
// Send a mouse click event to the browser. The |x| and |y| coordinates are
|
||||
// relative to the upper-left corner of the view.
|
||||
///
|
||||
void (CEF_CALLBACK *send_mouse_click_event)(struct _cef_browser_t* self,
|
||||
int x, int y, enum cef_mouse_button_type_t type, int mouseUp,
|
||||
int clickCount);
|
||||
|
||||
///
|
||||
// Send a mouse move event to the browser. The |x| and |y| coordinates are
|
||||
// relative to the upper-left corner of the view.
|
||||
///
|
||||
void (CEF_CALLBACK *send_mouse_move_event)(struct _cef_browser_t* self, int x,
|
||||
int y, int mouseLeave);
|
||||
|
||||
///
|
||||
// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
|
||||
// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
|
||||
// values represent the movement delta in the X and Y directions respectively.
|
||||
///
|
||||
void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_t* self,
|
||||
int x, int y, int deltaX, int deltaY);
|
||||
|
||||
///
|
||||
// Send a focus event to the browser.
|
||||
///
|
||||
void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_t* self,
|
||||
int setFocus);
|
||||
|
||||
///
|
||||
// Send a capture lost event to the browser.
|
||||
///
|
||||
void (CEF_CALLBACK *send_capture_lost_event)(struct _cef_browser_t* self);
|
||||
} cef_browser_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new browser window using the window parameters specified by
|
||||
// |windowInfo|. All values will be copied internally and the actual window will
|
||||
// be created on the UI thread. This function call will not block.
|
||||
///
|
||||
CEF_EXPORT int cef_browser_create(cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t* client, const cef_string_t* url,
|
||||
const struct _cef_browser_settings_t* settings);
|
||||
|
||||
///
|
||||
// Create a new browser window using the window parameters specified by
|
||||
// |windowInfo|. This function should only be called on the UI thread.
|
||||
///
|
||||
CEF_EXPORT cef_browser_t* cef_browser_create_sync(cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t* client, const cef_string_t* url,
|
||||
const struct _cef_browser_settings_t* settings);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
@ -1,161 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to provide handler implementations.
|
||||
///
|
||||
typedef struct _cef_client_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Return the handler for browser life span events.
|
||||
///
|
||||
struct _cef_life_span_handler_t* (CEF_CALLBACK *get_life_span_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for browser load status events.
|
||||
///
|
||||
struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for browser request events.
|
||||
///
|
||||
struct _cef_request_handler_t* (CEF_CALLBACK *get_request_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for browser display state events.
|
||||
///
|
||||
struct _cef_display_handler_t* (CEF_CALLBACK *get_display_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for focus events.
|
||||
///
|
||||
struct _cef_focus_handler_t* (CEF_CALLBACK *get_focus_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for keyboard events.
|
||||
///
|
||||
struct _cef_keyboard_handler_t* (CEF_CALLBACK *get_keyboard_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for context menu events.
|
||||
///
|
||||
struct _cef_menu_handler_t* (CEF_CALLBACK *get_menu_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for browser permission events.
|
||||
///
|
||||
struct _cef_permission_handler_t* (CEF_CALLBACK *get_permission_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for printing events.
|
||||
///
|
||||
struct _cef_print_handler_t* (CEF_CALLBACK *get_print_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for find result events.
|
||||
///
|
||||
struct _cef_find_handler_t* (CEF_CALLBACK *get_find_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for JavaScript dialog events.
|
||||
///
|
||||
struct _cef_jsdialog_handler_t* (CEF_CALLBACK *get_jsdialog_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for V8 context events.
|
||||
///
|
||||
struct _cef_v8context_handler_t* (CEF_CALLBACK *get_v8context_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for off-screen rendering events.
|
||||
///
|
||||
struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for drag events.
|
||||
///
|
||||
struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for geolocation permissions requests. If no handler is
|
||||
// provided geolocation access will be denied by default.
|
||||
///
|
||||
struct _cef_geolocation_handler_t* (CEF_CALLBACK *get_geolocation_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for zoom events. If no handler is provided the default
|
||||
// zoom behavior will be used.
|
||||
///
|
||||
struct _cef_zoom_handler_t* (CEF_CALLBACK *get_zoom_handler)(
|
||||
struct _cef_client_t* self);
|
||||
} cef_client_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
|
@ -1,169 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to create and/or parse command line arguments. Arguments with
|
||||
// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches
|
||||
// will always precede any arguments without switch prefixes. Switches can
|
||||
// optionally have a value specified using the '=' delimiter (e.g.
|
||||
// "-switch=value"). An argument of "--" will terminate switch parsing with all
|
||||
// subsequent tokens, regardless of prefix, being interpreted as non-switch
|
||||
// arguments. Switch names are considered case-insensitive. This structure can
|
||||
// be used before cef_initialize() is called.
|
||||
///
|
||||
typedef struct _cef_command_line_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Initialize the command line with the specified |argc| and |argv| values.
|
||||
// The first argument must be the name of the program. This function is only
|
||||
// supported on non-Windows platforms.
|
||||
///
|
||||
void (CEF_CALLBACK *init_from_argv)(struct _cef_command_line_t* self,
|
||||
int argc, const char* const* argv);
|
||||
|
||||
///
|
||||
// Initialize the command line with the string returned by calling
|
||||
// GetCommandLineW(). This function is only supported on Windows.
|
||||
///
|
||||
void (CEF_CALLBACK *init_from_string)(struct _cef_command_line_t* self,
|
||||
const cef_string_t* command_line);
|
||||
|
||||
///
|
||||
// Constructs and returns the represented command line string. Use this
|
||||
// function cautiously because quoting behavior is unclear.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_command_line_string)(
|
||||
struct _cef_command_line_t* self);
|
||||
|
||||
///
|
||||
// Get the program part of the command line string (the first item).
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_program)(
|
||||
struct _cef_command_line_t* self);
|
||||
|
||||
///
|
||||
// Set the program part of the command line string (the first item).
|
||||
///
|
||||
void (CEF_CALLBACK *set_program)(struct _cef_command_line_t* self,
|
||||
const cef_string_t* program);
|
||||
|
||||
///
|
||||
// Returns true (1) if the command line has switches.
|
||||
///
|
||||
int (CEF_CALLBACK *has_switches)(struct _cef_command_line_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the command line contains the given switch.
|
||||
///
|
||||
int (CEF_CALLBACK *has_switch)(struct _cef_command_line_t* self,
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Returns the value associated with the given switch. If the switch has no
|
||||
// value or isn't present this function returns the NULL string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_switch_value)(
|
||||
struct _cef_command_line_t* self, const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Returns the map of switch names and values. If a switch has no value an
|
||||
// NULL string is returned.
|
||||
///
|
||||
void (CEF_CALLBACK *get_switches)(struct _cef_command_line_t* self,
|
||||
cef_string_map_t switches);
|
||||
|
||||
///
|
||||
// Add a switch to the end of the command line. If the switch has no value
|
||||
// pass an NULL value string.
|
||||
///
|
||||
void (CEF_CALLBACK *append_switch)(struct _cef_command_line_t* self,
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Add a switch with the specified value to the end of the command line.
|
||||
///
|
||||
void (CEF_CALLBACK *append_switch_with_value)(
|
||||
struct _cef_command_line_t* self, const cef_string_t* name,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
// True if there are remaining command line arguments.
|
||||
///
|
||||
int (CEF_CALLBACK *has_arguments)(struct _cef_command_line_t* self);
|
||||
|
||||
///
|
||||
// Get the remaining command line arguments.
|
||||
///
|
||||
void (CEF_CALLBACK *get_arguments)(struct _cef_command_line_t* self,
|
||||
cef_string_list_t arguments);
|
||||
|
||||
///
|
||||
// Add an argument to the end of the command line.
|
||||
///
|
||||
void (CEF_CALLBACK *append_argument)(struct _cef_command_line_t* self,
|
||||
const cef_string_t* argument);
|
||||
} cef_command_line_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_command_line_t instance.
|
||||
///
|
||||
CEF_EXPORT cef_command_line_t* cef_command_line_create();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
|
@ -1,80 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CONTENT_FILTER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_CONTENT_FILTER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure to implement for filtering response content. The functions of this
|
||||
// structure will always be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_content_filter_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Set |substitute_data| to the replacement for the data in |data| if data
|
||||
// should be modified.
|
||||
///
|
||||
void (CEF_CALLBACK *process_data)(struct _cef_content_filter_t* self,
|
||||
const void* data, int data_size,
|
||||
struct _cef_stream_reader_t** substitute_data);
|
||||
|
||||
///
|
||||
// Called when there is no more data to be processed. It is expected that
|
||||
// whatever data was retained in the last process_data() call, it should be
|
||||
// returned now by setting |remainder| if appropriate.
|
||||
///
|
||||
void (CEF_CALLBACK *drain)(struct _cef_content_filter_t* self,
|
||||
struct _cef_stream_reader_t** remainder);
|
||||
} cef_content_filter_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_CONTENT_FILTER_CAPI_H_
|
@ -1,158 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used for managing cookies. The functions of this structure may be
|
||||
// called on any thread unless otherwise indicated.
|
||||
///
|
||||
typedef struct _cef_cookie_manager_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Set the schemes supported by this manager. By default only "http" and
|
||||
// "https" schemes are supported. Must be called before any cookies are
|
||||
// accessed.
|
||||
///
|
||||
void (CEF_CALLBACK *set_supported_schemes)(struct _cef_cookie_manager_t* self,
|
||||
cef_string_list_t schemes);
|
||||
|
||||
///
|
||||
// Visit all cookies. The returned cookies are ordered by longest path, then
|
||||
// by earliest creation date. Returns false (0) if cookies cannot be accessed.
|
||||
///
|
||||
int (CEF_CALLBACK *visit_all_cookies)(struct _cef_cookie_manager_t* self,
|
||||
struct _cef_cookie_visitor_t* visitor);
|
||||
|
||||
///
|
||||
// Visit a subset of cookies. The results are filtered by the given url
|
||||
// scheme, host, domain and path. If |includeHttpOnly| is true (1) HTTP-only
|
||||
// cookies will also be included in the results. The returned cookies are
|
||||
// ordered by longest path, then by earliest creation date. Returns false (0)
|
||||
// if cookies cannot be accessed.
|
||||
///
|
||||
int (CEF_CALLBACK *visit_url_cookies)(struct _cef_cookie_manager_t* self,
|
||||
const cef_string_t* url, int includeHttpOnly,
|
||||
struct _cef_cookie_visitor_t* visitor);
|
||||
|
||||
///
|
||||
// Sets a cookie given a valid URL and explicit user-provided cookie
|
||||
// attributes. This function expects each attribute to be well-formed. It will
|
||||
// check for disallowed characters (e.g. the ';' character is disallowed
|
||||
// within the cookie value attribute) and will return false (0) without
|
||||
// setting the cookie if such characters are found. This function must be
|
||||
// called on the IO thread.
|
||||
///
|
||||
int (CEF_CALLBACK *set_cookie)(struct _cef_cookie_manager_t* self,
|
||||
const cef_string_t* url, const struct _cef_cookie_t* cookie);
|
||||
|
||||
///
|
||||
// Delete all cookies that match the specified parameters. If both |url| and
|
||||
// values |cookie_name| are specified all host and domain cookies matching
|
||||
// both will be deleted. If only |url| is specified all host cookies (but not
|
||||
// domain cookies) irrespective of path will be deleted. If |url| is NULL all
|
||||
// cookies for all hosts and domains will be deleted. Returns false (0) if a
|
||||
// non- NULL invalid URL is specified or if cookies cannot be accessed. This
|
||||
// function must be called on the IO thread.
|
||||
///
|
||||
int (CEF_CALLBACK *delete_cookies)(struct _cef_cookie_manager_t* self,
|
||||
const cef_string_t* url, const cef_string_t* cookie_name);
|
||||
|
||||
///
|
||||
// Sets the directory path that will be used for storing cookie data. If
|
||||
// |path| is NULL data will be stored in memory only. Returns false (0) if
|
||||
// cookies cannot be accessed.
|
||||
///
|
||||
int (CEF_CALLBACK *set_storage_path)(struct _cef_cookie_manager_t* self,
|
||||
const cef_string_t* path);
|
||||
} cef_cookie_manager_t;
|
||||
|
||||
|
||||
///
|
||||
// Returns the global cookie manager. By default data will be stored at
|
||||
// CefSettings.cache_path if specified or in memory otherwise.
|
||||
///
|
||||
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager();
|
||||
|
||||
///
|
||||
// Creates a new cookie manager. If |path| is NULL data will be stored in memory
|
||||
// only. Returns NULL if creation fails.
|
||||
///
|
||||
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
|
||||
const cef_string_t* path);
|
||||
|
||||
|
||||
///
|
||||
// Structure to implement for visiting cookie values. The functions of this
|
||||
// structure will always be called on the IO thread.
|
||||
///
|
||||
typedef struct _cef_cookie_visitor_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Method that will be called once for each cookie. |count| is the 0-based
|
||||
// index for the current cookie. |total| is the total number of cookies. Set
|
||||
// |deleteCookie| to true (1) to delete the cookie currently being visited.
|
||||
// Return false (0) to stop visiting cookies. This function may never be
|
||||
// called if no cookies are found.
|
||||
///
|
||||
int (CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t* self,
|
||||
const struct _cef_cookie_t* cookie, int count, int total,
|
||||
int* deleteCookie);
|
||||
} cef_cookie_visitor_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
|
@ -1,123 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser display state.
|
||||
// The functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_display_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when the navigation state has changed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_nav_state_change)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, int canGoBack, int canGoForward);
|
||||
|
||||
///
|
||||
// Called when a frame's address has changed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_address_change)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const cef_string_t* url);
|
||||
|
||||
///
|
||||
// Called when the size of the content area has changed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_contents_size_change)(
|
||||
struct _cef_display_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, int width, int height);
|
||||
|
||||
///
|
||||
// Called when the page title changes.
|
||||
///
|
||||
void (CEF_CALLBACK *on_title_change)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* title);
|
||||
|
||||
///
|
||||
// Called when the Favicon URL for a page changes.
|
||||
///
|
||||
void (CEF_CALLBACK *on_favicon_urlchange)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_string_list_t icon_urls);
|
||||
|
||||
///
|
||||
// Called when the browser is about to display a tooltip. |text| contains the
|
||||
// text that will be displayed in the tooltip. To handle the display of the
|
||||
// tooltip yourself return true (1). Otherwise, you can optionally modify
|
||||
// |text| and then return false (0) to allow the browser to display the
|
||||
// tooltip.
|
||||
///
|
||||
int (CEF_CALLBACK *on_tooltip)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_string_t* text);
|
||||
|
||||
///
|
||||
// Called when the browser receives a status message. |text| contains the text
|
||||
// that will be displayed in the status message and |type| indicates the
|
||||
// status message type.
|
||||
///
|
||||
void (CEF_CALLBACK *on_status_message)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* value,
|
||||
enum cef_handler_statustype_t type);
|
||||
|
||||
///
|
||||
// Called to display a console message. Return true (1) to stop the message
|
||||
// from being output to the console.
|
||||
///
|
||||
int (CEF_CALLBACK *on_console_message)(struct _cef_display_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* message,
|
||||
const cef_string_t* source, int line);
|
||||
} cef_display_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
|
@ -1,441 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure to implement for visiting the DOM. The functions of this structure
|
||||
// will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_domvisitor_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Method executed for visiting the DOM. The document object passed to this
|
||||
// function represents a snapshot of the DOM at the time this function is
|
||||
// executed. DOM objects are only valid for the scope of this function. Do not
|
||||
// keep references to or attempt to access any DOM objects outside the scope
|
||||
// of this function.
|
||||
///
|
||||
void (CEF_CALLBACK *visit)(struct _cef_domvisitor_t* self,
|
||||
struct _cef_domdocument_t* document);
|
||||
} cef_domvisitor_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a DOM document. The functions of this structure
|
||||
// should only be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_domdocument_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the document type.
|
||||
///
|
||||
enum cef_dom_document_type_t (CEF_CALLBACK *get_type)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the root document node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_document)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the BODY node of an HTML document.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_body)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the HEAD node of an HTML document.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_head)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the title of an HTML document.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_title)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the document element with the specified ID value.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_element_by_id)(
|
||||
struct _cef_domdocument_t* self, const cef_string_t* id);
|
||||
|
||||
///
|
||||
// Returns the node that currently has keyboard focus.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_focused_node)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if a portion of the document is selected.
|
||||
///
|
||||
int (CEF_CALLBACK *has_selection)(struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the selection start node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_selection_start_node)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the selection offset within the start node.
|
||||
///
|
||||
int (CEF_CALLBACK *get_selection_start_offset)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the selection end node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_selection_end_node)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the selection offset within the end node.
|
||||
///
|
||||
int (CEF_CALLBACK *get_selection_end_offset)(struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the contents of this selection as markup.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_selection_as_markup)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the contents of this selection as text.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_selection_as_text)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns the base URL for the document.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_base_url)(
|
||||
struct _cef_domdocument_t* self);
|
||||
|
||||
///
|
||||
// Returns a complete URL based on the document base URL and the specified
|
||||
// partial URL.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_complete_url)(
|
||||
struct _cef_domdocument_t* self, const cef_string_t* partialURL);
|
||||
} cef_domdocument_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a DOM node. The functions of this structure
|
||||
// should only be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_domnode_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the type for this node.
|
||||
///
|
||||
enum cef_dom_node_type_t (CEF_CALLBACK *get_type)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this is a text node.
|
||||
///
|
||||
int (CEF_CALLBACK *is_text)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this is an element node.
|
||||
///
|
||||
int (CEF_CALLBACK *is_element)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this is a form control element node.
|
||||
///
|
||||
int (CEF_CALLBACK *is_form_control_element)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the type of this form control element node.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_form_control_element_type)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is pointing to the same handle as |that|
|
||||
// object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_domnode_t* self,
|
||||
struct _cef_domnode_t* that);
|
||||
|
||||
///
|
||||
// Returns the name of this node.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the value of this node.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_value)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Set the value of this node. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_domnode_t* self,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Returns the contents of this node as markup.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_as_markup)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the document associated with this node.
|
||||
///
|
||||
struct _cef_domdocument_t* (CEF_CALLBACK *get_document)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the parent node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_parent)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the previous sibling node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_previous_sibling)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the next sibling node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_next_sibling)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this node has child nodes.
|
||||
///
|
||||
int (CEF_CALLBACK *has_children)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Return the first child node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_first_child)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns the last child node.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_last_child)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Add an event listener to this node for the specified event type. If
|
||||
// |useCapture| is true (1) then this listener will be considered a capturing
|
||||
// listener. Capturing listeners will recieve all events of the specified type
|
||||
// before the events are dispatched to any other event targets beneath the
|
||||
// current node in the tree. Events which are bubbling upwards through the
|
||||
// tree will not trigger a capturing listener. Separate calls to this function
|
||||
// can be used to register the same listener with and without capture. See
|
||||
// WebCore/dom/EventNames.h for the list of supported event types.
|
||||
///
|
||||
void (CEF_CALLBACK *add_event_listener)(struct _cef_domnode_t* self,
|
||||
const cef_string_t* eventType, struct _cef_domevent_listener_t* listener,
|
||||
int useCapture);
|
||||
|
||||
|
||||
// The following functions are valid only for element nodes.
|
||||
|
||||
///
|
||||
// Returns the tag name of this element.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_element_tag_name)(
|
||||
struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this element has attributes.
|
||||
///
|
||||
int (CEF_CALLBACK *has_element_attributes)(struct _cef_domnode_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this element has an attribute named |attrName|.
|
||||
///
|
||||
int (CEF_CALLBACK *has_element_attribute)(struct _cef_domnode_t* self,
|
||||
const cef_string_t* attrName);
|
||||
|
||||
///
|
||||
// Returns the element attribute named |attrName|.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_element_attribute)(
|
||||
struct _cef_domnode_t* self, const cef_string_t* attrName);
|
||||
|
||||
///
|
||||
// Returns a map of all element attributes.
|
||||
///
|
||||
void (CEF_CALLBACK *get_element_attributes)(struct _cef_domnode_t* self,
|
||||
cef_string_map_t attrMap);
|
||||
|
||||
///
|
||||
// Set the value for the element attribute named |attrName|. Returns true (1)
|
||||
// on success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_element_attribute)(struct _cef_domnode_t* self,
|
||||
const cef_string_t* attrName, const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Returns the inner text of the element.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)(
|
||||
struct _cef_domnode_t* self);
|
||||
} cef_domnode_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a DOM event. The functions of this structure
|
||||
// should only be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_domevent_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the event type.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_type)(struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns the event category.
|
||||
///
|
||||
enum cef_dom_event_category_t (CEF_CALLBACK *get_category)(
|
||||
struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns the event processing phase.
|
||||
///
|
||||
enum cef_dom_event_phase_t (CEF_CALLBACK *get_phase)(
|
||||
struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the event can bubble up the tree.
|
||||
///
|
||||
int (CEF_CALLBACK *can_bubble)(struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the event can be canceled.
|
||||
///
|
||||
int (CEF_CALLBACK *can_cancel)(struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns the document associated with this event.
|
||||
///
|
||||
struct _cef_domdocument_t* (CEF_CALLBACK *get_document)(
|
||||
struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns the target of the event.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_target)(
|
||||
struct _cef_domevent_t* self);
|
||||
|
||||
///
|
||||
// Returns the current target of the event.
|
||||
///
|
||||
struct _cef_domnode_t* (CEF_CALLBACK *get_current_target)(
|
||||
struct _cef_domevent_t* self);
|
||||
} cef_domevent_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure to implement for handling DOM events. The functions of this
|
||||
// structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_domevent_listener_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when an event is received. The event object passed to this function
|
||||
// contains a snapshot of the DOM at the time this function is executed. DOM
|
||||
// objects are only valid for the scope of this function. Do not keep
|
||||
// references to or attempt to access any DOM objects outside the scope of
|
||||
// this function.
|
||||
///
|
||||
void (CEF_CALLBACK *handle_event)(struct _cef_domevent_listener_t* self,
|
||||
struct _cef_domevent_t* event);
|
||||
} cef_domevent_listener_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
|
@ -1,77 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to handle file downloads. The functions of this structure will
|
||||
// always be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_download_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// A portion of the file contents have been received. This function will be
|
||||
// called multiple times until the download is complete. Return |true (1)| to
|
||||
// continue receiving data and |false (0)| to cancel.
|
||||
///
|
||||
int (CEF_CALLBACK *received_data)(struct _cef_download_handler_t* self,
|
||||
void* data, int data_size);
|
||||
|
||||
///
|
||||
// The download is complete.
|
||||
///
|
||||
void (CEF_CALLBACK *complete)(struct _cef_download_handler_t* self);
|
||||
} cef_download_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
|
@ -1,136 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent drag data. The functions of this structure may be
|
||||
// called on any thread.
|
||||
///
|
||||
typedef struct _cef_drag_data_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if the drag data is a link.
|
||||
///
|
||||
int (CEF_CALLBACK *is_link)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the drag data is a text or html fragment.
|
||||
///
|
||||
int (CEF_CALLBACK *is_fragment)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the drag data is a file.
|
||||
///
|
||||
int (CEF_CALLBACK *is_file)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the link URL that is being dragged.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_link_url)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the title associated with the link being dragged.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_link_title)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the metadata, if any, associated with the link being dragged.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_link_metadata)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the plain text fragment that is being dragged.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_fragment_text)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the text/html fragment that is being dragged.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_fragment_html)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the base URL that the fragment came from. This value is used for
|
||||
// resolving relative URLs and may be NULL.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_fragment_base_url)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Return the name of the file being dragged out of the browser window.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_file_name)(
|
||||
struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Retrieve the list of file names that are being dragged into the browser
|
||||
// window.
|
||||
///
|
||||
int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self,
|
||||
cef_string_list_t names);
|
||||
} cef_drag_data_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
|
@ -1,84 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to dragging. The functions
|
||||
// of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_drag_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when the browser window initiates a drag event. |dragData| contains
|
||||
// the drag event data and |mask| represents the type of drag operation.
|
||||
// Return false (0) for default drag handling behavior or true (1) to cancel
|
||||
// the drag event.
|
||||
///
|
||||
int (CEF_CALLBACK *on_drag_start)(struct _cef_drag_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData,
|
||||
enum cef_drag_operations_mask_t mask);
|
||||
|
||||
///
|
||||
// Called when an external drag event enters the browser window. |dragData|
|
||||
// contains the drag event data and |mask| represents the type of drag
|
||||
// operation. Return false (0) for default drag handling behavior or true (1)
|
||||
// to cancel the drag event.
|
||||
///
|
||||
int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData,
|
||||
enum cef_drag_operations_mask_t mask);
|
||||
} cef_drag_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
|
@ -1,77 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to find results. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_find_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to report find results returned by cef_browser_t::find().
|
||||
// |identifer| is the identifier passed to cef_browser_t::find(), |count| is
|
||||
// the number of matches currently identified, |selectionRect| is the location
|
||||
// of where the match was found (in window coordinates), |activeMatchOrdinal|
|
||||
// is the current position in the search results, and |finalUpdate| is true
|
||||
// (1) if this is the last find notification.
|
||||
///
|
||||
void (CEF_CALLBACK *on_find_result)(struct _cef_find_handler_t* self,
|
||||
struct _cef_browser_t* browser, int identifier, int count,
|
||||
const cef_rect_t* selectionRect, int activeMatchOrdinal,
|
||||
int finalUpdate);
|
||||
} cef_find_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
|
@ -1,93 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to focus. The functions of
|
||||
// this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_focus_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when the browser component is about to loose focus. For instance, if
|
||||
// focus was on the last HTML element and the user pressed the TAB key. |next|
|
||||
// will be true (1) if the browser is giving focus to the next component and
|
||||
// false (0) if the browser is giving focus to the previous component.
|
||||
///
|
||||
void (CEF_CALLBACK *on_take_focus)(struct _cef_focus_handler_t* self,
|
||||
struct _cef_browser_t* browser, int next);
|
||||
|
||||
///
|
||||
// Called when the browser component is requesting focus. |source| indicates
|
||||
// where the focus request is originating from. Return false (0) to allow the
|
||||
// focus to be set or true (1) to cancel setting the focus.
|
||||
///
|
||||
int (CEF_CALLBACK *on_set_focus)(struct _cef_focus_handler_t* self,
|
||||
struct _cef_browser_t* browser, enum cef_handler_focus_source_t source);
|
||||
|
||||
///
|
||||
// Called when a new node in the the browser gets focus. The |node| value may
|
||||
// be NULL if no specific node has gained focus. The node object passed to
|
||||
// this function represents a snapshot of the DOM at the time this function is
|
||||
// executed. DOM objects are only valid for the scope of this function. Do not
|
||||
// keep references to or attempt to access any DOM objects outside the scope
|
||||
// of this function.
|
||||
///
|
||||
void (CEF_CALLBACK *on_focused_node_changed)(
|
||||
struct _cef_focus_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, struct _cef_domnode_t* node);
|
||||
} cef_focus_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
|
@ -1,217 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a frame in the browser window. The functions of
|
||||
// this structure may be called on any thread unless otherwise indicated in the
|
||||
// comments.
|
||||
///
|
||||
typedef struct _cef_frame_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Execute undo in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *undo)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute redo in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *redo)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute cut in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *cut)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute copy in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *copy)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute paste in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *paste)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute delete in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *del)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute select all in this frame.
|
||||
///
|
||||
void (CEF_CALLBACK *select_all)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Execute printing in the this frame. The user will be prompted with the
|
||||
// print dialog appropriate to the operating system.
|
||||
///
|
||||
void (CEF_CALLBACK *print)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Save this frame's HTML source to a temporary file and open it in the
|
||||
// default text viewing application.
|
||||
///
|
||||
void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns this frame's HTML source as a string. This function should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_source)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns this frame's display text as a string. This function should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_text)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Load the request represented by the |request| object.
|
||||
///
|
||||
void (CEF_CALLBACK *load_request)(struct _cef_frame_t* self,
|
||||
struct _cef_request_t* request);
|
||||
|
||||
///
|
||||
// Load the specified |url|.
|
||||
///
|
||||
void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self,
|
||||
const cef_string_t* url);
|
||||
|
||||
///
|
||||
// Load the contents of |string_val| with the optional dummy target |url|.
|
||||
///
|
||||
void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self,
|
||||
const cef_string_t* string_val, const cef_string_t* url);
|
||||
|
||||
///
|
||||
// Load the contents of |stream| with the optional dummy target |url|.
|
||||
///
|
||||
void (CEF_CALLBACK *load_stream)(struct _cef_frame_t* self,
|
||||
struct _cef_stream_reader_t* stream, const cef_string_t* url);
|
||||
|
||||
///
|
||||
// Execute a string of JavaScript code in this frame. The |script_url|
|
||||
// parameter is the URL where the script in question can be found, if any. The
|
||||
// renderer may request this URL to show the developer the source of the
|
||||
// error. The |start_line| parameter is the base line number to use for error
|
||||
// reporting.
|
||||
///
|
||||
void (CEF_CALLBACK *execute_java_script)(struct _cef_frame_t* self,
|
||||
const cef_string_t* jsCode, const cef_string_t* scriptUrl,
|
||||
int startLine);
|
||||
|
||||
///
|
||||
// Returns true (1) if this is the main (top-level) frame.
|
||||
///
|
||||
int (CEF_CALLBACK *is_main)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this is the focused frame. This function should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *is_focused)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the name for this frame. If the frame has an assigned name (for
|
||||
// example, set via the iframe "name" attribute) then that value will be
|
||||
// returned. Otherwise a unique name will be constructed based on the frame
|
||||
// parent hierarchy. The main (top-level) frame will always have an NULL name
|
||||
// value.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the globally unique identifier for this frame.
|
||||
///
|
||||
int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the parent of this frame or NULL if this is the main (top-level)
|
||||
// frame. This function should only be called on the UI thread.
|
||||
///
|
||||
struct _cef_frame_t* (CEF_CALLBACK *get_parent)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the URL currently loaded in this frame.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the browser that this frame belongs to.
|
||||
///
|
||||
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(struct _cef_frame_t* self);
|
||||
|
||||
///
|
||||
// Visit the DOM document.
|
||||
///
|
||||
void (CEF_CALLBACK *visit_dom)(struct _cef_frame_t* self,
|
||||
struct _cef_domvisitor_t* visitor);
|
||||
|
||||
///
|
||||
// Get the V8 context associated with the frame. This function should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)(
|
||||
struct _cef_frame_t* self);
|
||||
} cef_frame_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
|
@ -1,80 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Request a one-time geolocation update. This function bypasses any user
|
||||
// permission checks so should only be used by code that is allowed to access
|
||||
// location information.
|
||||
///
|
||||
CEF_EXPORT int cef_get_geolocation(
|
||||
struct _cef_get_geolocation_callback_t* callback);
|
||||
|
||||
///
|
||||
// Implement this structure to receive geolocation updates. The functions of
|
||||
// this structure will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_get_geolocation_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called with the 'best available' location information or, if the location
|
||||
// update failed, with error information.
|
||||
///
|
||||
void (CEF_CALLBACK *on_location_update)(
|
||||
struct _cef_get_geolocation_callback_t* self,
|
||||
const struct _cef_geoposition_t* position);
|
||||
} cef_get_geolocation_callback_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_
|
@ -1,104 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Callback structure used for asynchronous continuation of geolocation
|
||||
// permission requests.
|
||||
///
|
||||
typedef struct _cef_geolocation_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Call to allow or deny geolocation access.
|
||||
///
|
||||
void (CEF_CALLBACK *cont)(struct _cef_geolocation_callback_t* self,
|
||||
int allow);
|
||||
} cef_geolocation_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to geolocation permission
|
||||
// requests. The functions of this structure will be called on the browser
|
||||
// process UI thread.
|
||||
///
|
||||
typedef struct _cef_geolocation_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when a page requests permission to access geolocation information.
|
||||
// |requesting_url| is the URL requesting permission and |request_id| is the
|
||||
// unique ID for the permission request. Call
|
||||
// cef_geolocation_callback_t::Continue to allow or deny the permission
|
||||
// request.
|
||||
///
|
||||
void (CEF_CALLBACK *on_request_geolocation_permission)(
|
||||
struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,
|
||||
const cef_string_t* requesting_url, int request_id,
|
||||
struct _cef_geolocation_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called when a geolocation access request is canceled. |requesting_url| is
|
||||
// the URL that originally requested permission and |request_id| is the unique
|
||||
// ID for the permission request.
|
||||
///
|
||||
void (CEF_CALLBACK *on_cancel_geolocation_permission)(
|
||||
struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,
|
||||
const cef_string_t* requesting_url, int request_id);
|
||||
} cef_geolocation_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_
|
@ -1,92 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to JavaScript dialogs. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_jsdialog_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to run a JavaScript alert message. Return false (0) to display the
|
||||
// default alert or true (1) if you displayed a custom alert.
|
||||
///
|
||||
int (CEF_CALLBACK *on_jsalert)(struct _cef_jsdialog_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const cef_string_t* message);
|
||||
|
||||
///
|
||||
// Called to run a JavaScript confirm request. Return false (0) to display the
|
||||
// default alert or true (1) if you displayed a custom alert. If you handled
|
||||
// the alert set |retval| to true (1) if the user accepted the confirmation.
|
||||
///
|
||||
int (CEF_CALLBACK *on_jsconfirm)(struct _cef_jsdialog_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const cef_string_t* message, int* retval);
|
||||
|
||||
///
|
||||
// Called to run a JavaScript prompt request. Return false (0) to display the
|
||||
// default prompt or true (1) if you displayed a custom prompt. If you handled
|
||||
// the prompt set |retval| to true (1) if the user accepted the prompt and
|
||||
// request and |result| to the resulting value.
|
||||
///
|
||||
int (CEF_CALLBACK *on_jsprompt)(struct _cef_jsdialog_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const cef_string_t* message, const cef_string_t* defaultValue,
|
||||
int* retval, cef_string_t* result);
|
||||
} cef_jsdialog_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
|
@ -1,82 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to keyboard input. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_keyboard_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when the browser component receives a keyboard event. This function
|
||||
// is called both before the event is passed to the renderer and after
|
||||
// JavaScript in the page has had a chance to handle the event. |type| is the
|
||||
// type of keyboard event, |code| is the windows scan-code for the event,
|
||||
// |modifiers| is a set of bit- flags describing any pressed modifier keys and
|
||||
// |isSystemKey| is true (1) if Windows considers this a 'system key' message
|
||||
// (see http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx). If
|
||||
// |isAfterJavaScript| is true (1) then JavaScript in the page has had a
|
||||
// chance to handle the event and has chosen not to. Only RAWKEYDOWN, KEYDOWN
|
||||
// and CHAR events will be sent with |isAfterJavaScript| set to true (1).
|
||||
// Return true (1) if the keyboard event was handled or false (0) to allow
|
||||
// continued handling of the event by the renderer.
|
||||
///
|
||||
int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self,
|
||||
struct _cef_browser_t* browser, enum cef_handler_keyevent_type_t type,
|
||||
int code, int modifiers, int isSystemKey, int isAfterJavaScript);
|
||||
} cef_keyboard_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
|
@ -1,114 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser life span. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_life_span_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called before a new popup window is created. The |parentBrowser| parameter
|
||||
// will point to the parent browser window. The |popupFeatures| parameter will
|
||||
// contain information about the style of popup window requested. Return false
|
||||
// (0) to have the framework create the new popup window based on the
|
||||
// parameters in |windowInfo|. Return true (1) to cancel creation of the popup
|
||||
// window. By default, a newly created popup window will have the same client
|
||||
// and settings as the parent window. To change the client for the new window
|
||||
// modify the object that |client| points to. To change the settings for the
|
||||
// new window modify the |settings| structure.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* parentBrowser,
|
||||
const struct _cef_popup_features_t* popupFeatures,
|
||||
struct _cef_window_info_t* windowInfo, const cef_string_t* url,
|
||||
struct _cef_client_t** client,
|
||||
struct _cef_browser_settings_t* settings);
|
||||
|
||||
///
|
||||
// Called after a new window is created.
|
||||
///
|
||||
void (CEF_CALLBACK *on_after_created)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called when a modal window is about to display and the modal loop should
|
||||
// begin running. Return false (0) to use the default modal loop
|
||||
// implementation or true (1) to use a custom implementation.
|
||||
///
|
||||
int (CEF_CALLBACK *run_modal)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called when a window has recieved a request to close. Return false (0) to
|
||||
// proceed with the window close or true (1) to cancel the window close. If
|
||||
// this is a modal window and a custom modal loop implementation was provided
|
||||
// in run_modal() this callback should be used to restore the opener window to
|
||||
// a usable state.
|
||||
///
|
||||
int (CEF_CALLBACK *do_close)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Called just before a window is closed. If this is a modal window and a
|
||||
// custom modal loop implementation was provided in run_modal() this callback
|
||||
// should be used to exit the custom modal loop.
|
||||
///
|
||||
void (CEF_CALLBACK *on_before_close)(struct _cef_life_span_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
} cef_life_span_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
|
@ -1,99 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser load status. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_load_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when the browser begins loading a frame. The |frame| value will
|
||||
// never be NULL -- call the is_main() function to check if this frame is the
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This
|
||||
// function may not be called for a particular frame if the load request for
|
||||
// that frame fails.
|
||||
///
|
||||
void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame);
|
||||
|
||||
///
|
||||
// Called when the browser is done loading a frame. The |frame| value will
|
||||
// never be NULL -- call the is_main() function to check if this frame is the
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This
|
||||
// function will always be called for all frames irrespective of whether the
|
||||
// request completes successfully.
|
||||
///
|
||||
void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
int httpStatusCode);
|
||||
|
||||
///
|
||||
// Called when the browser fails to load a resource. |errorCode| is the error
|
||||
// code number and |failedUrl| is the URL that failed to load. To provide
|
||||
// custom error text assign the text to |errorText| and return true (1).
|
||||
// Otherwise, return false (0) for the default error text. See
|
||||
// net\base\net_error_list.h for complete descriptions of the error codes.
|
||||
///
|
||||
int (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
enum cef_handler_errorcode_t errorCode, const cef_string_t* failedUrl,
|
||||
cef_string_t* errorText);
|
||||
} cef_load_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
|
@ -1,88 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_MENU_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_MENU_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser context menus.
|
||||
// The functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_menu_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called before a context menu is displayed. Return false (0) to display the
|
||||
// default context menu or true (1) to cancel the display.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_menu)(struct _cef_menu_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const struct _cef_menu_info_t* menuInfo);
|
||||
|
||||
///
|
||||
// Called to optionally override the default text for a context menu item.
|
||||
// |label| contains the default text and may be modified to substitute
|
||||
// alternate text.
|
||||
///
|
||||
void (CEF_CALLBACK *get_menu_label)(struct _cef_menu_handler_t* self,
|
||||
struct _cef_browser_t* browser, enum cef_menu_id_t menuId,
|
||||
cef_string_t* label);
|
||||
|
||||
///
|
||||
// Called when an option is selected from the default context menu. Return
|
||||
// false (0) to execute the default action or true (1) to cancel the action.
|
||||
///
|
||||
int (CEF_CALLBACK *on_menu_action)(struct _cef_menu_handler_t* self,
|
||||
struct _cef_browser_t* browser, enum cef_menu_id_t menuId);
|
||||
} cef_menu_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_MENU_HANDLER_CAPI_H_
|
@ -1,49 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_NPLUGIN_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_NPLUGIN_CAPI_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_nplugin_types.h"
|
||||
|
||||
///
|
||||
// Register a plugin with the system. Returns true (1) on success.
|
||||
///
|
||||
CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_NPLUGIN_CAPI_H_
|
@ -1,105 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Add an entry to the cross-origin access whitelist.
|
||||
//
|
||||
// The same-origin policy restricts how scripts hosted from different origins
|
||||
// (scheme + domain + port) can communicate. By default, scripts can only access
|
||||
// resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes
|
||||
// (but no other schemes) can use the "Access-Control-Allow-Origin" header to
|
||||
// allow cross-origin requests. For example, https://source.example.com can make
|
||||
// XMLHttpRequest requests on http://target.example.com if the
|
||||
// http://target.example.com request returns an "Access-Control-Allow-Origin:
|
||||
// https://source.example.com" response header.
|
||||
//
|
||||
// Scripts in separate frames or iframes and hosted from the same protocol and
|
||||
// domain suffix can execute cross-origin JavaScript if both pages set the
|
||||
// document.domain value to the same domain suffix. For example,
|
||||
// scheme://foo.example.com and scheme://bar.example.com can communicate using
|
||||
// JavaScript if both domains set document.domain="example.com".
|
||||
//
|
||||
// This function is used to allow access to origins that would otherwise violate
|
||||
// the same-origin policy. Scripts hosted underneath the fully qualified
|
||||
// |source_origin| URL (like http://www.example.com) will be allowed access to
|
||||
// all resources hosted on the specified |target_protocol| and |target_domain|.
|
||||
// If |target_domain| is non-NULL and |allow_target_subdomains| if false (0)
|
||||
// only exact domain matches will be allowed. If |target_domain| is non-NULL and
|
||||
// |allow_target_subdomains| is true (1) sub-domain matches will be allowed. If
|
||||
// |target_domain| is NULL and |allow_target_subdomains| if true (1) all domains
|
||||
// and IP addresses will be allowed.
|
||||
//
|
||||
// This function cannot be used to bypass the restrictions on local or display
|
||||
// isolated schemes. See the comments on CefRegisterCustomScheme for more
|
||||
// information.
|
||||
//
|
||||
// This function may be called on any thread. Returns false (0) if
|
||||
// |source_origin| is invalid or the whitelist cannot be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_add_cross_origin_whitelist_entry(
|
||||
const cef_string_t* source_origin, const cef_string_t* target_protocol,
|
||||
const cef_string_t* target_domain, int allow_target_subdomains);
|
||||
|
||||
///
|
||||
// Remove an entry from the cross-origin access whitelist. Returns false (0) if
|
||||
// |source_origin| is invalid or the whitelist cannot be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_remove_cross_origin_whitelist_entry(
|
||||
const cef_string_t* source_origin, const cef_string_t* target_protocol,
|
||||
const cef_string_t* target_domain, int allow_target_subdomains);
|
||||
|
||||
///
|
||||
// Remove all entries from the cross-origin access whitelist. Returns false (0)
|
||||
// if the whitelist cannot be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_clear_cross_origin_whitelist();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
|
@ -1,72 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser permissions. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_permission_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called on the UI thread before a script extension is loaded. Return false
|
||||
// (0) to let the extension load normally.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_script_extension_load)(
|
||||
struct _cef_permission_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, const cef_string_t* extensionName);
|
||||
} cef_permission_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
|
@ -1,96 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to printing. The functions
|
||||
// of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_print_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to allow customization of standard print options before the print
|
||||
// dialog is displayed. |printOptions| allows specification of paper size,
|
||||
// orientation and margins. Note that the specified margins may be adjusted if
|
||||
// they are outside the range supported by the printer. All units are in
|
||||
// inches. Return false (0) to display the default print options or true (1)
|
||||
// to display the modified |printOptions|.
|
||||
///
|
||||
int (CEF_CALLBACK *get_print_options)(struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_print_options_t* printOptions);
|
||||
|
||||
///
|
||||
// Called to format print headers and footers. |printInfo| contains platform-
|
||||
// specific information about the printer context. |url| is the URL if the
|
||||
// currently printing page, |title| is the title of the currently printing
|
||||
// page, |currentPage| is the current page number and |maxPages| is the total
|
||||
// number of pages. Six default header locations are provided by the
|
||||
// implementation: top left, top center, top right, bottom left, bottom center
|
||||
// and bottom right. To use one of these default locations just assign a
|
||||
// string to the appropriate variable. To draw the header and footer yourself
|
||||
// return true (1). Otherwise, populate the approprate variables and return
|
||||
// false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *get_print_header_footer)(struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const struct _cef_print_info_t* printInfo, const cef_string_t* url,
|
||||
const cef_string_t* title, int currentPage, int maxPages,
|
||||
cef_string_t* topLeft, cef_string_t* topCenter, cef_string_t* topRight,
|
||||
cef_string_t* bottomLeft, cef_string_t* bottomCenter,
|
||||
cef_string_t* bottomRight);
|
||||
} cef_print_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
|
@ -1,69 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_PROXY_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_PROXY_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle proxy resolution events.
|
||||
///
|
||||
typedef struct _cef_proxy_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to retrieve proxy information for the specified |url|.
|
||||
///
|
||||
void (CEF_CALLBACK *get_proxy_for_url)(struct _cef_proxy_handler_t* self,
|
||||
const cef_string_t* url, struct _cef_proxy_info_t* proxy_info);
|
||||
} cef_proxy_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_PROXY_HANDLER_CAPI_H_
|
@ -1,120 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events when window rendering is disabled.
|
||||
// The functions of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_render_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to retrieve the view rectangle which is relative to screen
|
||||
// coordinates. Return true (1) if the rectangle was provided.
|
||||
///
|
||||
int (CEF_CALLBACK *get_view_rect)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_rect_t* rect);
|
||||
|
||||
///
|
||||
// Called to retrieve the simulated screen rectangle. Return true (1) if the
|
||||
// rectangle was provided.
|
||||
///
|
||||
int (CEF_CALLBACK *get_screen_rect)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_rect_t* rect);
|
||||
|
||||
///
|
||||
// Called to retrieve the translation from view coordinates to actual screen
|
||||
// coordinates. Return true (1) if the screen coordinates were provided.
|
||||
///
|
||||
int (CEF_CALLBACK *get_screen_point)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, int viewX, int viewY, int* screenX,
|
||||
int* screenY);
|
||||
|
||||
///
|
||||
// Called when the browser wants to show or hide the popup widget. The popup
|
||||
// should be shown if |show| is true (1) and hidden if |show| is false (0).
|
||||
///
|
||||
void (CEF_CALLBACK *on_popup_show)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, int show);
|
||||
|
||||
///
|
||||
// Called when the browser wants to move or resize the popup widget. |rect|
|
||||
// contains the new location and size.
|
||||
///
|
||||
void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_rect_t* rect);
|
||||
|
||||
///
|
||||
// Called when an element should be painted. |type| indicates whether the
|
||||
// element is the view or the popup widget. |buffer| contains the pixel data
|
||||
// for the whole image. |dirtyRects| contains the set of rectangles that need
|
||||
// to be repainted. On Windows |buffer| will be width*height*4 bytes in size
|
||||
// and represents a BGRA image with an upper-left origin. The
|
||||
// cef_browser_tSettings.animation_frame_rate value controls the rate at which
|
||||
// this function is called.
|
||||
///
|
||||
void (CEF_CALLBACK *on_paint)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, enum cef_paint_element_type_t type,
|
||||
size_t dirtyRectsCount, cef_rect_t const* dirtyRects,
|
||||
const void* buffer);
|
||||
|
||||
///
|
||||
// Called when the browser window's cursor has changed.
|
||||
///
|
||||
void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self,
|
||||
struct _cef_browser_t* browser, cef_cursor_handle_t cursor);
|
||||
} cef_render_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
|
@ -1,261 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a web request. The functions of this structure
|
||||
// may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_request_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Get the fully qualified URL.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Set the fully qualified URL.
|
||||
///
|
||||
void (CEF_CALLBACK *set_url)(struct _cef_request_t* self,
|
||||
const cef_string_t* url);
|
||||
|
||||
///
|
||||
// Get the request function type. The value will default to POST if post data
|
||||
// is provided and GET otherwise.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_method)(struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Set the request function type.
|
||||
///
|
||||
void (CEF_CALLBACK *set_method)(struct _cef_request_t* self,
|
||||
const cef_string_t* method);
|
||||
|
||||
///
|
||||
// Get the post data.
|
||||
///
|
||||
struct _cef_post_data_t* (CEF_CALLBACK *get_post_data)(
|
||||
struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Set the post data.
|
||||
///
|
||||
void (CEF_CALLBACK *set_post_data)(struct _cef_request_t* self,
|
||||
struct _cef_post_data_t* postData);
|
||||
|
||||
///
|
||||
// Get the header values.
|
||||
///
|
||||
void (CEF_CALLBACK *get_header_map)(struct _cef_request_t* self,
|
||||
cef_string_multimap_t headerMap);
|
||||
|
||||
///
|
||||
// Set the header values.
|
||||
///
|
||||
void (CEF_CALLBACK *set_header_map)(struct _cef_request_t* self,
|
||||
cef_string_multimap_t headerMap);
|
||||
|
||||
///
|
||||
// Set all values at one time.
|
||||
///
|
||||
void (CEF_CALLBACK *set)(struct _cef_request_t* self, const cef_string_t* url,
|
||||
const cef_string_t* method, struct _cef_post_data_t* postData,
|
||||
cef_string_multimap_t headerMap);
|
||||
|
||||
///
|
||||
// Get the flags used in combination with cef_web_urlrequest_t.
|
||||
///
|
||||
enum cef_weburlrequest_flags_t (CEF_CALLBACK *get_flags)(
|
||||
struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Set the flags used in combination with cef_web_urlrequest_t.
|
||||
///
|
||||
void (CEF_CALLBACK *set_flags)(struct _cef_request_t* self,
|
||||
enum cef_weburlrequest_flags_t flags);
|
||||
|
||||
///
|
||||
// Set the URL to the first party for cookies used in combination with
|
||||
// cef_web_urlrequest_t.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_first_party_for_cookies)(
|
||||
struct _cef_request_t* self);
|
||||
|
||||
///
|
||||
// Get the URL to the first party for cookies used in combination with
|
||||
// cef_web_urlrequest_t.
|
||||
///
|
||||
void (CEF_CALLBACK *set_first_party_for_cookies)(struct _cef_request_t* self,
|
||||
const cef_string_t* url);
|
||||
} cef_request_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_request_t object.
|
||||
///
|
||||
CEF_EXPORT cef_request_t* cef_request_create();
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent post data for a web request. The functions of
|
||||
// this structure may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_post_data_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the number of existing post data elements.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_element_count)(struct _cef_post_data_t* self);
|
||||
|
||||
///
|
||||
// Retrieve the post data elements.
|
||||
///
|
||||
void (CEF_CALLBACK *get_elements)(struct _cef_post_data_t* self,
|
||||
size_t* elementsCount, struct _cef_post_data_element_t** elements);
|
||||
|
||||
///
|
||||
// Remove the specified post data element. Returns true (1) if the removal
|
||||
// succeeds.
|
||||
///
|
||||
int (CEF_CALLBACK *remove_element)(struct _cef_post_data_t* self,
|
||||
struct _cef_post_data_element_t* element);
|
||||
|
||||
///
|
||||
// Add the specified post data element. Returns true (1) if the add succeeds.
|
||||
///
|
||||
int (CEF_CALLBACK *add_element)(struct _cef_post_data_t* self,
|
||||
struct _cef_post_data_element_t* element);
|
||||
|
||||
///
|
||||
// Remove all existing post data elements.
|
||||
///
|
||||
void (CEF_CALLBACK *remove_elements)(struct _cef_post_data_t* self);
|
||||
} cef_post_data_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_post_data_t object.
|
||||
///
|
||||
CEF_EXPORT cef_post_data_t* cef_post_data_create();
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a single element in the request post data. The
|
||||
// functions of this structure may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_post_data_element_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Remove all contents from the post data element.
|
||||
///
|
||||
void (CEF_CALLBACK *set_to_empty)(struct _cef_post_data_element_t* self);
|
||||
|
||||
///
|
||||
// The post data element will represent a file.
|
||||
///
|
||||
void (CEF_CALLBACK *set_to_file)(struct _cef_post_data_element_t* self,
|
||||
const cef_string_t* fileName);
|
||||
|
||||
///
|
||||
// The post data element will represent bytes. The bytes passed in will be
|
||||
// copied.
|
||||
///
|
||||
void (CEF_CALLBACK *set_to_bytes)(struct _cef_post_data_element_t* self,
|
||||
size_t size, const void* bytes);
|
||||
|
||||
///
|
||||
// Return the type of this post data element.
|
||||
///
|
||||
enum cef_postdataelement_type_t (CEF_CALLBACK *get_type)(
|
||||
struct _cef_post_data_element_t* self);
|
||||
|
||||
///
|
||||
// Return the file name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_file)(
|
||||
struct _cef_post_data_element_t* self);
|
||||
|
||||
///
|
||||
// Return the number of bytes.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_bytes_count)(struct _cef_post_data_element_t* self);
|
||||
|
||||
///
|
||||
// Read up to |size| bytes into |bytes| and return the number of bytes
|
||||
// actually read.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_bytes)(struct _cef_post_data_element_t* self,
|
||||
size_t size, void* bytes);
|
||||
} cef_post_data_element_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_post_data_element_t object.
|
||||
///
|
||||
CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
|
@ -1,159 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser requests. The
|
||||
// functions of this structure will be called on the thread indicated.
|
||||
///
|
||||
typedef struct _cef_request_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called on the UI thread before browser navigation. Return true (1) to
|
||||
// cancel the navigation or false (0) to allow the navigation to proceed.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_browse)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
struct _cef_request_t* request, enum cef_handler_navtype_t navType,
|
||||
int isRedirect);
|
||||
|
||||
///
|
||||
// Called on the IO thread before a resource is loaded. To allow the resource
|
||||
// to load normally return false (0). To redirect the resource to a new url
|
||||
// populate the |redirectUrl| value and return false (0). To specify data for
|
||||
// the resource return a CefStream object in |resourceStream|, use the
|
||||
// |response| object to set mime type, HTTP status code and optional header
|
||||
// values, and return false (0). To cancel loading of the resource return true
|
||||
// (1). Any modifications to |request| will be observed. If the URL in
|
||||
// |request| is changed and |redirectUrl| is also set, the URL in |request|
|
||||
// will be used.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_resource_load)(
|
||||
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_request_t* request, cef_string_t* redirectUrl,
|
||||
struct _cef_stream_reader_t** resourceStream,
|
||||
struct _cef_response_t* response, int loadFlags);
|
||||
|
||||
///
|
||||
// Called on the IO thread when a resource load is redirected. The |old_url|
|
||||
// parameter will contain the old URL. The |new_url| parameter will contain
|
||||
// the new URL and can be changed if desired.
|
||||
///
|
||||
void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* old_url,
|
||||
cef_string_t* new_url);
|
||||
|
||||
///
|
||||
// Called on the UI thread after a response to the resource request is
|
||||
// received. Set |filter| if response content needs to be monitored and/or
|
||||
// modified as it arrives.
|
||||
///
|
||||
void (CEF_CALLBACK *on_resource_response)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* url,
|
||||
struct _cef_response_t* response,
|
||||
struct _cef_content_filter_t** filter);
|
||||
|
||||
///
|
||||
// Called on the IO thread to handle requests for URLs with an unknown
|
||||
// protocol component. Return true (1) to indicate that the request should
|
||||
// succeed because it was handled externally. Set |allowOSExecution| to true
|
||||
// (1) and return false (0) to attempt execution via the registered OS
|
||||
// protocol handler, if any. If false (0) is returned and either
|
||||
// |allow_os_execution| is false (0) or OS protocol handler execution fails
|
||||
// then the request will fail with an error condition. SECURITY WARNING: YOU
|
||||
// SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR
|
||||
// OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
|
||||
///
|
||||
int (CEF_CALLBACK *on_protocol_execution)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* url,
|
||||
int* allowOSExecution);
|
||||
|
||||
///
|
||||
// Called on the UI thread when a server indicates via the 'Content-
|
||||
// Disposition' header that a response represents a file to download.
|
||||
// |mimeType| is the mime type for the download, |fileName| is the suggested
|
||||
// target file name and |contentLength| is either the value of the 'Content-
|
||||
// Size' header or -1 if no size was provided. Set |handler| to the
|
||||
// cef_download_handler_t instance that will recieve the file contents. Return
|
||||
// true (1) to download the file or false (0) to cancel the file download.
|
||||
///
|
||||
int (CEF_CALLBACK *get_download_handler)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* mimeType,
|
||||
const cef_string_t* fileName, int64 contentLength,
|
||||
struct _cef_download_handler_t** handler);
|
||||
|
||||
///
|
||||
// Called on the IO thread when the browser needs credentials from the user.
|
||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||
// hostname and port number. Set |username| and |password| and return true (1)
|
||||
// to handle the request. Return false (0) to cancel the request.
|
||||
///
|
||||
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, int isProxy, const cef_string_t* host,
|
||||
int port, const cef_string_t* realm, const cef_string_t* scheme,
|
||||
cef_string_t* username, cef_string_t* password);
|
||||
|
||||
///
|
||||
// Called on the IO thread to retrieve the cookie manager. |main_url| is the
|
||||
// URL of the top-level frame. Cookies managers can be unique per browser or
|
||||
// shared across multiple browsers. The global cookie manager will be used if
|
||||
// this function returns NULL.
|
||||
///
|
||||
struct _cef_cookie_manager_t* (CEF_CALLBACK *get_cookie_manager)(
|
||||
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
|
||||
const cef_string_t* main_url);
|
||||
} cef_request_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
|
@ -1,95 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to implement a custom resource bundle structure. The functions
|
||||
// of this structure may be called on multiple threads.
|
||||
///
|
||||
typedef struct _cef_resource_bundle_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to retrieve a localized translation for the string specified by
|
||||
// |message_id|. To provide the translation set |string| to the translation
|
||||
// string and return true (1). To use the default translation return false
|
||||
// (0).
|
||||
//
|
||||
// WARNING: Be cautious when implementing this function. ID values are auto-
|
||||
// generated when CEF is built and may change between versions. Existing ID
|
||||
// values can be discovered by searching for *_strings.h in the
|
||||
// "obj/global_intermediate" build output directory.
|
||||
///
|
||||
int (CEF_CALLBACK *get_localized_string)(
|
||||
struct _cef_resource_bundle_handler_t* self, int message_id,
|
||||
cef_string_t* string);
|
||||
|
||||
///
|
||||
// Called to retrieve data for the resource specified by |resource_id|. To
|
||||
// provide the resource data set |data| and |data_size| to the data pointer
|
||||
// and size respectively and return true (1). To use the default resource data
|
||||
// return false (0). The resource data will not be copied and must remain
|
||||
// resident in memory.
|
||||
//
|
||||
// WARNING: Be cautious when implementing this function. ID values are auto-
|
||||
// generated when CEF is built and may change between versions. Existing ID
|
||||
// values can be discovered by searching for *_resources.h in the
|
||||
// "obj/global_intermediate" build output directory.
|
||||
///
|
||||
int (CEF_CALLBACK *get_data_resource)(
|
||||
struct _cef_resource_bundle_handler_t* self, int resource_id, void** data,
|
||||
size_t* data_size);
|
||||
} cef_resource_bundle_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
|
@ -1,119 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to represent a web response. The functions of this structure
|
||||
// may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_response_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Get the response status code.
|
||||
///
|
||||
int (CEF_CALLBACK *get_status)(struct _cef_response_t* self);
|
||||
|
||||
///
|
||||
// Set the response status code.
|
||||
///
|
||||
void (CEF_CALLBACK *set_status)(struct _cef_response_t* self, int status);
|
||||
|
||||
///
|
||||
// Get the response status text.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_status_text)(
|
||||
struct _cef_response_t* self);
|
||||
|
||||
///
|
||||
// Set the response status text.
|
||||
///
|
||||
void (CEF_CALLBACK *set_status_text)(struct _cef_response_t* self,
|
||||
const cef_string_t* statusText);
|
||||
|
||||
///
|
||||
// Get the response mime type.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_mime_type)(
|
||||
struct _cef_response_t* self);
|
||||
|
||||
///
|
||||
// Set the response mime type.
|
||||
///
|
||||
void (CEF_CALLBACK *set_mime_type)(struct _cef_response_t* self,
|
||||
const cef_string_t* mimeType);
|
||||
|
||||
///
|
||||
// Get the value for the specified response header field.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_header)(struct _cef_response_t* self,
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Get all response header fields.
|
||||
///
|
||||
void (CEF_CALLBACK *get_header_map)(struct _cef_response_t* self,
|
||||
cef_string_multimap_t headerMap);
|
||||
|
||||
///
|
||||
// Set all response header fields.
|
||||
///
|
||||
void (CEF_CALLBACK *set_header_map)(struct _cef_response_t* self,
|
||||
cef_string_multimap_t headerMap);
|
||||
} cef_response_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
|
@ -1,240 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Register a scheme handler factory for the specified |scheme_name| and
|
||||
// optional |domain_name|. An NULL |domain_name| value for a standard scheme
|
||||
// will cause the factory to match all domain names. The |domain_name| value
|
||||
// will be ignored for non-standard schemes. If |scheme_name| is a built-in
|
||||
// scheme and no handler is returned by |factory| then the built-in scheme
|
||||
// handler factory will be called. If |scheme_name| is a custom scheme the
|
||||
// CefRegisterCustomScheme() function should be called for that scheme. This
|
||||
// function may be called multiple times to change or remove the factory that
|
||||
// matches the specified |scheme_name| and optional |domain_name|. Returns false
|
||||
// (0) if an error occurs. This function may be called on any thread.
|
||||
///
|
||||
CEF_EXPORT int cef_register_scheme_handler_factory(
|
||||
const cef_string_t* scheme_name, const cef_string_t* domain_name,
|
||||
struct _cef_scheme_handler_factory_t* factory);
|
||||
|
||||
///
|
||||
// Clear all registered scheme handler factories. Returns false (0) on error.
|
||||
// This function may be called on any thread.
|
||||
///
|
||||
CEF_EXPORT int cef_clear_scheme_handler_factories();
|
||||
|
||||
///
|
||||
// Structure that manages custom scheme registrations.
|
||||
///
|
||||
typedef struct _cef_scheme_registrar_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Register a custom scheme. This function should not be called for the built-
|
||||
// in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
|
||||
//
|
||||
// If |is_standard| is true (1) the scheme will be treated as a standard
|
||||
// scheme. Standard schemes are subject to URL canonicalization and parsing
|
||||
// rules as defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1
|
||||
// available at http://www.ietf.org/rfc/rfc1738.txt
|
||||
//
|
||||
// In particular, the syntax for standard scheme URLs must be of the form:
|
||||
// <pre>
|
||||
// [scheme]://[username]:[password]@[host]:[port]/[url-path]
|
||||
// </pre> Standard scheme URLs must have a host component that is a fully
|
||||
// qualified domain name as defined in Section 3.5 of RFC 1034 [13] and
|
||||
// Section 2.1 of RFC 1123. These URLs will be canonicalized to
|
||||
// "scheme://host/path" in the simplest case and
|
||||
// "scheme://username:password@host:port/path" in the most explicit case. For
|
||||
// example, "scheme:host/path" and "scheme:///host/path" will both be
|
||||
// canonicalized to "scheme://host/path". The origin of a standard scheme URL
|
||||
// is the combination of scheme, host and port (i.e., "scheme://host:port" in
|
||||
// the most explicit case).
|
||||
//
|
||||
// For non-standard scheme URLs only the "scheme:" component is parsed and
|
||||
// canonicalized. The remainder of the URL will be passed to the handler as-
|
||||
// is. For example, "scheme:///some%20text" will remain the same. Non-standard
|
||||
// scheme URLs cannot be used as a target for form submission.
|
||||
//
|
||||
// If |is_local| is true (1) the scheme will be treated as local (i.e., with
|
||||
// the same security rules as those applied to "file" URLs). Normal pages
|
||||
// cannot link to or access local URLs. Also, by default, local URLs can only
|
||||
// perform XMLHttpRequest calls to the same URL (origin + path) that
|
||||
// originated the request. To allow XMLHttpRequest calls from a local URL to
|
||||
// other URLs with the same origin set the
|
||||
// CefSettings.file_access_from_file_urls_allowed value to true (1). To allow
|
||||
// XMLHttpRequest calls from a local URL to all origins set the
|
||||
// CefSettings.universal_access_from_file_urls_allowed value to true (1).
|
||||
//
|
||||
// If |is_display_isolated| is true (1) the scheme will be treated as display-
|
||||
// isolated. This means that pages cannot display these URLs unless they are
|
||||
// from the same scheme. For example, pages in another origin cannot create
|
||||
// iframes or hyperlinks to URLs with this scheme.
|
||||
//
|
||||
// This function may be called on any thread. It should only be called once
|
||||
// per unique |scheme_name| value. If |scheme_name| is already registered or
|
||||
// if an error occurs this function will return false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t* self,
|
||||
const cef_string_t* scheme_name, int is_standard, int is_local,
|
||||
int is_display_isolated);
|
||||
} cef_scheme_registrar_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure that creates cef_scheme_handler_t instances. The functions of this
|
||||
// structure will always be called on the IO thread.
|
||||
///
|
||||
typedef struct _cef_scheme_handler_factory_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Return a new scheme handler instance to handle the request. |browser| will
|
||||
// be the browser window that initiated the request. If the request was
|
||||
// initiated using the cef_web_urlrequest_t API |browser| will be NULL. The
|
||||
// |request| object passed to this function will not contain cookie data.
|
||||
///
|
||||
struct _cef_scheme_handler_t* (CEF_CALLBACK *create)(
|
||||
struct _cef_scheme_handler_factory_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* scheme_name,
|
||||
struct _cef_request_t* request);
|
||||
} cef_scheme_handler_factory_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to facilitate asynchronous responses to custom scheme handler
|
||||
// requests. The functions of this structure may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_scheme_handler_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Notify that header information is now available for retrieval.
|
||||
///
|
||||
void (CEF_CALLBACK *headers_available)(
|
||||
struct _cef_scheme_handler_callback_t* self);
|
||||
|
||||
///
|
||||
// Notify that response data is now available for reading.
|
||||
///
|
||||
void (CEF_CALLBACK *bytes_available)(
|
||||
struct _cef_scheme_handler_callback_t* self);
|
||||
|
||||
///
|
||||
// Cancel processing of the request.
|
||||
///
|
||||
void (CEF_CALLBACK *cancel)(struct _cef_scheme_handler_callback_t* self);
|
||||
} cef_scheme_handler_callback_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to implement a custom scheme handler structure. The functions
|
||||
// of this structure will always be called on the IO thread.
|
||||
///
|
||||
typedef struct _cef_scheme_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Begin processing the request. To handle the request return true (1) and
|
||||
// call headers_available() once the response header information is available
|
||||
// (headers_available() can also be called from inside this function if header
|
||||
// information is available immediately). To cancel the request return false
|
||||
// (0).
|
||||
///
|
||||
int (CEF_CALLBACK *process_request)(struct _cef_scheme_handler_t* self,
|
||||
struct _cef_request_t* request,
|
||||
struct _cef_scheme_handler_callback_t* callback);
|
||||
|
||||
///
|
||||
// Retrieve response header information. If the response length is not known
|
||||
// set |response_length| to -1 and read_response() will be called until it
|
||||
// returns false (0). If the response length is known set |response_length| to
|
||||
// a positive value and read_response() will be called until it returns false
|
||||
// (0) or the specified number of bytes have been read. Use the |response|
|
||||
// object to set the mime type, http status code and other optional header
|
||||
// values. To redirect the request to a new URL set |redirectUrl| to the new
|
||||
// URL.
|
||||
///
|
||||
void (CEF_CALLBACK *get_response_headers)(struct _cef_scheme_handler_t* self,
|
||||
struct _cef_response_t* response, int64* response_length,
|
||||
cef_string_t* redirectUrl);
|
||||
|
||||
///
|
||||
// Read response data. If data is available immediately copy up to
|
||||
// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
|
||||
// bytes copied, and return true (1). To read the data at a later time set
|
||||
// |bytes_read| to 0, return true (1) and call bytes_available() when the data
|
||||
// is available. To indicate response completion return false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *read_response)(struct _cef_scheme_handler_t* self,
|
||||
void* data_out, int bytes_to_read, int* bytes_read,
|
||||
struct _cef_scheme_handler_callback_t* callback);
|
||||
|
||||
///
|
||||
// Request processing has been canceled.
|
||||
///
|
||||
void (CEF_CALLBACK *cancel)(struct _cef_scheme_handler_t* self);
|
||||
} cef_scheme_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
|
@ -1,224 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure the client can implement to provide a custom stream reader. The
|
||||
// functions of this structure may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_read_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Read raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *read)(struct _cef_read_handler_t* self, void* ptr,
|
||||
size_t size, size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self);
|
||||
|
||||
///
|
||||
// Return non-zero if at end of file.
|
||||
///
|
||||
int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self);
|
||||
} cef_read_handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to read data from a stream. The functions of this structure
|
||||
// may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_stream_reader_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Read raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *read)(struct _cef_stream_reader_t* self, void* ptr,
|
||||
size_t size, size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self);
|
||||
|
||||
///
|
||||
// Return non-zero if at end of file.
|
||||
///
|
||||
int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self);
|
||||
} cef_stream_reader_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_stream_reader_t object from a file.
|
||||
///
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(
|
||||
const cef_string_t* fileName);
|
||||
|
||||
///
|
||||
// Create a new cef_stream_reader_t object from data.
|
||||
///
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
|
||||
size_t size);
|
||||
|
||||
///
|
||||
// Create a new cef_stream_reader_t object from a custom handler.
|
||||
///
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
|
||||
cef_read_handler_t* handler);
|
||||
|
||||
|
||||
///
|
||||
// Structure the client can implement to provide a custom stream writer. The
|
||||
// functions of this structure may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_write_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Write raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *write)(struct _cef_write_handler_t* self,
|
||||
const void* ptr, size_t size, size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self);
|
||||
|
||||
///
|
||||
// Flush the stream.
|
||||
///
|
||||
int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self);
|
||||
} cef_write_handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to write data to a stream. The functions of this structure may
|
||||
// be called on any thread.
|
||||
///
|
||||
typedef struct _cef_stream_writer_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Write raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *write)(struct _cef_stream_writer_t* self,
|
||||
const void* ptr, size_t size, size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self);
|
||||
|
||||
///
|
||||
// Flush the stream.
|
||||
///
|
||||
int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self);
|
||||
} cef_stream_writer_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_stream_writer_t object for a file.
|
||||
///
|
||||
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(
|
||||
const cef_string_t* fileName);
|
||||
|
||||
///
|
||||
// Create a new cef_stream_writer_t object for a custom handler.
|
||||
///
|
||||
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
|
||||
cef_write_handler_t* handler);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
|
@ -1,96 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// CEF maintains multiple internal threads that are used for handling different
|
||||
// types of tasks. The UI thread creates the browser window and is used for all
|
||||
// interaction with the WebKit rendering engine and V8 JavaScript engine (The UI
|
||||
// thread will be the same as the main application thread if cef_initialize() is
|
||||
// called with a CefSettings.multi_threaded_message_loop value of false (0).)
|
||||
// The IO thread is used for handling schema and network requests. The FILE
|
||||
// thread is used for the application cache and other miscellaneous activities.
|
||||
// This function will return true (1) if called on the specified thread.
|
||||
///
|
||||
CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId);
|
||||
|
||||
///
|
||||
// Post a task for execution on the specified thread. This function may be
|
||||
// called on any thread.
|
||||
///
|
||||
CEF_EXPORT int cef_post_task(cef_thread_id_t threadId,
|
||||
struct _cef_task_t* task);
|
||||
|
||||
///
|
||||
// Post a task for delayed execution on the specified thread. This function may
|
||||
// be called on any thread.
|
||||
///
|
||||
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
|
||||
struct _cef_task_t* task, int64 delay_ms);
|
||||
|
||||
///
|
||||
// Implement this structure for task execution. The functions of this structure
|
||||
// may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_task_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Method that will be executed. |threadId| is the thread executing the call.
|
||||
///
|
||||
void (CEF_CALLBACK *execute)(struct _cef_task_t* self,
|
||||
cef_thread_id_t threadId);
|
||||
} cef_task_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
|
@ -1,67 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Parse the specified |url| into its component parts. Returns false (0) if the
|
||||
// URL is NULL or invalid.
|
||||
///
|
||||
CEF_EXPORT int cef_parse_url(const cef_string_t* url,
|
||||
struct _cef_urlparts_t* parts);
|
||||
|
||||
///
|
||||
// Creates a URL from the specified |parts|, which must contain a non-NULL spec
|
||||
// or a non-NULL host and path (at a minimum), but not both. Returns false (0)
|
||||
// if |parts| isn't initialized as described.
|
||||
///
|
||||
CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
|
||||
cef_string_t* url);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
|
@ -1,815 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Register a new V8 extension with the specified JavaScript extension code and
|
||||
// handler. Functions implemented by the handler are prototyped using the
|
||||
// keyword 'native'. The calling of a native function is restricted to the scope
|
||||
// in which the prototype of the native function is defined. This function may
|
||||
// be called on any thread.
|
||||
//
|
||||
// Example JavaScript extension code: <pre>
|
||||
// // create the 'example' global object if it doesn't already exist.
|
||||
// if (!example)
|
||||
// example = {};
|
||||
// // create the 'example.test' global object if it doesn't already exist.
|
||||
// if (!example.test)
|
||||
// example.test = {};
|
||||
// (function() {
|
||||
// // Define the function 'example.test.myfunction'.
|
||||
// example.test.myfunction = function() {
|
||||
// // Call CefV8Handler::Execute() with the function name 'MyFunction'
|
||||
// // and no arguments.
|
||||
// native function MyFunction();
|
||||
// return MyFunction();
|
||||
// };
|
||||
// // Define the getter function for parameter 'example.test.myparam'.
|
||||
// example.test.__defineGetter__('myparam', function() {
|
||||
// // Call CefV8Handler::Execute() with the function name 'GetMyParam'
|
||||
// // and no arguments.
|
||||
// native function GetMyParam();
|
||||
// return GetMyParam();
|
||||
// });
|
||||
// // Define the setter function for parameter 'example.test.myparam'.
|
||||
// example.test.__defineSetter__('myparam', function(b) {
|
||||
// // Call CefV8Handler::Execute() with the function name 'SetMyParam'
|
||||
// // and a single argument.
|
||||
// native function SetMyParam();
|
||||
// if(b) SetMyParam(b);
|
||||
// });
|
||||
//
|
||||
// // Extension definitions can also contain normal JavaScript variables
|
||||
// // and functions.
|
||||
// var myint = 0;
|
||||
// example.test.increment = function() {
|
||||
// myint += 1;
|
||||
// return myint;
|
||||
// };
|
||||
// })();
|
||||
// </pre> Example usage in the page: <pre>
|
||||
// // Call the function.
|
||||
// example.test.myfunction();
|
||||
// // Set the parameter.
|
||||
// example.test.myparam = value;
|
||||
// // Get the parameter.
|
||||
// value = example.test.myparam;
|
||||
// // Call another function.
|
||||
// example.test.increment();
|
||||
// </pre>
|
||||
///
|
||||
CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,
|
||||
const cef_string_t* javascript_code, struct _cef_v8handler_t* handler);
|
||||
|
||||
///
|
||||
// Structure that encapsulates a V8 context handle. The functions of this
|
||||
// structure may only be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8context_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is valid. Do not call any other functions
|
||||
// if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_v8context_t* self);
|
||||
|
||||
///
|
||||
// Returns the browser for this context.
|
||||
///
|
||||
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
|
||||
struct _cef_v8context_t* self);
|
||||
|
||||
///
|
||||
// Returns the frame for this context.
|
||||
///
|
||||
struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_v8context_t* self);
|
||||
|
||||
///
|
||||
// Returns the global object for this context. The context must be entered
|
||||
// before calling this function.
|
||||
///
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *get_global)(
|
||||
struct _cef_v8context_t* self);
|
||||
|
||||
///
|
||||
// Enter this context. A context must be explicitly entered before creating a
|
||||
// V8 Object, Array, Function or Date asynchronously. exit() must be called
|
||||
// the same number of times as enter() before releasing this context. V8
|
||||
// objects belong to the context in which they are created. Returns true (1)
|
||||
// if the scope was entered successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *enter)(struct _cef_v8context_t* self);
|
||||
|
||||
///
|
||||
// Exit this context. Call this function only after calling enter(). Returns
|
||||
// true (1) if the scope was exited successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *exit)(struct _cef_v8context_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is pointing to the same handle as |that|
|
||||
// object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_v8context_t* self,
|
||||
struct _cef_v8context_t* that);
|
||||
|
||||
///
|
||||
// Evaluates the specified JavaScript code using this context's global object.
|
||||
// On success |retval| will be set to the return value, if any, and the
|
||||
// function will return true (1). On failure |exception| will be set to the
|
||||
// exception, if any, and the function will return false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *eval)(struct _cef_v8context_t* self,
|
||||
const cef_string_t* code, struct _cef_v8value_t** retval,
|
||||
struct _cef_v8exception_t** exception);
|
||||
} cef_v8context_t;
|
||||
|
||||
|
||||
///
|
||||
// Returns the current (top) context object in the V8 context stack.
|
||||
///
|
||||
CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context();
|
||||
|
||||
///
|
||||
// Returns the entered (bottom) context object in the V8 context stack.
|
||||
///
|
||||
CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context();
|
||||
|
||||
///
|
||||
// Returns true (1) if V8 is currently inside a context.
|
||||
///
|
||||
CEF_EXPORT int cef_v8context_in_context();
|
||||
|
||||
|
||||
///
|
||||
// Structure that should be implemented to handle V8 function calls. The
|
||||
// functions of this structure will always be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Handle execution of the function identified by |name|. |object| is the
|
||||
// receiver ('this' object) of the function. |arguments| is the list of
|
||||
// arguments passed to the function. If execution succeeds set |retval| to the
|
||||
// function return value. If execution fails set |exception| to the exception
|
||||
// that will be thrown. Return true (1) if execution was handled.
|
||||
///
|
||||
int (CEF_CALLBACK *execute)(struct _cef_v8handler_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
size_t argumentsCount, struct _cef_v8value_t* const* arguments,
|
||||
struct _cef_v8value_t** retval, cef_string_t* exception);
|
||||
} cef_v8handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure that should be implemented to handle V8 accessor calls. Accessor
|
||||
// identifiers are registered by calling cef_v8value_t::set_value_byaccessor().
|
||||
// The functions of this structure will always be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8accessor_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Handle retrieval the accessor value identified by |name|. |object| is the
|
||||
// receiver ('this' object) of the accessor. If retrieval succeeds set
|
||||
// |retval| to the return value. If retrieval fails set |exception| to the
|
||||
// exception that will be thrown. Return true (1) if accessor retrieval was
|
||||
// handled.
|
||||
///
|
||||
int (CEF_CALLBACK *get)(struct _cef_v8accessor_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
struct _cef_v8value_t** retval, cef_string_t* exception);
|
||||
|
||||
///
|
||||
// Handle assignment of the accessor value identified by |name|. |object| is
|
||||
// the receiver ('this' object) of the accessor. |value| is the new value
|
||||
// being assigned to the accessor. If assignment fails set |exception| to the
|
||||
// exception that will be thrown. Return true (1) if accessor assignment was
|
||||
// handled.
|
||||
///
|
||||
int (CEF_CALLBACK *set)(struct _cef_v8accessor_t* self,
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
struct _cef_v8value_t* value, cef_string_t* exception);
|
||||
} cef_v8accessor_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a V8 exception.
|
||||
///
|
||||
typedef struct _cef_v8exception_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the exception message.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_message)(
|
||||
struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the line of source code that the exception occurred within.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_source_line)(
|
||||
struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the resource name for the script from where the function causing
|
||||
// the error originates.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_script_resource_name)(
|
||||
struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the 1-based number of the line where the error occurred or 0 if the
|
||||
// line number is unknown.
|
||||
///
|
||||
int (CEF_CALLBACK *get_line_number)(struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the index within the script of the first character where the error
|
||||
// occurred.
|
||||
///
|
||||
int (CEF_CALLBACK *get_start_position)(struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the index within the script of the last character where the error
|
||||
// occurred.
|
||||
///
|
||||
int (CEF_CALLBACK *get_end_position)(struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the index within the line of the first character where the error
|
||||
// occurred.
|
||||
///
|
||||
int (CEF_CALLBACK *get_start_column)(struct _cef_v8exception_t* self);
|
||||
|
||||
///
|
||||
// Returns the index within the line of the last character where the error
|
||||
// occurred.
|
||||
///
|
||||
int (CEF_CALLBACK *get_end_column)(struct _cef_v8exception_t* self);
|
||||
} cef_v8exception_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a V8 value. The functions of this structure may only
|
||||
// be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8value_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is valid. Do not call any other functions
|
||||
// if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is undefined.
|
||||
///
|
||||
int (CEF_CALLBACK *is_undefined)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is null.
|
||||
///
|
||||
int (CEF_CALLBACK *is_null)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is bool.
|
||||
///
|
||||
int (CEF_CALLBACK *is_bool)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is int.
|
||||
///
|
||||
int (CEF_CALLBACK *is_int)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is unsigned int.
|
||||
///
|
||||
int (CEF_CALLBACK *is_uint)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is double.
|
||||
///
|
||||
int (CEF_CALLBACK *is_double)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is Date.
|
||||
///
|
||||
int (CEF_CALLBACK *is_date)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is string.
|
||||
///
|
||||
int (CEF_CALLBACK *is_string)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_object)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is array.
|
||||
///
|
||||
int (CEF_CALLBACK *is_array)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// True if the value type is function.
|
||||
///
|
||||
int (CEF_CALLBACK *is_function)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is pointing to the same handle as |that|
|
||||
// object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_v8value_t* self,
|
||||
struct _cef_v8value_t* that);
|
||||
|
||||
///
|
||||
// Return a bool value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return an int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
int32 (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return an unisgned int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
uint32 (CEF_CALLBACK *get_uint_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a double value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a Date value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
cef_time_t (CEF_CALLBACK *get_date_value)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Return a string value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string_value)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
|
||||
// OBJECT METHODS - These functions are only available on objects. Arrays and
|
||||
// functions are also objects. String- and integer-based keys can be used
|
||||
// interchangably with the framework converting between them as necessary.
|
||||
|
||||
///
|
||||
// Returns true (1) if this is a user created object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_user_created)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the last function call resulted in an exception. This
|
||||
// attribute exists only in the scope of the current CEF value object.
|
||||
///
|
||||
int (CEF_CALLBACK *has_exception)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Returns the exception resulting from the last function call. This attribute
|
||||
// exists only in the scope of the current CEF value object.
|
||||
///
|
||||
struct _cef_v8exception_t* (CEF_CALLBACK *get_exception)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Clears the last exception and returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *clear_exception)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object will re-throw future exceptions. This
|
||||
// attribute exists only in the scope of the current CEF value object.
|
||||
///
|
||||
int (CEF_CALLBACK *will_rethrow_exceptions)(struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Set whether this object will re-throw future exceptions. By default
|
||||
// exceptions are not re-thrown. If a exception is re-thrown the current
|
||||
// context should not be accessed again until after the exception has been
|
||||
// caught and not re-thrown. Returns true (1) on success. This attribute
|
||||
// exists only in the scope of the current CEF value object.
|
||||
///
|
||||
int (CEF_CALLBACK *set_rethrow_exceptions)(struct _cef_v8value_t* self,
|
||||
int rethrow);
|
||||
|
||||
///
|
||||
// Returns true (1) if the object has a value with the specified identifier.
|
||||
///
|
||||
int (CEF_CALLBACK *has_value_bykey)(struct _cef_v8value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns true (1) if the object has a value with the specified identifier.
|
||||
///
|
||||
int (CEF_CALLBACK *has_value_byindex)(struct _cef_v8value_t* self, int index);
|
||||
|
||||
///
|
||||
// Deletes the value with the specified identifier and returns true (1) on
|
||||
// success. Returns false (0) if this function is called incorrectly or an
|
||||
// exception is thrown. For read-only and don't-delete values this function
|
||||
// will return true (1) even though deletion failed.
|
||||
///
|
||||
int (CEF_CALLBACK *delete_value_bykey)(struct _cef_v8value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Deletes the value with the specified identifier and returns true (1) on
|
||||
// success. Returns false (0) if this function is called incorrectly, deletion
|
||||
// fails or an exception is thrown. For read-only and don't-delete values this
|
||||
// function will return true (1) even though deletion failed.
|
||||
///
|
||||
int (CEF_CALLBACK *delete_value_byindex)(struct _cef_v8value_t* self,
|
||||
int index);
|
||||
|
||||
///
|
||||
// Returns the value with the specified identifier on success. Returns NULL if
|
||||
// this function is called incorrectly or an exception is thrown.
|
||||
///
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *get_value_bykey)(
|
||||
struct _cef_v8value_t* self, const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value with the specified identifier on success. Returns NULL if
|
||||
// this function is called incorrectly or an exception is thrown.
|
||||
///
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *get_value_byindex)(
|
||||
struct _cef_v8value_t* self, int index);
|
||||
|
||||
///
|
||||
// Associates a value with the specified identifier and returns true (1) on
|
||||
// success. Returns false (0) if this function is called incorrectly or an
|
||||
// exception is thrown. For read-only values this function will return true
|
||||
// (1) even though assignment failed.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value_bykey)(struct _cef_v8value_t* self,
|
||||
const cef_string_t* key, struct _cef_v8value_t* value,
|
||||
enum cef_v8_propertyattribute_t attribute);
|
||||
|
||||
///
|
||||
// Associates a value with the specified identifier and returns true (1) on
|
||||
// success. Returns false (0) if this function is called incorrectly or an
|
||||
// exception is thrown. For read-only values this function will return true
|
||||
// (1) even though assignment failed.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value_byindex)(struct _cef_v8value_t* self, int index,
|
||||
struct _cef_v8value_t* value);
|
||||
|
||||
///
|
||||
// Registers an identifier and returns true (1) on success. Access to the
|
||||
// identifier will be forwarded to the cef_v8accessor_t instance passed to
|
||||
// cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this
|
||||
// function is called incorrectly or an exception is thrown. For read-only
|
||||
// values this function will return true (1) even though assignment failed.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value_byaccessor)(struct _cef_v8value_t* self,
|
||||
const cef_string_t* key, enum cef_v8_accesscontrol_t settings,
|
||||
enum cef_v8_propertyattribute_t attribute);
|
||||
|
||||
///
|
||||
// Read the keys for the object's values into the specified vector. Integer-
|
||||
// based keys will also be returned as strings.
|
||||
///
|
||||
int (CEF_CALLBACK *get_keys)(struct _cef_v8value_t* self,
|
||||
cef_string_list_t keys);
|
||||
|
||||
///
|
||||
// Sets the user data for this object and returns true (1) on success. Returns
|
||||
// false (0) if this function is called incorrectly. This function can only be
|
||||
// called on user created objects.
|
||||
///
|
||||
int (CEF_CALLBACK *set_user_data)(struct _cef_v8value_t* self,
|
||||
struct _cef_base_t* user_data);
|
||||
|
||||
///
|
||||
// Returns the user data, if any, assigned to this object.
|
||||
///
|
||||
struct _cef_base_t* (CEF_CALLBACK *get_user_data)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Returns the amount of externally allocated memory registered for the
|
||||
// object.
|
||||
///
|
||||
int (CEF_CALLBACK *get_externally_allocated_memory)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Adjusts the amount of registered external memory for the object. Used to
|
||||
// give V8 an indication of the amount of externally allocated memory that is
|
||||
// kept alive by JavaScript objects. V8 uses this information to decide when
|
||||
// to perform global garbage collection. Each cef_v8value_t tracks the amount
|
||||
// of external memory associated with it and automatically decreases the
|
||||
// global total by the appropriate amount on its destruction.
|
||||
// |change_in_bytes| specifies the number of bytes to adjust by. This function
|
||||
// returns the number of bytes associated with the object after the
|
||||
// adjustment. This function can only be called on user created objects.
|
||||
///
|
||||
int (CEF_CALLBACK *adjust_externally_allocated_memory)(
|
||||
struct _cef_v8value_t* self, int change_in_bytes);
|
||||
|
||||
|
||||
// ARRAY METHODS - These functions are only available on arrays.
|
||||
|
||||
///
|
||||
// Returns the number of elements in the array.
|
||||
///
|
||||
int (CEF_CALLBACK *get_array_length)(struct _cef_v8value_t* self);
|
||||
|
||||
|
||||
// FUNCTION METHODS - These functions are only available on functions.
|
||||
|
||||
///
|
||||
// Returns the function name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_function_name)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Returns the function handler or NULL if not a CEF-created function.
|
||||
///
|
||||
struct _cef_v8handler_t* (CEF_CALLBACK *get_function_handler)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
///
|
||||
// Execute the function using the current V8 context. This function should
|
||||
// only be called from within the scope of a cef_v8handler_t or
|
||||
// cef_v8accessor_t callback, or in combination with calling enter() and
|
||||
// exit() on a stored cef_v8context_t reference. |object| is the receiver
|
||||
// ('this' object) of the function. If |object| is NULL the current context's
|
||||
// global object will be used. |arguments| is the list of arguments that will
|
||||
// be passed to the function. Returns the function return value on success.
|
||||
// Returns NULL if this function is called incorrectly or an exception is
|
||||
// thrown.
|
||||
///
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *execute_function)(
|
||||
struct _cef_v8value_t* self, struct _cef_v8value_t* object,
|
||||
size_t argumentsCount, struct _cef_v8value_t* const* arguments);
|
||||
|
||||
///
|
||||
// Execute the function using the specified V8 context. |object| is the
|
||||
// receiver ('this' object) of the function. If |object| is NULL the specified
|
||||
// context's global object will be used. |arguments| is the list of arguments
|
||||
// that will be passed to the function. Returns the function return value on
|
||||
// success. Returns NULL if this function is called incorrectly or an
|
||||
// exception is thrown.
|
||||
///
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *execute_function_with_context)(
|
||||
struct _cef_v8value_t* self, struct _cef_v8context_t* context,
|
||||
struct _cef_v8value_t* object, size_t argumentsCount,
|
||||
struct _cef_v8value_t* const* arguments);
|
||||
} cef_v8value_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type undefined.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined();
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type null.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_null();
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type bool.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type int.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32 value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type unsigned int.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32 value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type double.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type Date. This function should only be
|
||||
// called from within the scope of a cef_v8context_tHandler, cef_v8handler_t or
|
||||
// cef_v8accessor_t callback, or in combination with calling enter() and exit()
|
||||
// on a stored cef_v8context_t reference.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type string.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type object with optional accessor. This
|
||||
// function should only be called from within the scope of a
|
||||
// cef_v8context_tHandler, cef_v8handler_t or cef_v8accessor_t callback, or in
|
||||
// combination with calling enter() and exit() on a stored cef_v8context_t
|
||||
// reference.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type array with the specified |length|.
|
||||
// If |length| is negative the returned array will have length 0. This function
|
||||
// should only be called from within the scope of a cef_v8context_tHandler,
|
||||
// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
|
||||
// enter() and exit() on a stored cef_v8context_t reference.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length);
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type function. This function should only
|
||||
// be called from within the scope of a cef_v8context_tHandler, cef_v8handler_t
|
||||
// or cef_v8accessor_t callback, or in combination with calling enter() and
|
||||
// exit() on a stored cef_v8context_t reference.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,
|
||||
cef_v8handler_t* handler);
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a V8 stack trace. The functions of this structure may
|
||||
// only be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8stack_trace_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is valid. Do not call any other functions
|
||||
// if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_trace_t* self);
|
||||
|
||||
///
|
||||
// Returns the number of stack frames.
|
||||
///
|
||||
int (CEF_CALLBACK *get_frame_count)(struct _cef_v8stack_trace_t* self);
|
||||
|
||||
///
|
||||
// Returns the stack frame at the specified 0-based index.
|
||||
///
|
||||
struct _cef_v8stack_frame_t* (CEF_CALLBACK *get_frame)(
|
||||
struct _cef_v8stack_trace_t* self, int index);
|
||||
} cef_v8stack_trace_t;
|
||||
|
||||
|
||||
///
|
||||
// Returns the stack trace for the currently active context. |frame_limit| is
|
||||
// the maximum number of frames that will be captured.
|
||||
///
|
||||
CEF_EXPORT cef_v8stack_trace_t* cef_v8stack_trace_get_current(int frame_limit);
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a V8 stack frame. The functions of this structure may
|
||||
// only be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8stack_frame_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is valid. Do not call any other functions
|
||||
// if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the name of the resource script that contains the function.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_script_name)(
|
||||
struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the name of the resource script that contains the function or the
|
||||
// sourceURL value if the script name is undefined and its source ends with a
|
||||
// "//@ sourceURL=..." string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_script_name_or_source_url)(
|
||||
struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the name of the function.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_function_name)(
|
||||
struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the 1-based line number for the function call or 0 if unknown.
|
||||
///
|
||||
int (CEF_CALLBACK *get_line_number)(struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns the 1-based column offset on the line for the function call or 0 if
|
||||
// unknown.
|
||||
///
|
||||
int (CEF_CALLBACK *get_column)(struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the function was compiled using eval().
|
||||
///
|
||||
int (CEF_CALLBACK *is_eval)(struct _cef_v8stack_frame_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the function was called as a constructor via "new".
|
||||
///
|
||||
int (CEF_CALLBACK *is_constructor)(struct _cef_v8stack_frame_t* self);
|
||||
} cef_v8stack_frame_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
|
@ -1,92 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_V8CONTEXT_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_V8CONTEXT_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle V8 context events. The functions of this
|
||||
// structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_v8context_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called immediately after the V8 context for a frame has been created. To
|
||||
// retrieve the JavaScript 'window' object use the
|
||||
// cef_v8context_t::get_global() function.
|
||||
///
|
||||
void (CEF_CALLBACK *on_context_created)(struct _cef_v8context_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
struct _cef_v8context_t* context);
|
||||
|
||||
///
|
||||
// Called immediately before the V8 context for a frame is released. No
|
||||
// references to the context should be kept after this function is called.
|
||||
///
|
||||
void (CEF_CALLBACK *on_context_released)(
|
||||
struct _cef_v8context_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, struct _cef_v8context_t* context);
|
||||
|
||||
///
|
||||
// Called for global uncaught exceptions. Execution of this callback is
|
||||
// disabled by default. To enable set
|
||||
// CefSettings.uncaught_exception_stack_size > 0.
|
||||
///
|
||||
void (CEF_CALLBACK *on_uncaught_exception)(
|
||||
struct _cef_v8context_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, struct _cef_v8context_t* context,
|
||||
struct _cef_v8exception_t* exception,
|
||||
struct _cef_v8stack_trace_t* stackTrace);
|
||||
} cef_v8context_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_V8CONTEXT_HANDLER_CAPI_H_
|
@ -1,110 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Returns the number of installed web plugins. This function must be called on
|
||||
// the UI thread.
|
||||
///
|
||||
CEF_EXPORT size_t cef_get_web_plugin_count();
|
||||
|
||||
///
|
||||
// Returns information for web plugin at the specified zero-based index. This
|
||||
// function must be called on the UI thread.
|
||||
///
|
||||
CEF_EXPORT struct _cef_web_plugin_info_t* cef_get_web_plugin_info(int index);
|
||||
|
||||
///
|
||||
// Returns information for web plugin with the specified name. This function
|
||||
// must be called on the UI thread.
|
||||
///
|
||||
CEF_EXPORT struct _cef_web_plugin_info_t* cef_get_web_plugin_info_byname(
|
||||
const cef_string_t* name);
|
||||
|
||||
///
|
||||
// Information about a specific web plugin.
|
||||
///
|
||||
typedef struct _cef_web_plugin_info_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Returns the plugin name (i.e. Flash).
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_name)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
|
||||
///
|
||||
// Returns the plugin file path (DLL/bundle/library).
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_path)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
|
||||
///
|
||||
// Returns the version of the plugin (may be OS-specific).
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_version)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
|
||||
///
|
||||
// Returns a description of the plugin from the version information.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_description)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
} cef_web_plugin_info_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
@ -1,143 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_URLREQUEST_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_WEB_URLREQUEST_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure used to make a Web URL request. Web URL requests are not associated
|
||||
// with a browser instance so no cef_client_t callbacks will be executed. The
|
||||
// functions of this structure may be called on any thread.
|
||||
///
|
||||
typedef struct _cef_web_urlrequest_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Cancels the request.
|
||||
///
|
||||
void (CEF_CALLBACK *cancel)(struct _cef_web_urlrequest_t* self);
|
||||
|
||||
///
|
||||
// Returns the current ready state of the request.
|
||||
///
|
||||
enum cef_weburlrequest_state_t (CEF_CALLBACK *get_state)(
|
||||
struct _cef_web_urlrequest_t* self);
|
||||
} cef_web_urlrequest_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new CefWebUrlRequest object.
|
||||
///
|
||||
CEF_EXPORT cef_web_urlrequest_t* cef_web_urlrequest_create(
|
||||
struct _cef_request_t* request,
|
||||
struct _cef_web_urlrequest_client_t* client);
|
||||
|
||||
|
||||
///
|
||||
// Structure that should be implemented by the cef_web_urlrequest_t client. The
|
||||
// functions of this structure will always be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_web_urlrequest_client_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Notifies the client that the request state has changed. State change
|
||||
// notifications will always be sent before the below notification functions
|
||||
// are called.
|
||||
///
|
||||
void (CEF_CALLBACK *on_state_change)(
|
||||
struct _cef_web_urlrequest_client_t* self,
|
||||
struct _cef_web_urlrequest_t* requester,
|
||||
enum cef_weburlrequest_state_t state);
|
||||
|
||||
///
|
||||
// Notifies the client that the request has been redirected and provides a
|
||||
// chance to change the request parameters.
|
||||
///
|
||||
void (CEF_CALLBACK *on_redirect)(struct _cef_web_urlrequest_client_t* self,
|
||||
struct _cef_web_urlrequest_t* requester, struct _cef_request_t* request,
|
||||
struct _cef_response_t* response);
|
||||
|
||||
///
|
||||
// Notifies the client of the response data.
|
||||
///
|
||||
void (CEF_CALLBACK *on_headers_received)(
|
||||
struct _cef_web_urlrequest_client_t* self,
|
||||
struct _cef_web_urlrequest_t* requester,
|
||||
struct _cef_response_t* response);
|
||||
|
||||
///
|
||||
// Notifies the client of the upload progress.
|
||||
///
|
||||
void (CEF_CALLBACK *on_progress)(struct _cef_web_urlrequest_client_t* self,
|
||||
struct _cef_web_urlrequest_t* requester, uint64 bytesSent,
|
||||
uint64 totalBytesToBeSent);
|
||||
|
||||
///
|
||||
// Notifies the client that content has been received.
|
||||
///
|
||||
void (CEF_CALLBACK *on_data)(struct _cef_web_urlrequest_client_t* self,
|
||||
struct _cef_web_urlrequest_t* requester, const void* data,
|
||||
int dataLength);
|
||||
|
||||
///
|
||||
// Notifies the client that the request ended with an error.
|
||||
///
|
||||
void (CEF_CALLBACK *on_error)(struct _cef_web_urlrequest_client_t* self,
|
||||
struct _cef_web_urlrequest_t* requester,
|
||||
enum cef_handler_errorcode_t errorCode);
|
||||
} cef_web_urlrequest_client_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_WEB_URLREQUEST_CAPI_H_
|
@ -1,278 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure that supports the reading of XML data via the libxml streaming API.
|
||||
// The functions of this structure should only be called on the thread that
|
||||
// creates the object.
|
||||
///
|
||||
typedef struct _cef_xml_reader_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Moves the cursor to the next node in the document. This function must be
|
||||
// called at least once to set the current cursor position. Returns true (1)
|
||||
// if the cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_next_node)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Close the document. This should be called directly to ensure that cleanup
|
||||
// occurs on the correct thread.
|
||||
///
|
||||
int (CEF_CALLBACK *close)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if an error has been reported by the XML parser.
|
||||
///
|
||||
int (CEF_CALLBACK *has_error)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the error string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_error)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
|
||||
// The below functions retrieve data for the node at the current cursor
|
||||
// position.
|
||||
|
||||
///
|
||||
// Returns the node type.
|
||||
///
|
||||
enum cef_xml_node_type_t (CEF_CALLBACK *get_type)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the node depth. Depth starts at 0 for the root node.
|
||||
///
|
||||
int (CEF_CALLBACK *get_depth)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT-
|
||||
// LocalPart for additional details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_local_name)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for
|
||||
// additional details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_prefix)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the qualified name, equal to (Prefix:)LocalName. See
|
||||
// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_qualified_name)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the URI defining the namespace associated with the node. See
|
||||
// http://www.w3.org/TR/REC-xml-names/ for additional details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_namespace_uri)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for
|
||||
// additional details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_base_uri)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the xml:lang scope within which the node resides. See
|
||||
// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_xml_lang)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the node represents an NULL element. <a/> is considered
|
||||
// NULL but <a></a> is not.
|
||||
///
|
||||
int (CEF_CALLBACK *is_empty_element)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the node has a text value.
|
||||
///
|
||||
int (CEF_CALLBACK *has_value)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the text value.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_value)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the node has attributes.
|
||||
///
|
||||
int (CEF_CALLBACK *has_attributes)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the number of attributes.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_attribute_count)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the value of the attribute at the specified 0-based index.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_attribute_byindex)(
|
||||
struct _cef_xml_reader_t* self, int index);
|
||||
|
||||
///
|
||||
// Returns the value of the attribute with the specified qualified name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_attribute_byqname)(
|
||||
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName);
|
||||
|
||||
///
|
||||
// Returns the value of the attribute with the specified local name and
|
||||
// namespace URI.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_attribute_bylname)(
|
||||
struct _cef_xml_reader_t* self, const cef_string_t* localName,
|
||||
const cef_string_t* namespaceURI);
|
||||
|
||||
///
|
||||
// Returns an XML representation of the current node's children.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_inner_xml)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns an XML representation of the current node including its children.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_outer_xml)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the line number for the current node.
|
||||
///
|
||||
int (CEF_CALLBACK *get_line_number)(struct _cef_xml_reader_t* self);
|
||||
|
||||
|
||||
// Attribute nodes are not traversed by default. The below functions can be
|
||||
// used to move the cursor to an attribute node. move_to_carrying_element()
|
||||
// can be called afterwards to return the cursor to the carrying element. The
|
||||
// depth of an attribute node will be 1 + the depth of the carrying element.
|
||||
|
||||
///
|
||||
// Moves the cursor to the attribute at the specified 0-based index. Returns
|
||||
// true (1) if the cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_attribute_byindex)(struct _cef_xml_reader_t* self,
|
||||
int index);
|
||||
|
||||
///
|
||||
// Moves the cursor to the attribute with the specified qualified name.
|
||||
// Returns true (1) if the cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_attribute_byqname)(struct _cef_xml_reader_t* self,
|
||||
const cef_string_t* qualifiedName);
|
||||
|
||||
///
|
||||
// Moves the cursor to the attribute with the specified local name and
|
||||
// namespace URI. Returns true (1) if the cursor position was set
|
||||
// successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_attribute_bylname)(struct _cef_xml_reader_t* self,
|
||||
const cef_string_t* localName, const cef_string_t* namespaceURI);
|
||||
|
||||
///
|
||||
// Moves the cursor to the first attribute in the current element. Returns
|
||||
// true (1) if the cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_first_attribute)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Moves the cursor to the next attribute in the current element. Returns true
|
||||
// (1) if the cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_next_attribute)(struct _cef_xml_reader_t* self);
|
||||
|
||||
///
|
||||
// Moves the cursor back to the carrying element. Returns true (1) if the
|
||||
// cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_carrying_element)(struct _cef_xml_reader_t* self);
|
||||
} cef_xml_reader_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_xml_reader_t object. The returned object's functions can
|
||||
// only be called from the thread that created the object.
|
||||
///
|
||||
CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(
|
||||
struct _cef_stream_reader_t* stream,
|
||||
enum cef_xml_encoding_type_t encodingType, const cef_string_t* URI);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
|
@ -1,148 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Structure that supports the reading of zip archives via the zlib unzip API.
|
||||
// The functions of this structure should only be called on the thread that
|
||||
// creates the object.
|
||||
///
|
||||
typedef struct _cef_zip_reader_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Moves the cursor to the first file in the archive. Returns true (1) if the
|
||||
// cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_first_file)(struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Moves the cursor to the next file in the archive. Returns true (1) if the
|
||||
// cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_next_file)(struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Moves the cursor to the specified file in the archive. If |caseSensitive|
|
||||
// is true (1) then the search will be case sensitive. Returns true (1) if the
|
||||
// cursor position was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *move_to_file)(struct _cef_zip_reader_t* self,
|
||||
const cef_string_t* fileName, int caseSensitive);
|
||||
|
||||
///
|
||||
// Closes the archive. This should be called directly to ensure that cleanup
|
||||
// occurs on the correct thread.
|
||||
///
|
||||
int (CEF_CALLBACK *close)(struct _cef_zip_reader_t* self);
|
||||
|
||||
|
||||
// The below functions act on the file at the current cursor position.
|
||||
|
||||
///
|
||||
// Returns the name of the file.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_file_name)(
|
||||
struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the uncompressed size of the file.
|
||||
///
|
||||
int64 (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns the last modified timestamp for the file.
|
||||
///
|
||||
time_t (CEF_CALLBACK *get_file_last_modified)(struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
// optionally be specified.
|
||||
///
|
||||
int (CEF_CALLBACK *open_file)(struct _cef_zip_reader_t* self,
|
||||
const cef_string_t* password);
|
||||
|
||||
///
|
||||
// Closes the file.
|
||||
///
|
||||
int (CEF_CALLBACK *close_file)(struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Read uncompressed file contents into the specified buffer. Returns < 0 if
|
||||
// an error occurred, 0 if at the end of file, or the number of bytes read.
|
||||
///
|
||||
int (CEF_CALLBACK *read_file)(struct _cef_zip_reader_t* self, void* buffer,
|
||||
size_t bufferSize);
|
||||
|
||||
///
|
||||
// Returns the current offset in the uncompressed file contents.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_zip_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if at end of the file contents.
|
||||
///
|
||||
int (CEF_CALLBACK *eof)(struct _cef_zip_reader_t* self);
|
||||
} cef_zip_reader_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_zip_reader_t object. The returned object's functions can
|
||||
// only be called from the thread that created the object.
|
||||
///
|
||||
CEF_EXPORT cef_zip_reader_t* cef_zip_reader_create(
|
||||
struct _cef_stream_reader_t* stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
|
@ -1,83 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_ZOOM_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_ZOOM_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to customize zoom handling. The functions of this
|
||||
// structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_zoom_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called when the browser wants to retrieve the zoom level for the given
|
||||
// |url|. Return true (1) if |zoomLevel| has been set to the custom zoom
|
||||
// level. Return false (0) for the browser's default zoom handling behavior.
|
||||
///
|
||||
int (CEF_CALLBACK *on_get_zoom_level)(struct _cef_zoom_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* url,
|
||||
double* zoomLevel);
|
||||
|
||||
///
|
||||
// Called when the browser's zoom level has been set to |zoomLevel| for the
|
||||
// given |url|. Return true (1) to indicate that the new setting has been
|
||||
// handled. Return false (0) to use the browser's default zoom handling
|
||||
// behavior.
|
||||
///
|
||||
int (CEF_CALLBACK *on_set_zoom_level)(struct _cef_zoom_handler_t* self,
|
||||
struct _cef_browser_t* browser, const cef_string_t* url,
|
||||
double zoomLevel);
|
||||
} cef_zoom_handler_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_ZOOM_HANDLER_CAPI_H_
|
@ -1,139 +0,0 @@
|
||||
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_APP_H_
|
||||
#define CEF_INCLUDE_CEF_APP_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_proxy_handler.h"
|
||||
#include "include/cef_resource_bundle_handler.h"
|
||||
#include "include/cef_scheme.h"
|
||||
|
||||
class CefApp;
|
||||
|
||||
///
|
||||
// This function should be called on the main application thread to initialize
|
||||
// CEF when the application is started. The |application| parameter may be
|
||||
// empty. A return value of true indicates that it succeeded and false indicates
|
||||
// that it failed.
|
||||
///
|
||||
/*--cef(revision_check,optional_param=application)--*/
|
||||
bool CefInitialize(const CefSettings& settings, CefRefPtr<CefApp> application);
|
||||
|
||||
///
|
||||
// This function should be called on the main application thread to shut down
|
||||
// CEF before the application exits.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefShutdown();
|
||||
|
||||
///
|
||||
// Perform a single iteration of CEF message loop processing. This function is
|
||||
// used to integrate the CEF message loop into an existing application message
|
||||
// loop. Care must be taken to balance performance against excessive CPU usage.
|
||||
// This function should only be called on the main application thread and only
|
||||
// if CefInitialize() is called with a CefSettings.multi_threaded_message_loop
|
||||
// value of false. This function will not block.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefDoMessageLoopWork();
|
||||
|
||||
///
|
||||
// Run the CEF message loop. Use this function instead of an application-
|
||||
// provided message loop to get the best balance between performance and CPU
|
||||
// usage. This function should only be called on the main application thread and
|
||||
// only if CefInitialize() is called with a
|
||||
// CefSettings.multi_threaded_message_loop value of false. This function will
|
||||
// block until a quit message is received by the system.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefRunMessageLoop();
|
||||
|
||||
///
|
||||
// Quit the CEF message loop that was started by calling CefRunMessageLoop().
|
||||
// This function should only be called on the main application thread and only
|
||||
// if CefRunMessageLoop() was used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefQuitMessageLoop();
|
||||
|
||||
///
|
||||
// Set to true before calling Windows APIs like TrackPopupMenu that enter a
|
||||
// modal message loop. Set to false after exiting the modal message loop.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefSetOSModalLoop(bool osModalLoop);
|
||||
|
||||
///
|
||||
// Implement this interface to provide handler implementations. Methods will be
|
||||
// called on the thread indicated.
|
||||
///
|
||||
/*--cef(source=client,no_debugct_check)--*/
|
||||
class CefApp : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Provides an opportunity to register custom schemes. Do not keep a reference
|
||||
// to the |registrar| object. This method is called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnRegisterCustomSchemes(
|
||||
CefRefPtr<CefSchemeRegistrar> registrar) {
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for resource bundle events. If
|
||||
// CefSettings.pack_loading_disabled is true a handler must be returned. If no
|
||||
// handler is returned resources will be loaded from pack files. This method
|
||||
// is called on multiple threads.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for proxy events. If not handler is returned the default
|
||||
// system handler will be used. This method is called on the IO thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefProxyHandler> GetProxyHandler() {
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_APP_H_
|
@ -1,120 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_APPLICATION_MAC_H_
|
||||
#define CEF_INCLUDE_CEF_APPLICATION_MAC_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
#if defined(OS_MACOSX) && defined(__OBJC__)
|
||||
|
||||
#ifdef BUILDING_CEF_SHARED
|
||||
|
||||
// Use the existing CrAppProtocol definition.
|
||||
#include "base/message_pump_mac.h"
|
||||
|
||||
// Use the existing empty protocol definitions.
|
||||
#import "base/mac/cocoa_protocols.h"
|
||||
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
// Copy of CrAppProtocol definition from base/message_pump_mac.h.
|
||||
@protocol CrAppProtocol
|
||||
// Must return true if -[NSApplication sendEvent:] is currently on the stack.
|
||||
- (BOOL)isHandlingSendEvent;
|
||||
@end
|
||||
|
||||
// The Mac OS X 10.6 SDK introduced new protocols used for delegates. These
|
||||
// protocol defintions were not present in earlier releases of the Mac OS X
|
||||
// SDK. In order to support building against the new SDK, which requires
|
||||
// delegates to conform to these protocols, and earlier SDKs, which do not
|
||||
// define these protocols at all, this file will provide empty protocol
|
||||
// definitions when used with earlier SDK versions.
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_6) || \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
|
||||
|
||||
#define DEFINE_EMPTY_PROTOCOL(p) \
|
||||
@protocol p \
|
||||
@end
|
||||
|
||||
DEFINE_EMPTY_PROTOCOL(NSAlertDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSApplicationDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSControlTextEditingDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSMatrixDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSMenuDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSOpenSavePanelDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSOutlineViewDataSource)
|
||||
DEFINE_EMPTY_PROTOCOL(NSOutlineViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSSpeechSynthesizerDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSSplitViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTableViewDataSource)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTableViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTextFieldDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSTextViewDelegate)
|
||||
DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
|
||||
|
||||
#undef DEFINE_EMPTY_PROTOCOL
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
||||
// All CEF client applications must subclass NSApplication and implement this
|
||||
// protocol.
|
||||
@protocol CefAppProtocol<CrAppProtocol>
|
||||
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
|
||||
@end
|
||||
|
||||
// Controls the state of |isHandlingSendEvent| in the event loop so that it is
|
||||
// reset properly.
|
||||
class CefScopedSendingEvent {
|
||||
public:
|
||||
CefScopedSendingEvent()
|
||||
: app_(static_cast<NSApplication<CefAppProtocol>*>(
|
||||
[NSApplication sharedApplication])),
|
||||
handling_([app_ isHandlingSendEvent]) {
|
||||
[app_ setHandlingSendEvent:YES];
|
||||
}
|
||||
~CefScopedSendingEvent() {
|
||||
[app_ setHandlingSendEvent:handling_];
|
||||
}
|
||||
|
||||
private:
|
||||
NSApplication<CefAppProtocol>* app_;
|
||||
BOOL handling_;
|
||||
};
|
||||
|
||||
#endif // defined(OS_MACOSX) && defined(__OBJC__)
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_APPLICATION_MAC_H_
|
@ -1,154 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_BASE_H_
|
||||
#define CEF_INCLUDE_CEF_BASE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/internal/cef_build.h"
|
||||
#include "include/internal/cef_ptr.h"
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
|
||||
// Bring in platform-specific definitions.
|
||||
#if defined(OS_WIN)
|
||||
#include "include/internal/cef_win.h"
|
||||
#elif defined(OS_MACOSX)
|
||||
#include "include/internal/cef_mac.h"
|
||||
#elif defined(OS_LINUX)
|
||||
#include "include/internal/cef_linux.h"
|
||||
#endif
|
||||
|
||||
///
|
||||
// Interface defining the reference count implementation methods. All framework
|
||||
// classes must extend the CefBase class.
|
||||
///
|
||||
class CefBase {
|
||||
public:
|
||||
///
|
||||
// The AddRef method increments the reference count for the object. It should
|
||||
// be called for every new copy of a pointer to a given object. The resulting
|
||||
// reference count value is returned and should be used for diagnostic/testing
|
||||
// purposes only.
|
||||
///
|
||||
virtual int AddRef() =0;
|
||||
|
||||
///
|
||||
// The Release method decrements the reference count for the object. If the
|
||||
// reference count on the object falls to 0, then the object should free
|
||||
// itself from memory. The resulting reference count value is returned and
|
||||
// should be used for diagnostic/testing purposes only.
|
||||
///
|
||||
virtual int Release() =0;
|
||||
|
||||
///
|
||||
// Return the current number of references.
|
||||
///
|
||||
virtual int GetRefCt() =0;
|
||||
|
||||
protected:
|
||||
virtual ~CefBase() {}
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class that implements atomic reference counting.
|
||||
///
|
||||
class CefRefCount {
|
||||
public:
|
||||
CefRefCount() : refct_(0) {}
|
||||
|
||||
///
|
||||
// Atomic reference increment.
|
||||
///
|
||||
int AddRef() {
|
||||
return CefAtomicIncrement(&refct_);
|
||||
}
|
||||
|
||||
///
|
||||
// Atomic reference decrement. Delete the object when no references remain.
|
||||
///
|
||||
int Release() {
|
||||
return CefAtomicDecrement(&refct_);
|
||||
}
|
||||
|
||||
///
|
||||
// Return the current number of references.
|
||||
///
|
||||
int GetRefCt() { return refct_; }
|
||||
|
||||
private:
|
||||
long refct_; // NOLINT(runtime/int)
|
||||
};
|
||||
|
||||
///
|
||||
// Macro that provides a reference counting implementation for classes extending
|
||||
// CefBase.
|
||||
///
|
||||
#define IMPLEMENT_REFCOUNTING(ClassName) \
|
||||
public: \
|
||||
int AddRef() { return refct_.AddRef(); } \
|
||||
int Release() { \
|
||||
int retval = refct_.Release(); \
|
||||
if (retval == 0) \
|
||||
delete this; \
|
||||
return retval; \
|
||||
} \
|
||||
int GetRefCt() { return refct_.GetRefCt(); } \
|
||||
private: \
|
||||
CefRefCount refct_;
|
||||
|
||||
///
|
||||
// Macro that provides a locking implementation. Use the Lock() and Unlock()
|
||||
// methods to protect a section of code from simultaneous access by multiple
|
||||
// threads. The AutoLock class is a helper that will hold the lock while in
|
||||
// scope.
|
||||
///
|
||||
#define IMPLEMENT_LOCKING(ClassName) \
|
||||
public: \
|
||||
class AutoLock { \
|
||||
public: \
|
||||
explicit AutoLock(ClassName* base) : base_(base) { base_->Lock(); } \
|
||||
~AutoLock() { base_->Unlock(); } \
|
||||
private: \
|
||||
ClassName* base_; \
|
||||
}; \
|
||||
void Lock() { critsec_.Lock(); } \
|
||||
void Unlock() { critsec_.Unlock(); } \
|
||||
private: \
|
||||
CefCriticalSection critsec_;
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_BASE_H_
|
@ -1,344 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_BROWSER_H_
|
||||
#define CEF_INCLUDE_CEF_BROWSER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include <vector>
|
||||
|
||||
class CefClient;
|
||||
|
||||
///
|
||||
// Class used to represent a browser window. The methods of this class may be
|
||||
// called on any thread unless otherwise indicated in the comments.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefBrowser : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_key_type_t KeyType;
|
||||
typedef cef_mouse_button_type_t MouseButtonType;
|
||||
typedef cef_paint_element_type_t PaintElementType;
|
||||
|
||||
///
|
||||
// Create a new browser window using the window parameters specified by
|
||||
// |windowInfo|. All values will be copied internally and the actual window
|
||||
// will be created on the UI thread. This method call will not block.
|
||||
///
|
||||
/*--cef(optional_param=url)--*/
|
||||
static bool CreateBrowser(CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefString& url,
|
||||
const CefBrowserSettings& settings);
|
||||
|
||||
///
|
||||
// Create a new browser window using the window parameters specified by
|
||||
// |windowInfo|. This method should only be called on the UI thread.
|
||||
///
|
||||
/*--cef(optional_param=url)--*/
|
||||
static CefRefPtr<CefBrowser> CreateBrowserSync(CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefString& url,
|
||||
const CefBrowserSettings& settings);
|
||||
|
||||
///
|
||||
// Call this method before destroying a contained browser window. This method
|
||||
// performs any internal cleanup that may be needed before the browser window
|
||||
// is destroyed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ParentWindowWillClose() =0;
|
||||
|
||||
///
|
||||
// Closes this browser window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void CloseBrowser() =0;
|
||||
|
||||
///
|
||||
// Returns true if the browser can navigate backwards.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanGoBack() =0;
|
||||
///
|
||||
// Navigate backwards.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GoBack() =0;
|
||||
///
|
||||
// Returns true if the browser can navigate forwards.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanGoForward() =0;
|
||||
///
|
||||
// Navigate forwards.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GoForward() =0;
|
||||
///
|
||||
// Reload the current page.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Reload() =0;
|
||||
///
|
||||
// Reload the current page ignoring any cached data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ReloadIgnoreCache() =0;
|
||||
///
|
||||
// Stop loading the page.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void StopLoad() =0;
|
||||
|
||||
///
|
||||
// Set focus for the browser window. If |enable| is true focus will be set to
|
||||
// the window. Otherwise, focus will be removed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFocus(bool enable) =0;
|
||||
|
||||
///
|
||||
// Retrieve the window handle for this browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefWindowHandle GetWindowHandle() =0;
|
||||
|
||||
///
|
||||
// Retrieve the window handle of the browser that opened this browser. Will
|
||||
// return NULL for non-popup windows. This method can be used in combination
|
||||
// with custom handling of modal windows.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefWindowHandle GetOpenerWindowHandle() =0;
|
||||
|
||||
///
|
||||
// Returns the globally unique identifier for this browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetIdentifier() =0;
|
||||
|
||||
///
|
||||
// Returns true if the window is a popup window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsPopup() =0;
|
||||
|
||||
// Returns true if a document has been loaded in the browser.
|
||||
/*--cef()--*/
|
||||
virtual bool HasDocument() =0;
|
||||
|
||||
///
|
||||
// Returns the client for this browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefClient> GetClient() =0;
|
||||
|
||||
///
|
||||
// Returns the main (top-level) frame for the browser window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFrame> GetMainFrame() =0;
|
||||
|
||||
///
|
||||
// Returns the focused frame for the browser window. This method should only
|
||||
// be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFrame> GetFocusedFrame() =0;
|
||||
|
||||
///
|
||||
// Returns the frame with the specified name, or NULL if not found. This
|
||||
// method should only be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Returns the names of all existing frames. This method should only be called
|
||||
// on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetFrameNames(std::vector<CefString>& names) =0;
|
||||
|
||||
///
|
||||
// Search for |searchText|. |identifier| can be used to have multiple searches
|
||||
// running simultaniously. |forward| indicates whether to search forward or
|
||||
// backward within the page. |matchCase| indicates whether the search should
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Find(int identifier, const CefString& searchText,
|
||||
bool forward, bool matchCase, bool findNext) =0;
|
||||
|
||||
///
|
||||
// Cancel all searches that are currently going on.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void StopFinding(bool clearSelection) =0;
|
||||
|
||||
///
|
||||
// Get the current zoom level. The default zoom level is 0.0. This method can
|
||||
// only be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual double GetZoomLevel() =0;
|
||||
|
||||
///
|
||||
// Change the zoom level to the specified value. Specify 0.0 to reset the
|
||||
// zoom level. The change will be applied asynchronously on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetZoomLevel(double zoomLevel) =0;
|
||||
|
||||
///
|
||||
// Clear the back/forward browsing history.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearHistory() =0;
|
||||
|
||||
///
|
||||
// Open developer tools in its own window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ShowDevTools() =0;
|
||||
|
||||
///
|
||||
// Explicitly close the developer tools window if one exists for this browser
|
||||
// instance.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void CloseDevTools() =0;
|
||||
|
||||
///
|
||||
// Returns true if window rendering is disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsWindowRenderingDisabled() =0;
|
||||
|
||||
///
|
||||
// Get the size of the specified element. This method should only be called on
|
||||
// the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetSize(PaintElementType type, int& width, int& height) =0;
|
||||
|
||||
///
|
||||
// Set the size of the specified element. This method is only used when window
|
||||
// rendering is disabled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSize(PaintElementType type, int width, int height) =0;
|
||||
|
||||
///
|
||||
// Returns true if a popup is currently visible. This method should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsPopupVisible() =0;
|
||||
|
||||
///
|
||||
// Hide the currently visible popup, if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void HidePopup() =0;
|
||||
|
||||
///
|
||||
// Invalidate the |dirtyRect| region of the view. This method is only used
|
||||
// when window rendering is disabled and will result in a call to
|
||||
// HandlePaint().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Invalidate(const CefRect& dirtyRect) =0;
|
||||
|
||||
///
|
||||
// Get the raw image data contained in the specified element without
|
||||
// performing validation. The specified |width| and |height| dimensions must
|
||||
// match the current element size. On Windows |buffer| must be width*height*4
|
||||
// bytes in size and represents a BGRA image with an upper-left origin. This
|
||||
// method should only be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetImage(PaintElementType type, int width, int height,
|
||||
void* buffer) =0;
|
||||
|
||||
///
|
||||
// Send a key event to the browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendKeyEvent(KeyType type, const CefKeyInfo& keyInfo,
|
||||
int modifiers) =0;
|
||||
|
||||
///
|
||||
// Send a mouse click event to the browser. The |x| and |y| coordinates are
|
||||
// relative to the upper-left corner of the view.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendMouseClickEvent(int x, int y, MouseButtonType type,
|
||||
bool mouseUp, int clickCount) =0;
|
||||
|
||||
///
|
||||
// Send a mouse move event to the browser. The |x| and |y| coordinates are
|
||||
// relative to the upper-left corner of the view.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendMouseMoveEvent(int x, int y, bool mouseLeave) =0;
|
||||
|
||||
///
|
||||
// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
|
||||
// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
|
||||
// values represent the movement delta in the X and Y directions respectively.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendMouseWheelEvent(int x, int y, int deltaX, int deltaY) =0;
|
||||
|
||||
///
|
||||
// Send a focus event to the browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendFocusEvent(bool setFocus) =0;
|
||||
|
||||
///
|
||||
// Send a capture lost event to the browser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SendCaptureLostEvent() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_BROWSER_H_
|
@ -1,196 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_CLIENT_H_
|
||||
#define CEF_INCLUDE_CEF_CLIENT_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_display_handler.h"
|
||||
#include "include/cef_drag_handler.h"
|
||||
#include "include/cef_find_handler.h"
|
||||
#include "include/cef_focus_handler.h"
|
||||
#include "include/cef_geolocation_handler.h"
|
||||
#include "include/cef_jsdialog_handler.h"
|
||||
#include "include/cef_keyboard_handler.h"
|
||||
#include "include/cef_life_span_handler.h"
|
||||
#include "include/cef_load_handler.h"
|
||||
#include "include/cef_menu_handler.h"
|
||||
#include "include/cef_permission_handler.h"
|
||||
#include "include/cef_print_handler.h"
|
||||
#include "include/cef_render_handler.h"
|
||||
#include "include/cef_request_handler.h"
|
||||
#include "include/cef_v8context_handler.h"
|
||||
#include "include/cef_zoom_handler.h"
|
||||
|
||||
///
|
||||
// Implement this interface to provide handler implementations.
|
||||
///
|
||||
/*--cef(source=client,no_debugct_check)--*/
|
||||
class CefClient : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Return the handler for browser life span events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for browser load status events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for browser request events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for browser display state events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for focus events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFocusHandler> GetFocusHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for keyboard events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for context menu events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefMenuHandler> GetMenuHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for browser permission events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefPermissionHandler> GetPermissionHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for printing events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefPrintHandler> GetPrintHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for find result events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFindHandler> GetFindHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for JavaScript dialog events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for V8 context events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefV8ContextHandler> GetV8ContextHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for off-screen rendering events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefRenderHandler> GetRenderHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for drag events.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDragHandler> GetDragHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for geolocation permissions requests. If no handler is
|
||||
// provided geolocation access will be denied by default.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// Return the handler for zoom events. If no handler is provided the default
|
||||
// zoom behavior will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefZoomHandler> GetZoomHandler() {
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_CLIENT_H_
|
@ -1,160 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_COMMAND_LINE_H_
|
||||
#define CEF_INCLUDE_CEF_COMMAND_LINE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
///
|
||||
// Class used to create and/or parse command line arguments. Arguments with
|
||||
// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches
|
||||
// will always precede any arguments without switch prefixes. Switches can
|
||||
// optionally have a value specified using the '=' delimiter (e.g.
|
||||
// "-switch=value"). An argument of "--" will terminate switch parsing with all
|
||||
// subsequent tokens, regardless of prefix, being interpreted as non-switch
|
||||
// arguments. Switch names are considered case-insensitive. This class can be
|
||||
// used before CefInitialize() is called.
|
||||
///
|
||||
/*--cef(source=library,no_debugct_check)--*/
|
||||
class CefCommandLine : public virtual CefBase {
|
||||
public:
|
||||
typedef std::vector<CefString> ArgumentList;
|
||||
typedef std::map<CefString, CefString> SwitchMap;
|
||||
|
||||
///
|
||||
// Create a new CefCommandLine instance.
|
||||
///
|
||||
/*--cef(revision_check)--*/
|
||||
static CefRefPtr<CefCommandLine> CreateCommandLine();
|
||||
|
||||
///
|
||||
// Initialize the command line with the specified |argc| and |argv| values.
|
||||
// The first argument must be the name of the program. This method is only
|
||||
// supported on non-Windows platforms.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void InitFromArgv(int argc, const char* const* argv) =0;
|
||||
|
||||
///
|
||||
// Initialize the command line with the string returned by calling
|
||||
// GetCommandLineW(). This method is only supported on Windows.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void InitFromString(const CefString& command_line) =0;
|
||||
|
||||
///
|
||||
// Constructs and returns the represented command line string. Use this method
|
||||
// cautiously because quoting behavior is unclear.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetCommandLineString() =0;
|
||||
|
||||
///
|
||||
// Get the program part of the command line string (the first item).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetProgram() =0;
|
||||
|
||||
///
|
||||
// Set the program part of the command line string (the first item).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetProgram(const CefString& program) =0;
|
||||
|
||||
///
|
||||
// Returns true if the command line has switches.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasSwitches() =0;
|
||||
|
||||
///
|
||||
// Returns true if the command line contains the given switch.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasSwitch(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Returns the value associated with the given switch. If the switch has no
|
||||
// value or isn't present this method returns the empty string.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSwitchValue(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Returns the map of switch names and values. If a switch has no value an
|
||||
// empty string is returned.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetSwitches(SwitchMap& switches) =0;
|
||||
|
||||
///
|
||||
// Add a switch to the end of the command line. If the switch has no value
|
||||
// pass an empty value string.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AppendSwitch(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Add a switch with the specified value to the end of the command line.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AppendSwitchWithValue(const CefString& name,
|
||||
const CefString& value) =0;
|
||||
|
||||
///
|
||||
// True if there are remaining command line arguments.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasArguments() =0;
|
||||
|
||||
///
|
||||
// Get the remaining command line arguments.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetArguments(ArgumentList& arguments) =0;
|
||||
|
||||
///
|
||||
// Add an argument to the end of the command line.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AppendArgument(const CefString& argument) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_COMMAND_LINE_H_
|
@ -1,68 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_CONTENT_FILTER_H_
|
||||
#define CEF_INCLUDE_CEF_CONTENT_FILTER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_stream.h"
|
||||
|
||||
///
|
||||
// Interface to implement for filtering response content. The methods of this
|
||||
// class will always be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefContentFilter : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Set |substitute_data| to the replacement for the data in |data| if data
|
||||
// should be modified.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ProcessData(const void* data, int data_size,
|
||||
CefRefPtr<CefStreamReader>& substitute_data) {}
|
||||
|
||||
///
|
||||
// Called when there is no more data to be processed. It is expected that
|
||||
// whatever data was retained in the last ProcessData() call, it should be
|
||||
// returned now by setting |remainder| if appropriate.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Drain(CefRefPtr<CefStreamReader>& remainder) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_CONTENT_FILTER_H_
|
@ -1,147 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_COOKIE_H_
|
||||
#define CEF_INCLUDE_CEF_COOKIE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include <vector>
|
||||
|
||||
class CefCookieVisitor;
|
||||
|
||||
|
||||
///
|
||||
// Class used for managing cookies. The methods of this class may be called on
|
||||
// any thread unless otherwise indicated.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefCookieManager : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns the global cookie manager. By default data will be stored at
|
||||
// CefSettings.cache_path if specified or in memory otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefCookieManager> GetGlobalManager();
|
||||
|
||||
///
|
||||
// Creates a new cookie manager. If |path| is empty data will be stored in
|
||||
// memory only. Returns NULL if creation fails.
|
||||
///
|
||||
/*--cef(optional_param=path)--*/
|
||||
static CefRefPtr<CefCookieManager> CreateManager(const CefString& path);
|
||||
|
||||
///
|
||||
// Set the schemes supported by this manager. By default only "http" and
|
||||
// "https" schemes are supported. Must be called before any cookies are
|
||||
// accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetSupportedSchemes(const std::vector<CefString>& schemes) =0;
|
||||
|
||||
///
|
||||
// Visit all cookies. The returned cookies are ordered by longest path, then
|
||||
// by earliest creation date. Returns false if cookies cannot be accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) =0;
|
||||
|
||||
///
|
||||
// Visit a subset of cookies. The results are filtered by the given url
|
||||
// scheme, host, domain and path. If |includeHttpOnly| is true HTTP-only
|
||||
// cookies will also be included in the results. The returned cookies are
|
||||
// ordered by longest path, then by earliest creation date. Returns false if
|
||||
// cookies cannot be accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) =0;
|
||||
|
||||
///
|
||||
// Sets a cookie given a valid URL and explicit user-provided cookie
|
||||
// attributes. This function expects each attribute to be well-formed. It will
|
||||
// check for disallowed characters (e.g. the ';' character is disallowed
|
||||
// within the cookie value attribute) and will return false without setting
|
||||
// the cookie if such characters are found. This method must be called on the
|
||||
// IO thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool SetCookie(const CefString& url, const CefCookie& cookie) =0;
|
||||
|
||||
///
|
||||
// Delete all cookies that match the specified parameters. If both |url| and
|
||||
// values |cookie_name| are specified all host and domain cookies matching
|
||||
// both will be deleted. If only |url| is specified all host cookies (but not
|
||||
// domain cookies) irrespective of path will be deleted. If |url| is empty all
|
||||
// cookies for all hosts and domains will be deleted. Returns false if a non-
|
||||
// empty invalid URL is specified or if cookies cannot be accessed. This
|
||||
// method must be called on the IO thread.
|
||||
///
|
||||
/*--cef(optional_param=url,optional_param=cookie_name)--*/
|
||||
virtual bool DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) =0;
|
||||
|
||||
///
|
||||
// Sets the directory path that will be used for storing cookie data. If
|
||||
// |path| is empty data will be stored in memory only. Returns false if
|
||||
// cookies cannot be accessed.
|
||||
///
|
||||
/*--cef(optional_param=path)--*/
|
||||
virtual bool SetStoragePath(const CefString& path) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Interface to implement for visiting cookie values. The methods of this class
|
||||
// will always be called on the IO thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefCookieVisitor : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Method that will be called once for each cookie. |count| is the 0-based
|
||||
// index for the current cookie. |total| is the total number of cookies.
|
||||
// Set |deleteCookie| to true to delete the cookie currently being visited.
|
||||
// Return false to stop visiting cookies. This method may never be called if
|
||||
// no cookies are found.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Visit(const CefCookie& cookie, int count, int total,
|
||||
bool& deleteCookie) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_COOKIE_H_
|
@ -1,124 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser display state.
|
||||
// The methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefDisplayHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_handler_statustype_t StatusType;
|
||||
|
||||
///
|
||||
// Called when the navigation state has changed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnNavStateChange(CefRefPtr<CefBrowser> browser,
|
||||
bool canGoBack,
|
||||
bool canGoForward) {}
|
||||
|
||||
///
|
||||
// Called when a frame's address has changed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnAddressChange(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& url) {}
|
||||
|
||||
///
|
||||
// Called when the size of the content area has changed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnContentsSizeChange(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
int width,
|
||||
int height) {}
|
||||
|
||||
///
|
||||
// Called when the page title changes.
|
||||
///
|
||||
/*--cef(optional_param=title)--*/
|
||||
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) {}
|
||||
|
||||
///
|
||||
// Called when the Favicon URL for a page changes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnFaviconURLChange(CefRefPtr<CefBrowser> browser,
|
||||
const std::vector<CefString>& icon_urls) {}
|
||||
|
||||
///
|
||||
// Called when the browser is about to display a tooltip. |text| contains the
|
||||
// text that will be displayed in the tooltip. To handle the display of the
|
||||
// tooltip yourself return true. Otherwise, you can optionally modify |text|
|
||||
// and then return false to allow the browser to display the tooltip.
|
||||
///
|
||||
/*--cef(optional_param=text)--*/
|
||||
virtual bool OnTooltip(CefRefPtr<CefBrowser> browser,
|
||||
CefString& text) { return false; }
|
||||
|
||||
///
|
||||
// Called when the browser receives a status message. |text| contains the text
|
||||
// that will be displayed in the status message and |type| indicates the
|
||||
// status message type.
|
||||
///
|
||||
/*--cef(optional_param=value)--*/
|
||||
virtual void OnStatusMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& value,
|
||||
StatusType type) {}
|
||||
|
||||
///
|
||||
// Called to display a console message. Return true to stop the message from
|
||||
// being output to the console.
|
||||
///
|
||||
/*--cef(optional_param=message,optional_param=source)--*/
|
||||
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& message,
|
||||
const CefString& source,
|
||||
int line) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
|
@ -1,429 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_DOM_H_
|
||||
#define CEF_INCLUDE_CEF_DOM_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include <map>
|
||||
|
||||
class CefDOMDocument;
|
||||
class CefDOMEventListener;
|
||||
class CefDOMNode;
|
||||
|
||||
///
|
||||
// Interface to implement for visiting the DOM. The methods of this class will
|
||||
// be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefDOMVisitor : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Method executed for visiting the DOM. The document object passed to this
|
||||
// method represents a snapshot of the DOM at the time this method is
|
||||
// executed. DOM objects are only valid for the scope of this method. Do not
|
||||
// keep references to or attempt to access any DOM objects outside the scope
|
||||
// of this method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Visit(CefRefPtr<CefDOMDocument> document) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent a DOM document. The methods of this class should only
|
||||
// be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDOMDocument : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_dom_document_type_t Type;
|
||||
|
||||
///
|
||||
// Returns the document type.
|
||||
///
|
||||
/*--cef(default_retval=DOM_DOCUMENT_TYPE_UNKNOWN)--*/
|
||||
virtual Type GetType() =0;
|
||||
|
||||
///
|
||||
// Returns the root document node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetDocument() =0;
|
||||
|
||||
///
|
||||
// Returns the BODY node of an HTML document.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetBody() =0;
|
||||
|
||||
///
|
||||
// Returns the HEAD node of an HTML document.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetHead() =0;
|
||||
|
||||
///
|
||||
// Returns the title of an HTML document.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetTitle() =0;
|
||||
|
||||
///
|
||||
// Returns the document element with the specified ID value.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetElementById(const CefString& id) =0;
|
||||
|
||||
///
|
||||
// Returns the node that currently has keyboard focus.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetFocusedNode() =0;
|
||||
|
||||
///
|
||||
// Returns true if a portion of the document is selected.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasSelection() =0;
|
||||
|
||||
///
|
||||
// Returns the selection start node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetSelectionStartNode() =0;
|
||||
|
||||
///
|
||||
// Returns the selection offset within the start node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetSelectionStartOffset() =0;
|
||||
|
||||
///
|
||||
// Returns the selection end node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetSelectionEndNode() =0;
|
||||
|
||||
///
|
||||
// Returns the selection offset within the end node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetSelectionEndOffset() =0;
|
||||
|
||||
///
|
||||
// Returns the contents of this selection as markup.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSelectionAsMarkup() =0;
|
||||
|
||||
///
|
||||
// Returns the contents of this selection as text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSelectionAsText() =0;
|
||||
|
||||
///
|
||||
// Returns the base URL for the document.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetBaseURL() =0;
|
||||
|
||||
///
|
||||
// Returns a complete URL based on the document base URL and the specified
|
||||
// partial URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetCompleteURL(const CefString& partialURL) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent a DOM node. The methods of this class should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDOMNode : public virtual CefBase {
|
||||
public:
|
||||
typedef std::map<CefString, CefString> AttributeMap;
|
||||
typedef cef_dom_node_type_t Type;
|
||||
|
||||
///
|
||||
// Returns the type for this node.
|
||||
///
|
||||
/*--cef(default_retval=DOM_NODE_TYPE_UNSUPPORTED)--*/
|
||||
virtual Type GetType() =0;
|
||||
|
||||
///
|
||||
// Returns true if this is a text node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsText() =0;
|
||||
|
||||
///
|
||||
// Returns true if this is an element node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsElement() =0;
|
||||
|
||||
///
|
||||
// Returns true if this is a form control element node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFormControlElement() =0;
|
||||
|
||||
///
|
||||
// Returns the type of this form control element node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFormControlElementType() =0;
|
||||
|
||||
///
|
||||
// Returns true if this object is pointing to the same handle as |that|
|
||||
// object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefDOMNode> that) =0;
|
||||
|
||||
///
|
||||
// Returns the name of this node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetName() =0;
|
||||
|
||||
///
|
||||
// Returns the value of this node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetValue() =0;
|
||||
|
||||
///
|
||||
// Set the value of this node. Returns true on success.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool SetValue(const CefString& value) =0;
|
||||
|
||||
///
|
||||
// Returns the contents of this node as markup.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetAsMarkup() =0;
|
||||
|
||||
///
|
||||
// Returns the document associated with this node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMDocument> GetDocument() =0;
|
||||
|
||||
///
|
||||
// Returns the parent node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetParent() =0;
|
||||
|
||||
///
|
||||
// Returns the previous sibling node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetPreviousSibling() =0;
|
||||
|
||||
///
|
||||
// Returns the next sibling node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetNextSibling() =0;
|
||||
|
||||
///
|
||||
// Returns true if this node has child nodes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasChildren() =0;
|
||||
|
||||
///
|
||||
// Return the first child node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetFirstChild() =0;
|
||||
|
||||
///
|
||||
// Returns the last child node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetLastChild() =0;
|
||||
|
||||
///
|
||||
// Add an event listener to this node for the specified event type. If
|
||||
// |useCapture| is true then this listener will be considered a capturing
|
||||
// listener. Capturing listeners will recieve all events of the specified
|
||||
// type before the events are dispatched to any other event targets beneath
|
||||
// the current node in the tree. Events which are bubbling upwards through
|
||||
// the tree will not trigger a capturing listener. Separate calls to this
|
||||
// method can be used to register the same listener with and without capture.
|
||||
// See WebCore/dom/EventNames.h for the list of supported event types.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void AddEventListener(const CefString& eventType,
|
||||
CefRefPtr<CefDOMEventListener> listener,
|
||||
bool useCapture) =0;
|
||||
|
||||
|
||||
// The following methods are valid only for element nodes.
|
||||
|
||||
///
|
||||
// Returns the tag name of this element.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetElementTagName() =0;
|
||||
|
||||
///
|
||||
// Returns true if this element has attributes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasElementAttributes() =0;
|
||||
|
||||
///
|
||||
// Returns true if this element has an attribute named |attrName|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasElementAttribute(const CefString& attrName) =0;
|
||||
|
||||
///
|
||||
// Returns the element attribute named |attrName|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetElementAttribute(const CefString& attrName) =0;
|
||||
|
||||
///
|
||||
// Returns a map of all element attributes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetElementAttributes(AttributeMap& attrMap) =0;
|
||||
|
||||
///
|
||||
// Set the value for the element attribute named |attrName|. Returns true on
|
||||
// success.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool SetElementAttribute(const CefString& attrName,
|
||||
const CefString& value) =0;
|
||||
|
||||
///
|
||||
// Returns the inner text of the element.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetElementInnerText() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent a DOM event. The methods of this class should only
|
||||
// be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDOMEvent : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_dom_event_category_t Category;
|
||||
typedef cef_dom_event_phase_t Phase;
|
||||
|
||||
///
|
||||
// Returns the event type.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetType() =0;
|
||||
|
||||
///
|
||||
// Returns the event category.
|
||||
///
|
||||
/*--cef(default_retval=DOM_EVENT_CATEGORY_UNKNOWN)--*/
|
||||
virtual Category GetCategory() =0;
|
||||
|
||||
///
|
||||
// Returns the event processing phase.
|
||||
///
|
||||
/*--cef(default_retval=DOM_EVENT_PHASE_UNKNOWN)--*/
|
||||
virtual Phase GetPhase() =0;
|
||||
|
||||
///
|
||||
// Returns true if the event can bubble up the tree.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanBubble() =0;
|
||||
|
||||
///
|
||||
// Returns true if the event can be canceled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanCancel() =0;
|
||||
|
||||
///
|
||||
// Returns the document associated with this event.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMDocument> GetDocument() =0;
|
||||
|
||||
///
|
||||
// Returns the target of the event.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetTarget() =0;
|
||||
|
||||
///
|
||||
// Returns the current target of the event.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefDOMNode> GetCurrentTarget() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Interface to implement for handling DOM events. The methods of this class
|
||||
// will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefDOMEventListener : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called when an event is received. The event object passed to this method
|
||||
// contains a snapshot of the DOM at the time this method is executed. DOM
|
||||
// objects are only valid for the scope of this method. Do not keep references
|
||||
// to or attempt to access any DOM objects outside the scope of this method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void HandleEvent(CefRefPtr<CefDOMEvent> event) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DOM_H_
|
@ -1,65 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Class used to handle file downloads. The methods of this class will always be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefDownloadHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// A portion of the file contents have been received. This method will be
|
||||
// called multiple times until the download is complete. Return |true| to
|
||||
// continue receiving data and |false| to cancel.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ReceivedData(void* data, int data_size) =0;
|
||||
|
||||
///
|
||||
// The download is complete.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Complete() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_
|
@ -1,120 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_DRAG_DATA_H_
|
||||
#define CEF_INCLUDE_CEF_DRAG_DATA_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include <vector>
|
||||
|
||||
///
|
||||
// Class used to represent drag data. The methods of this class may be called
|
||||
// on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDragData : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns true if the drag data is a link.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsLink() =0;
|
||||
|
||||
///
|
||||
// Returns true if the drag data is a text or html fragment.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFragment() =0;
|
||||
|
||||
///
|
||||
// Returns true if the drag data is a file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFile() =0;
|
||||
|
||||
///
|
||||
// Return the link URL that is being dragged.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetLinkURL() =0;
|
||||
|
||||
///
|
||||
// Return the title associated with the link being dragged.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetLinkTitle() =0;
|
||||
|
||||
///
|
||||
// Return the metadata, if any, associated with the link being dragged.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetLinkMetadata() =0;
|
||||
|
||||
///
|
||||
// Return the plain text fragment that is being dragged.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFragmentText() =0;
|
||||
|
||||
///
|
||||
// Return the text/html fragment that is being dragged.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFragmentHtml() =0;
|
||||
|
||||
///
|
||||
// Return the base URL that the fragment came from. This value is used for
|
||||
// resolving relative URLs and may be empty.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFragmentBaseURL() =0;
|
||||
|
||||
///
|
||||
// Return the name of the file being dragged out of the browser window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFileName() =0;
|
||||
|
||||
///
|
||||
// Retrieve the list of file names that are being dragged into the browser
|
||||
// window.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetFileNames(std::vector<CefString>& names) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DRAG_DATA_H_
|
@ -1,77 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_DRAG_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_DRAG_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_drag_data.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to dragging. The methods of
|
||||
// this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefDragHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_drag_operations_mask_t DragOperationsMask;
|
||||
|
||||
///
|
||||
// Called when the browser window initiates a drag event. |dragData|
|
||||
// contains the drag event data and |mask| represents the type of drag
|
||||
// operation. Return false for default drag handling behavior or true to
|
||||
// cancel the drag event.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnDragStart(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefDragData> dragData,
|
||||
DragOperationsMask mask) { return false; }
|
||||
|
||||
///
|
||||
// Called when an external drag event enters the browser window. |dragData|
|
||||
// contains the drag event data and |mask| represents the type of drag
|
||||
// operation. Return false for default drag handling behavior or true to
|
||||
// cancel the drag event.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnDragEnter(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefDragData> dragData,
|
||||
DragOperationsMask mask) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DRAG_HANDLER_H_
|
@ -1,68 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_FIND_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_FIND_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to find results. The
|
||||
// methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefFindHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called to report find results returned by CefBrowser::Find(). |identifer|
|
||||
// is the identifier passed to CefBrowser::Find(), |count| is the number of
|
||||
// matches currently identified, |selectionRect| is the location of where the
|
||||
// match was found (in window coordinates), |activeMatchOrdinal| is the
|
||||
// current position in the search results, and |finalUpdate| is true if this
|
||||
// is the last find notification.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnFindResult(CefRefPtr<CefBrowser> browser,
|
||||
int identifier,
|
||||
int count,
|
||||
const CefRect& selectionRect,
|
||||
int activeMatchOrdinal,
|
||||
bool finalUpdate) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_FIND_HANDLER_H_
|
@ -1,88 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to focus. The methods of
|
||||
// this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefFocusHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_handler_focus_source_t FocusSource;
|
||||
|
||||
///
|
||||
// Called when the browser component is about to loose focus. For instance, if
|
||||
// focus was on the last HTML element and the user pressed the TAB key. |next|
|
||||
// will be true if the browser is giving focus to the next component and false
|
||||
// if the browser is giving focus to the previous component.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnTakeFocus(CefRefPtr<CefBrowser> browser,
|
||||
bool next) {}
|
||||
|
||||
///
|
||||
// Called when the browser component is requesting focus. |source| indicates
|
||||
// where the focus request is originating from. Return false to allow the
|
||||
// focus to be set or true to cancel setting the focus.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnSetFocus(CefRefPtr<CefBrowser> browser,
|
||||
FocusSource source) { return false; }
|
||||
|
||||
///
|
||||
// Called when a new node in the the browser gets focus. The |node| value may
|
||||
// be empty if no specific node has gained focus. The node object passed to
|
||||
// this method represents a snapshot of the DOM at the time this method is
|
||||
// executed. DOM objects are only valid for the scope of this method. Do not
|
||||
// keep references to or attempt to access any DOM objects outside the scope
|
||||
// of this method.
|
||||
///
|
||||
/*--cef(optional_param=frame,optional_param=node)--*/
|
||||
virtual void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefDOMNode> node) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
|
@ -1,220 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_FRAME_H_
|
||||
#define CEF_INCLUDE_CEF_FRAME_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/cef_request.h"
|
||||
#include "include/cef_stream.h"
|
||||
|
||||
class CefBrowser;
|
||||
class CefV8Context;
|
||||
|
||||
///
|
||||
// Class used to represent a frame in the browser window. The methods of this
|
||||
// class may be called on any thread unless otherwise indicated in the comments.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefFrame : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Execute undo in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Undo() =0;
|
||||
///
|
||||
// Execute redo in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Redo() =0;
|
||||
///
|
||||
// Execute cut in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Cut() =0;
|
||||
///
|
||||
// Execute copy in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Copy() =0;
|
||||
///
|
||||
// Execute paste in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Paste() =0;
|
||||
///
|
||||
// Execute delete in this frame.
|
||||
///
|
||||
/*--cef(capi_name=del)--*/
|
||||
virtual void Delete() =0;
|
||||
///
|
||||
// Execute select all in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SelectAll() =0;
|
||||
|
||||
///
|
||||
// Execute printing in the this frame. The user will be prompted with the
|
||||
// print dialog appropriate to the operating system.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Print() =0;
|
||||
|
||||
///
|
||||
// Save this frame's HTML source to a temporary file and open it in the
|
||||
// default text viewing application.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ViewSource() =0;
|
||||
|
||||
///
|
||||
// Returns this frame's HTML source as a string. This method should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSource() =0;
|
||||
|
||||
///
|
||||
// Returns this frame's display text as a string. This method should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetText() =0;
|
||||
|
||||
///
|
||||
// Load the request represented by the |request| object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void LoadRequest(CefRefPtr<CefRequest> request) =0;
|
||||
|
||||
///
|
||||
// Load the specified |url|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void LoadURL(const CefString& url) =0;
|
||||
|
||||
///
|
||||
// Load the contents of |string_val| with the optional dummy target |url|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void LoadString(const CefString& string_val,
|
||||
const CefString& url) =0;
|
||||
|
||||
///
|
||||
// Load the contents of |stream| with the optional dummy target |url|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void LoadStream(CefRefPtr<CefStreamReader> stream,
|
||||
const CefString& url) =0;
|
||||
|
||||
///
|
||||
// Execute a string of JavaScript code in this frame. The |script_url|
|
||||
// parameter is the URL where the script in question can be found, if any.
|
||||
// The renderer may request this URL to show the developer the source of the
|
||||
// error. The |start_line| parameter is the base line number to use for error
|
||||
// reporting.
|
||||
///
|
||||
/*--cef(optional_param=scriptUrl)--*/
|
||||
virtual void ExecuteJavaScript(const CefString& jsCode,
|
||||
const CefString& scriptUrl,
|
||||
int startLine) =0;
|
||||
|
||||
///
|
||||
// Returns true if this is the main (top-level) frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsMain() =0;
|
||||
|
||||
///
|
||||
// Returns true if this is the focused frame. This method should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFocused() =0;
|
||||
|
||||
///
|
||||
// Returns the name for this frame. If the frame has an assigned name (for
|
||||
// example, set via the iframe "name" attribute) then that value will be
|
||||
// returned. Otherwise a unique name will be constructed based on the frame
|
||||
// parent hierarchy. The main (top-level) frame will always have an empty name
|
||||
// value.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetName() =0;
|
||||
|
||||
///
|
||||
// Returns the globally unique identifier for this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 GetIdentifier() =0;
|
||||
|
||||
///
|
||||
// Returns the parent of this frame or NULL if this is the main (top-level)
|
||||
// frame. This method should only be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFrame> GetParent() =0;
|
||||
|
||||
///
|
||||
// Returns the URL currently loaded in this frame.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetURL() =0;
|
||||
|
||||
///
|
||||
// Returns the browser that this frame belongs to.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
|
||||
|
||||
///
|
||||
// Visit the DOM document.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) =0;
|
||||
|
||||
///
|
||||
// Get the V8 context associated with the frame. This method should only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefV8Context> GetV8Context() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_FRAME_H_
|
@ -1,66 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_GEOLOCATION_H_
|
||||
#define CEF_INCLUDE_CEF_GEOLOCATION_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Implement this interface to receive geolocation updates. The methods of this
|
||||
// class will be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefGetGeolocationCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called with the 'best available' location information or, if the location
|
||||
// update failed, with error information.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnLocationUpdate(const CefGeoposition& position) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Request a one-time geolocation update. This function bypasses any user
|
||||
// permission checks so should only be used by code that is allowed to access
|
||||
// location information.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_GEOLOCATION_H_
|
@ -1,94 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Callback interface used for asynchronous continuation of geolocation
|
||||
// permission requests.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefGeolocationCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Call to allow or deny geolocation access.
|
||||
///
|
||||
/*--cef(capi_name=cont)--*/
|
||||
virtual void Continue(bool allow) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to geolocation permission
|
||||
// requests. The methods of this class will be called on the browser process UI
|
||||
// thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefGeolocationHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called when a page requests permission to access geolocation information.
|
||||
// |requesting_url| is the URL requesting permission and |request_id| is the
|
||||
// unique ID for the permission request. Call CefGeolocationCallback::Continue
|
||||
// to allow or deny the permission request.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnRequestGeolocationPermission(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& requesting_url,
|
||||
int request_id,
|
||||
CefRefPtr<CefGeolocationCallback> callback) {
|
||||
}
|
||||
|
||||
///
|
||||
// Called when a geolocation access request is canceled. |requesting_url| is
|
||||
// the URL that originally requested permission and |request_id| is the unique
|
||||
// ID for the permission request.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnCancelGeolocationPermission(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& requesting_url,
|
||||
int request_id) {
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_
|
@ -1,87 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to JavaScript dialogs. The
|
||||
// methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefJSDialogHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called to run a JavaScript alert message. Return false to display the
|
||||
// default alert or true if you displayed a custom alert.
|
||||
///
|
||||
/*--cef(optional_param=message)--*/
|
||||
virtual bool OnJSAlert(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& message) { return false; }
|
||||
|
||||
///
|
||||
// Called to run a JavaScript confirm request. Return false to display the
|
||||
// default alert or true if you displayed a custom alert. If you handled the
|
||||
// alert set |retval| to true if the user accepted the confirmation.
|
||||
///
|
||||
/*--cef(optional_param=message)--*/
|
||||
virtual bool OnJSConfirm(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& message,
|
||||
bool& retval) { return false; }
|
||||
|
||||
///
|
||||
// Called to run a JavaScript prompt request. Return false to display the
|
||||
// default prompt or true if you displayed a custom prompt. If you handled
|
||||
// the prompt set |retval| to true if the user accepted the prompt and request
|
||||
// and |result| to the resulting value.
|
||||
///
|
||||
/*--cef(optional_param=message,optional_param=defaultValue)--*/
|
||||
virtual bool OnJSPrompt(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& message,
|
||||
const CefString& defaultValue,
|
||||
bool& retval,
|
||||
CefString& result) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_
|
@ -1,76 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to keyboard input. The
|
||||
// methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefKeyboardHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_handler_keyevent_type_t KeyEventType;
|
||||
|
||||
///
|
||||
// Called when the browser component receives a keyboard event. This method
|
||||
// is called both before the event is passed to the renderer and after
|
||||
// JavaScript in the page has had a chance to handle the event. |type| is the
|
||||
// type of keyboard event, |code| is the windows scan-code for the event,
|
||||
// |modifiers| is a set of bit- flags describing any pressed modifier keys and
|
||||
// |isSystemKey| is true if Windows considers this a 'system key' message (see
|
||||
// http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx). If
|
||||
// |isAfterJavaScript| is true then JavaScript in the page has had a chance
|
||||
// to handle the event and has chosen not to. Only RAWKEYDOWN, KEYDOWN and
|
||||
// CHAR events will be sent with |isAfterJavaScript| set to true. Return
|
||||
// true if the keyboard event was handled or false to allow continued handling
|
||||
// of the event by the renderer.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnKeyEvent(CefRefPtr<CefBrowser> browser,
|
||||
KeyEventType type,
|
||||
int code,
|
||||
int modifiers,
|
||||
bool isSystemKey,
|
||||
bool isAfterJavaScript) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
|
@ -1,105 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
class CefClient;
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser life span. The
|
||||
// methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefLifeSpanHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called before a new popup window is created. The |parentBrowser| parameter
|
||||
// will point to the parent browser window. The |popupFeatures| parameter will
|
||||
// contain information about the style of popup window requested. Return false
|
||||
// to have the framework create the new popup window based on the parameters
|
||||
// in |windowInfo|. Return true to cancel creation of the popup window. By
|
||||
// default, a newly created popup window will have the same client and
|
||||
// settings as the parent window. To change the client for the new window
|
||||
// modify the object that |client| points to. To change the settings for the
|
||||
// new window modify the |settings| structure.
|
||||
///
|
||||
/*--cef(optional_param=url)--*/
|
||||
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
|
||||
const CefPopupFeatures& popupFeatures,
|
||||
CefWindowInfo& windowInfo,
|
||||
const CefString& url,
|
||||
CefRefPtr<CefClient>& client,
|
||||
CefBrowserSettings& settings) { return false; }
|
||||
|
||||
///
|
||||
// Called after a new window is created.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
///
|
||||
// Called when a modal window is about to display and the modal loop should
|
||||
// begin running. Return false to use the default modal loop implementation or
|
||||
// true to use a custom implementation.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool RunModal(CefRefPtr<CefBrowser> browser) { return false; }
|
||||
|
||||
///
|
||||
// Called when a window has recieved a request to close. Return false to
|
||||
// proceed with the window close or true to cancel the window close. If this
|
||||
// is a modal window and a custom modal loop implementation was provided in
|
||||
// RunModal() this callback should be used to restore the opener window to a
|
||||
// usable state.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool DoClose(CefRefPtr<CefBrowser> browser) { return false; }
|
||||
|
||||
///
|
||||
// Called just before a window is closed. If this is a modal window and a
|
||||
// custom modal loop implementation was provided in RunModal() this callback
|
||||
// should be used to exit the custom modal loop.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_
|
@ -1,94 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_LOAD_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_LOAD_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser load status. The
|
||||
// methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefLoadHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_handler_errorcode_t ErrorCode;
|
||||
|
||||
///
|
||||
// Called when the browser begins loading a frame. The |frame| value will
|
||||
// never be empty -- call the IsMain() method to check if this frame is the
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This method
|
||||
// may not be called for a particular frame if the load request for that frame
|
||||
// fails.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame) {}
|
||||
|
||||
///
|
||||
// Called when the browser is done loading a frame. The |frame| value will
|
||||
// never be empty -- call the IsMain() method to check if this frame is the
|
||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||
// start or continue loading after the main frame load has ended. This method
|
||||
// will always be called for all frames irrespective of whether the request
|
||||
// completes successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
int httpStatusCode) {}
|
||||
|
||||
///
|
||||
// Called when the browser fails to load a resource. |errorCode| is the error
|
||||
// code number and |failedUrl| is the URL that failed to load. To provide
|
||||
// custom error text assign the text to |errorText| and return true.
|
||||
// Otherwise, return false for the default error text. See
|
||||
// net\base\net_error_list.h for complete descriptions of the error codes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
ErrorCode errorCode,
|
||||
const CefString& failedUrl,
|
||||
CefString& errorText) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_LOAD_HANDLER_H_
|
@ -1,80 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_MENU_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_MENU_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser context menus.
|
||||
// The methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefMenuHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_menu_id_t MenuId;
|
||||
|
||||
///
|
||||
// Called before a context menu is displayed. Return false to display the
|
||||
// default context menu or true to cancel the display.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnBeforeMenu(CefRefPtr<CefBrowser> browser,
|
||||
const CefMenuInfo& menuInfo) { return false; }
|
||||
|
||||
///
|
||||
// Called to optionally override the default text for a context menu item.
|
||||
// |label| contains the default text and may be modified to substitute
|
||||
// alternate text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetMenuLabel(CefRefPtr<CefBrowser> browser,
|
||||
MenuId menuId,
|
||||
CefString& label) {}
|
||||
|
||||
///
|
||||
// Called when an option is selected from the default context menu. Return
|
||||
// false to execute the default action or true to cancel the action.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnMenuAction(CefRefPtr<CefBrowser> browser,
|
||||
MenuId menuId) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_MENU_HANDLER_H_
|
@ -1,119 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_NPLUGIN_H_
|
||||
#define CEF_INCLUDE_CEF_NPLUGIN_H_
|
||||
#pragma once
|
||||
|
||||
#include "internal/cef_nplugin_types.h"
|
||||
|
||||
///
|
||||
// Netscape plugins are normally built at separate DLLs that are loaded by the
|
||||
// browser when needed. This interface supports the creation of plugins that
|
||||
// are an embedded component of the application. Embedded plugins built using
|
||||
// this interface use the same Netscape Plugin API as DLL-based plugins.
|
||||
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
|
||||
// documentation on how to use the Netscape Plugin API.
|
||||
//
|
||||
// This class provides attribute information and entry point functions for a
|
||||
// plugin.
|
||||
///
|
||||
class CefPluginInfo : public cef_plugin_info_t {
|
||||
public:
|
||||
CefPluginInfo() {
|
||||
Init();
|
||||
}
|
||||
virtual ~CefPluginInfo() {
|
||||
Reset();
|
||||
}
|
||||
|
||||
CefPluginInfo(const CefPluginInfo& r) { // NOLINT(runtime/explicit)
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefPluginInfo(const cef_plugin_info_t& r) { // NOLINT(runtime/explicit)
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
cef_string_clear(&unique_name);
|
||||
cef_string_clear(&display_name);
|
||||
cef_string_clear(&version);
|
||||
cef_string_clear(&description);
|
||||
cef_string_clear(&mime_types);
|
||||
cef_string_clear(&file_extensions);
|
||||
cef_string_clear(&type_descriptions);
|
||||
Init();
|
||||
}
|
||||
|
||||
void Attach(const cef_plugin_info_t& r) {
|
||||
Reset();
|
||||
*static_cast<cef_plugin_info_t*>(this) = r;
|
||||
}
|
||||
|
||||
void Detach() {
|
||||
Init();
|
||||
}
|
||||
|
||||
CefPluginInfo& operator=(const CefPluginInfo& r) {
|
||||
return operator=(static_cast<const cef_plugin_info_t&>(r));
|
||||
}
|
||||
|
||||
CefPluginInfo& operator=(const cef_plugin_info_t& r) {
|
||||
cef_string_copy(r.unique_name.str, r.unique_name.length, &unique_name);
|
||||
cef_string_copy(r.display_name.str, r.display_name.length, &display_name);
|
||||
cef_string_copy(r.version.str, r.version.length, &version);
|
||||
cef_string_copy(r.description.str, r.description.length, &description);
|
||||
cef_string_copy(r.mime_types.str, r.mime_types.length, &mime_types);
|
||||
cef_string_copy(r.file_extensions.str, r.file_extensions.length,
|
||||
&file_extensions);
|
||||
cef_string_copy(r.type_descriptions.str, r.type_descriptions.length,
|
||||
&type_descriptions);
|
||||
#if !defined(OS_POSIX) || defined(OS_MACOSX)
|
||||
np_getentrypoints = r.np_getentrypoints;
|
||||
#endif
|
||||
np_initialize = r.np_initialize;
|
||||
np_shutdown = r.np_shutdown;
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init() {
|
||||
memset(static_cast<cef_plugin_info_t*>(this), 0, sizeof(cef_plugin_info_t));
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Register a plugin with the system.
|
||||
///
|
||||
bool CefRegisterPlugin(const CefPluginInfo& plugin_info);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_NPLUGIN_H_
|
@ -1,102 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_
|
||||
#define CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
|
||||
///
|
||||
// Add an entry to the cross-origin access whitelist.
|
||||
//
|
||||
// The same-origin policy restricts how scripts hosted from different origins
|
||||
// (scheme + domain + port) can communicate. By default, scripts can only access
|
||||
// resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes
|
||||
// (but no other schemes) can use the "Access-Control-Allow-Origin" header to
|
||||
// allow cross-origin requests. For example, https://source.example.com can make
|
||||
// XMLHttpRequest requests on http://target.example.com if the
|
||||
// http://target.example.com request returns an "Access-Control-Allow-Origin:
|
||||
// https://source.example.com" response header.
|
||||
//
|
||||
// Scripts in separate frames or iframes and hosted from the same protocol and
|
||||
// domain suffix can execute cross-origin JavaScript if both pages set the
|
||||
// document.domain value to the same domain suffix. For example,
|
||||
// scheme://foo.example.com and scheme://bar.example.com can communicate using
|
||||
// JavaScript if both domains set document.domain="example.com".
|
||||
//
|
||||
// This method is used to allow access to origins that would otherwise violate
|
||||
// the same-origin policy. Scripts hosted underneath the fully qualified
|
||||
// |source_origin| URL (like http://www.example.com) will be allowed access to
|
||||
// all resources hosted on the specified |target_protocol| and |target_domain|.
|
||||
// If |target_domain| is non-empty and |allow_target_subdomains| if false only
|
||||
// exact domain matches will be allowed. If |target_domain| is non-empty and
|
||||
// |allow_target_subdomains| is true sub-domain matches will be allowed. If
|
||||
// |target_domain| is empty and |allow_target_subdomains| if true all domains
|
||||
// and IP addresses will be allowed.
|
||||
//
|
||||
// This method cannot be used to bypass the restrictions on local or display
|
||||
// isolated schemes. See the comments on CefRegisterCustomScheme for more
|
||||
// information.
|
||||
//
|
||||
// This function may be called on any thread. Returns false if |source_origin|
|
||||
// is invalid or the whitelist cannot be accessed.
|
||||
///
|
||||
/*--cef(optional_param=target_domain)--*/
|
||||
bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
|
||||
const CefString& target_protocol,
|
||||
const CefString& target_domain,
|
||||
bool allow_target_subdomains);
|
||||
|
||||
///
|
||||
// Remove an entry from the cross-origin access whitelist. Returns false if
|
||||
// |source_origin| is invalid or the whitelist cannot be accessed.
|
||||
///
|
||||
/*--cef(optional_param=target_domain)--*/
|
||||
bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
|
||||
const CefString& target_protocol,
|
||||
const CefString& target_domain,
|
||||
bool allow_target_subdomains);
|
||||
|
||||
///
|
||||
// Remove all entries from the cross-origin access whitelist. Returns false if
|
||||
// the whitelist cannot be accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefClearCrossOriginWhitelist();
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_ORIGIN_WHITELIST_H_
|
@ -1,64 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_PERMISSION_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_PERMISSION_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser permissions.
|
||||
// The methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefPermissionHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called on the UI thread before a script extension is loaded.
|
||||
// Return false to let the extension load normally.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnBeforeScriptExtensionLoad(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& extensionName) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_PERMISSION_HANDLER_H_
|
@ -1,91 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_PRINT_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_PRINT_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to printing. The methods of
|
||||
// this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefPrintHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called to allow customization of standard print options before the print
|
||||
// dialog is displayed. |printOptions| allows specification of paper size,
|
||||
// orientation and margins. Note that the specified margins may be adjusted if
|
||||
// they are outside the range supported by the printer. All units are in
|
||||
// inches. Return false to display the default print options or true to
|
||||
// display the modified |printOptions|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetPrintOptions(CefRefPtr<CefBrowser> browser,
|
||||
CefPrintOptions& printOptions) { return false; }
|
||||
|
||||
///
|
||||
// Called to format print headers and footers. |printInfo| contains platform-
|
||||
// specific information about the printer context. |url| is the URL if the
|
||||
// currently printing page, |title| is the title of the currently printing
|
||||
// page, |currentPage| is the current page number and |maxPages| is the total
|
||||
// number of pages. Six default header locations are provided by the
|
||||
// implementation: top left, top center, top right, bottom left, bottom center
|
||||
// and bottom right. To use one of these default locations just assign a
|
||||
// string to the appropriate variable. To draw the header and footer yourself
|
||||
// return true. Otherwise, populate the approprate variables and return false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetPrintHeaderFooter(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefPrintInfo& printInfo,
|
||||
const CefString& url,
|
||||
const CefString& title,
|
||||
int currentPage,
|
||||
int maxPages,
|
||||
CefString& topLeft,
|
||||
CefString& topCenter,
|
||||
CefString& topRight,
|
||||
CefString& bottomLeft,
|
||||
CefString& bottomCenter,
|
||||
CefString& bottomRight) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_PRINT_HANDLER_H_
|
@ -1,57 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_PROXY_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_PROXY_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle proxy resolution events.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefProxyHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called to retrieve proxy information for the specified |url|.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetProxyForUrl(const CefString& url,
|
||||
CefProxyInfo& proxy_info) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_PROXY_HANDLER_H_
|
@ -1,121 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RENDER_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_RENDER_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include <vector>
|
||||
|
||||
///
|
||||
// Implement this interface to handle events when window rendering is disabled.
|
||||
// The methods of this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefRenderHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_paint_element_type_t PaintElementType;
|
||||
typedef std::vector<CefRect> RectList;
|
||||
|
||||
///
|
||||
// Called to retrieve the view rectangle which is relative to screen
|
||||
// coordinates. Return true if the rectangle was provided.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetViewRect(CefRefPtr<CefBrowser> browser,
|
||||
CefRect& rect) { return false; }
|
||||
|
||||
///
|
||||
// Called to retrieve the simulated screen rectangle. Return true if the
|
||||
// rectangle was provided.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetScreenRect(CefRefPtr<CefBrowser> browser,
|
||||
CefRect& rect) { return false; }
|
||||
|
||||
///
|
||||
// Called to retrieve the translation from view coordinates to actual screen
|
||||
// coordinates. Return true if the screen coordinates were provided.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetScreenPoint(CefRefPtr<CefBrowser> browser,
|
||||
int viewX,
|
||||
int viewY,
|
||||
int& screenX,
|
||||
int& screenY) { return false; }
|
||||
|
||||
///
|
||||
// Called when the browser wants to show or hide the popup widget. The popup
|
||||
// should be shown if |show| is true and hidden if |show| is false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPopupShow(CefRefPtr<CefBrowser> browser,
|
||||
bool show) {}
|
||||
|
||||
///
|
||||
// Called when the browser wants to move or resize the popup widget. |rect|
|
||||
// contains the new location and size.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPopupSize(CefRefPtr<CefBrowser> browser,
|
||||
const CefRect& rect) {}
|
||||
|
||||
///
|
||||
// Called when an element should be painted. |type| indicates whether the
|
||||
// element is the view or the popup widget. |buffer| contains the pixel data
|
||||
// for the whole image. |dirtyRects| contains the set of rectangles that need
|
||||
// to be repainted. On Windows |buffer| will be width*height*4 bytes in size
|
||||
// and represents a BGRA image with an upper-left origin. The
|
||||
// CefBrowserSettings.animation_frame_rate value controls the rate at which
|
||||
// this method is called.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
PaintElementType type,
|
||||
const RectList& dirtyRects,
|
||||
const void* buffer) {}
|
||||
|
||||
///
|
||||
// Called when the browser window's cursor has changed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
|
||||
CefCursorHandle cursor) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_
|
@ -1,255 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_REQUEST_H_
|
||||
#define CEF_INCLUDE_CEF_REQUEST_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
class CefPostData;
|
||||
class CefPostDataElement;
|
||||
|
||||
///
|
||||
// Class used to represent a web request. The methods of this class may be
|
||||
// called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefRequest : public virtual CefBase {
|
||||
public:
|
||||
typedef std::multimap<CefString, CefString> HeaderMap;
|
||||
typedef cef_weburlrequest_flags_t RequestFlags;
|
||||
|
||||
///
|
||||
// Create a new CefRequest object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefRequest> CreateRequest();
|
||||
|
||||
///
|
||||
// Get the fully qualified URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetURL() =0;
|
||||
///
|
||||
// Set the fully qualified URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetURL(const CefString& url) =0;
|
||||
|
||||
///
|
||||
// Get the request method type. The value will default to POST if post data
|
||||
// is provided and GET otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetMethod() =0;
|
||||
///
|
||||
// Set the request method type.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetMethod(const CefString& method) =0;
|
||||
|
||||
///
|
||||
// Get the post data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefPostData> GetPostData() =0;
|
||||
///
|
||||
// Set the post data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetPostData(CefRefPtr<CefPostData> postData) =0;
|
||||
|
||||
///
|
||||
// Get the header values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) =0;
|
||||
///
|
||||
// Set the header values.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) =0;
|
||||
|
||||
///
|
||||
// Set all values at one time.
|
||||
///
|
||||
/*--cef(optional_param=postData)--*/
|
||||
virtual void Set(const CefString& url,
|
||||
const CefString& method,
|
||||
CefRefPtr<CefPostData> postData,
|
||||
const HeaderMap& headerMap) =0;
|
||||
|
||||
///
|
||||
// Get the flags used in combination with CefWebURLRequest.
|
||||
///
|
||||
/*--cef(default_retval=WUR_FLAG_NONE)--*/
|
||||
virtual RequestFlags GetFlags() =0;
|
||||
///
|
||||
// Set the flags used in combination with CefWebURLRequest.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFlags(RequestFlags flags) =0;
|
||||
|
||||
///
|
||||
// Set the URL to the first party for cookies used in combination with
|
||||
// CefWebURLRequest.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFirstPartyForCookies() =0;
|
||||
///
|
||||
// Get the URL to the first party for cookies used in combination with
|
||||
// CefWebURLRequest.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetFirstPartyForCookies(const CefString& url) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent post data for a web request. The methods of this
|
||||
// class may be called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefPostData : public virtual CefBase {
|
||||
public:
|
||||
typedef std::vector<CefRefPtr<CefPostDataElement> > ElementVector;
|
||||
|
||||
///
|
||||
// Create a new CefPostData object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefPostData> CreatePostData();
|
||||
|
||||
///
|
||||
// Returns the number of existing post data elements.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetElementCount() =0;
|
||||
|
||||
///
|
||||
// Retrieve the post data elements.
|
||||
///
|
||||
/*--cef(count_func=elements:GetElementCount)--*/
|
||||
virtual void GetElements(ElementVector& elements) =0;
|
||||
|
||||
///
|
||||
// Remove the specified post data element. Returns true if the removal
|
||||
// succeeds.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool RemoveElement(CefRefPtr<CefPostDataElement> element) =0;
|
||||
|
||||
///
|
||||
// Add the specified post data element. Returns true if the add succeeds.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool AddElement(CefRefPtr<CefPostDataElement> element) =0;
|
||||
|
||||
///
|
||||
// Remove all existing post data elements.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void RemoveElements() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to represent a single element in the request post data. The
|
||||
// methods of this class may be called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefPostDataElement : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Post data elements may represent either bytes or files.
|
||||
///
|
||||
typedef cef_postdataelement_type_t Type;
|
||||
|
||||
///
|
||||
// Create a new CefPostDataElement object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefPostDataElement> CreatePostDataElement();
|
||||
|
||||
///
|
||||
// Remove all contents from the post data element.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetToEmpty() =0;
|
||||
|
||||
///
|
||||
// The post data element will represent a file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetToFile(const CefString& fileName) =0;
|
||||
|
||||
///
|
||||
// The post data element will represent bytes. The bytes passed
|
||||
// in will be copied.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetToBytes(size_t size, const void* bytes) =0;
|
||||
|
||||
///
|
||||
// Return the type of this post data element.
|
||||
///
|
||||
/*--cef(default_retval=PDE_TYPE_EMPTY)--*/
|
||||
virtual Type GetType() =0;
|
||||
|
||||
///
|
||||
// Return the file name.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFile() =0;
|
||||
|
||||
///
|
||||
// Return the number of bytes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetBytesCount() =0;
|
||||
|
||||
///
|
||||
// Read up to |size| bytes into |bytes| and return the number of bytes
|
||||
// actually read.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetBytes(size_t size, void* bytes) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_REQUEST_H_
|
@ -1,171 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/cef_download_handler.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_content_filter.h"
|
||||
#include "include/cef_response.h"
|
||||
#include "include/cef_request.h"
|
||||
#include "include/cef_stream.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser requests. The
|
||||
// methods of this class will be called on the thread indicated.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefRequestHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_handler_navtype_t NavType;
|
||||
|
||||
///
|
||||
// Called on the UI thread before browser navigation. Return true to cancel
|
||||
// the navigation or false to allow the navigation to proceed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
NavType navType,
|
||||
bool isRedirect) { return false; }
|
||||
|
||||
///
|
||||
// Called on the IO thread before a resource is loaded. To allow the resource
|
||||
// to load normally return false. To redirect the resource to a new url
|
||||
// populate the |redirectUrl| value and return false. To specify data for the
|
||||
// resource return a CefStream object in |resourceStream|, use the |response|
|
||||
// object to set mime type, HTTP status code and optional header values, and
|
||||
// return false. To cancel loading of the resource return true. Any
|
||||
// modifications to |request| will be observed. If the URL in |request| is
|
||||
// changed and |redirectUrl| is also set, the URL in |request| will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefString& redirectUrl,
|
||||
CefRefPtr<CefStreamReader>& resourceStream,
|
||||
CefRefPtr<CefResponse> response,
|
||||
int loadFlags) { return false; }
|
||||
|
||||
///
|
||||
// Called on the IO thread when a resource load is redirected. The |old_url|
|
||||
// parameter will contain the old URL. The |new_url| parameter will contain
|
||||
// the new URL and can be changed if desired.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnResourceRedirect(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& old_url,
|
||||
CefString& new_url) {}
|
||||
|
||||
///
|
||||
// Called on the UI thread after a response to the resource request is
|
||||
// received. Set |filter| if response content needs to be monitored and/or
|
||||
// modified as it arrives.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnResourceResponse(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
CefRefPtr<CefResponse> response,
|
||||
CefRefPtr<CefContentFilter>& filter) {}
|
||||
|
||||
///
|
||||
// Called on the IO thread to handle requests for URLs with an unknown
|
||||
// protocol component. Return true to indicate that the request should
|
||||
// succeed because it was handled externally. Set |allowOSExecution| to true
|
||||
// and return false to attempt execution via the registered OS protocol
|
||||
// handler, if any. If false is returned and either |allow_os_execution|
|
||||
// is false or OS protocol handler execution fails then the request will fail
|
||||
// with an error condition.
|
||||
// SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED
|
||||
// ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnProtocolExecution(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
bool& allowOSExecution) { return false; }
|
||||
|
||||
///
|
||||
// Called on the UI thread when a server indicates via the
|
||||
// 'Content-Disposition' header that a response represents a file to download.
|
||||
// |mimeType| is the mime type for the download, |fileName| is the suggested
|
||||
// target file name and |contentLength| is either the value of the
|
||||
// 'Content-Size' header or -1 if no size was provided. Set |handler| to the
|
||||
// CefDownloadHandler instance that will recieve the file contents. Return
|
||||
// true to download the file or false to cancel the file download.
|
||||
///
|
||||
/*--cef(optional_param=mimeType)--*/
|
||||
virtual bool GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& mimeType,
|
||||
const CefString& fileName,
|
||||
int64 contentLength,
|
||||
CefRefPtr<CefDownloadHandler>& handler)
|
||||
{ return false; }
|
||||
|
||||
///
|
||||
// Called on the IO thread when the browser needs credentials from the user.
|
||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||
// hostname and port number. Set |username| and |password| and return
|
||||
// true to handle the request. Return false to cancel the request.
|
||||
///
|
||||
/*--cef(optional_param=realm)--*/
|
||||
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
bool isProxy,
|
||||
const CefString& host,
|
||||
int port,
|
||||
const CefString& realm,
|
||||
const CefString& scheme,
|
||||
CefString& username,
|
||||
CefString& password) { return false; }
|
||||
|
||||
///
|
||||
// Called on the IO thread to retrieve the cookie manager. |main_url| is the
|
||||
// URL of the top-level frame. Cookies managers can be unique per browser or
|
||||
// shared across multiple browsers. The global cookie manager will be used if
|
||||
// this method returns NULL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefCookieManager> GetCookieManager(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& main_url) { return NULL; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
|
@ -1,82 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Class used to implement a custom resource bundle interface. The methods of
|
||||
// this class may be called on multiple threads.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefResourceBundleHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called to retrieve a localized translation for the string specified by
|
||||
// |message_id|. To provide the translation set |string| to the translation
|
||||
// string and return true. To use the default translation return false.
|
||||
//
|
||||
// WARNING: Be cautious when implementing this method. ID values are auto-
|
||||
// generated when CEF is built and may change between versions. Existing ID
|
||||
// values can be discovered by searching for *_strings.h in the
|
||||
// "obj/global_intermediate" build output directory.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetLocalizedString(int message_id,
|
||||
CefString& string) =0;
|
||||
|
||||
///
|
||||
// Called to retrieve data for the resource specified by |resource_id|. To
|
||||
// provide the resource data set |data| and |data_size| to the data pointer
|
||||
// and size respectively and return true. To use the default resource data
|
||||
// return false. The resource data will not be copied and must remain resident
|
||||
// in memory.
|
||||
//
|
||||
// WARNING: Be cautious when implementing this method. ID values are auto-
|
||||
// generated when CEF is built and may change between versions. Existing ID
|
||||
// values can be discovered by searching for *_resources.h in the
|
||||
// "obj/global_intermediate" build output directory.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetDataResource(int resource_id,
|
||||
void*& data,
|
||||
size_t& data_size) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_
|
@ -1,104 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RESPONSE_H_
|
||||
#define CEF_INCLUDE_CEF_RESPONSE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include <map>
|
||||
|
||||
///
|
||||
// Class used to represent a web response. The methods of this class may be
|
||||
// called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefResponse : public virtual CefBase {
|
||||
public:
|
||||
typedef std::multimap<CefString, CefString> HeaderMap;
|
||||
|
||||
///
|
||||
// Get the response status code.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetStatus() =0;
|
||||
///
|
||||
// Set the response status code.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetStatus(int status) = 0;
|
||||
|
||||
///
|
||||
// Get the response status text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetStatusText() =0;
|
||||
///
|
||||
// Set the response status text.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetStatusText(const CefString& statusText) = 0;
|
||||
|
||||
///
|
||||
// Get the response mime type.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetMimeType() = 0;
|
||||
///
|
||||
// Set the response mime type.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetMimeType(const CefString& mimeType) = 0;
|
||||
|
||||
///
|
||||
// Get the value for the specified response header field.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetHeader(const CefString& name) =0;
|
||||
|
||||
///
|
||||
// Get all response header fields.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) =0;
|
||||
///
|
||||
// Set all response header fields.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RESPONSE_H_
|
@ -1,346 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. Portions Copyright (c)
|
||||
// 2006-2011 Google Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// The contents of this file are a modified extract of base/task.h
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_RUNNABLE_H_
|
||||
#define CEF_INCLUDE_CEF_RUNNABLE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_task.h"
|
||||
#ifdef BUILDING_CEF_SHARED
|
||||
#include "base/tuple.h"
|
||||
#else
|
||||
#include "internal/cef_tuple.h"
|
||||
#endif
|
||||
|
||||
// CefRunnableMethodTraits -----------------------------------------------------
|
||||
//
|
||||
// This traits-class is used by CefRunnableMethod to manage the lifetime of the
|
||||
// callee object. By default, it is assumed that the callee supports AddRef
|
||||
// and Release methods. A particular class can specialize this template to
|
||||
// define other lifetime management. For example, if the callee is known to
|
||||
// live longer than the CefRunnableMethod object, then a CefRunnableMethodTraits
|
||||
// struct could be defined with empty RetainCallee and ReleaseCallee methods.
|
||||
//
|
||||
// The DISABLE_RUNNABLE_METHOD_REFCOUNT macro is provided as a convenient way
|
||||
// for declaring a CefRunnableMethodTraits that disables refcounting.
|
||||
|
||||
template <class T>
|
||||
struct CefRunnableMethodTraits {
|
||||
CefRunnableMethodTraits() {
|
||||
}
|
||||
|
||||
~CefRunnableMethodTraits() {
|
||||
}
|
||||
|
||||
void RetainCallee(T* obj) {
|
||||
#ifndef NDEBUG
|
||||
// Catch NewCefRunnableMethod being called in an object's constructor.
|
||||
// This isn't safe since the method can be invoked before the constructor
|
||||
// completes, causing the object to be deleted.
|
||||
obj->AddRef();
|
||||
obj->Release();
|
||||
#endif
|
||||
obj->AddRef();
|
||||
}
|
||||
|
||||
void ReleaseCallee(T* obj) {
|
||||
obj->Release();
|
||||
}
|
||||
};
|
||||
|
||||
// Convenience macro for declaring a CefRunnableMethodTraits that disables
|
||||
// refcounting of a class. This is useful if you know that the callee
|
||||
// will outlive the CefRunnableMethod object and thus do not need the ref
|
||||
// counts.
|
||||
//
|
||||
// The invocation of DISABLE_RUNNABLE_METHOD_REFCOUNT should be done at the
|
||||
// global namespace scope. Example:
|
||||
//
|
||||
// namespace foo {
|
||||
// class Bar {
|
||||
// ...
|
||||
// };
|
||||
// } // namespace foo
|
||||
//
|
||||
// DISABLE_RUNNABLE_METHOD_REFCOUNT(foo::Bar);
|
||||
//
|
||||
// This is different from DISALLOW_COPY_AND_ASSIGN which is declared inside the
|
||||
// class.
|
||||
#define DISABLE_RUNNABLE_METHOD_REFCOUNT(TypeName) \
|
||||
template <> \
|
||||
struct CefRunnableMethodTraits<TypeName> { \
|
||||
void RetainCallee(TypeName* manager) {} \
|
||||
void ReleaseCallee(TypeName* manager) {} \
|
||||
}
|
||||
|
||||
// CefRunnableMethod and CefRunnableFunction ----------------------------------
|
||||
//
|
||||
// CefRunnable methods are a type of task that call a function on an object
|
||||
// when they are run. We implement both an object and a set of
|
||||
// NewCefRunnableMethod and NewCefRunnableFunction functions for convenience.
|
||||
// These functions are overloaded and will infer the template types,
|
||||
// simplifying calling code.
|
||||
//
|
||||
// The template definitions all use the following names:
|
||||
// T - the class type of the object you're supplying
|
||||
// this is not needed for the Static version of the call
|
||||
// Method/Function - the signature of a pointer to the method or function you
|
||||
// want to call
|
||||
// Param - the parameter(s) to the method, possibly packed as a Tuple
|
||||
// A - the first parameter (if any) to the method
|
||||
// B - the second parameter (if any) to the method
|
||||
//
|
||||
// Put these all together and you get an object that can call a method whose
|
||||
// signature is:
|
||||
// R T::MyFunction([A[, B]])
|
||||
//
|
||||
// Usage:
|
||||
// CefPostTask(TID_UI, NewCefRunnableMethod(object, &Object::method[, a[, b]])
|
||||
// CefPostTask(TID_UI, NewCefRunnableFunction(&function[, a[, b]])
|
||||
|
||||
// CefRunnableMethod and NewCefRunnableMethod implementation ------------------
|
||||
|
||||
template <class T, class Method, class Params>
|
||||
class CefRunnableMethod : public CefTask {
|
||||
public:
|
||||
CefRunnableMethod(T* obj, Method meth, const Params& params)
|
||||
: obj_(obj), meth_(meth), params_(params) {
|
||||
traits_.RetainCallee(obj_);
|
||||
}
|
||||
|
||||
~CefRunnableMethod() {
|
||||
T* obj = obj_;
|
||||
obj_ = NULL;
|
||||
if (obj)
|
||||
traits_.ReleaseCallee(obj);
|
||||
}
|
||||
|
||||
virtual void Execute(CefThreadId threadId) {
|
||||
if (obj_)
|
||||
DispatchToMethod(obj_, meth_, params_);
|
||||
}
|
||||
|
||||
private:
|
||||
T* obj_;
|
||||
Method meth_;
|
||||
Params params_;
|
||||
CefRunnableMethodTraits<T> traits_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefRunnableMethod);
|
||||
};
|
||||
|
||||
template <class T, class Method>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method) {
|
||||
return new CefRunnableMethod<T, Method, Tuple0>(object, method, MakeTuple());
|
||||
}
|
||||
|
||||
template <class T, class Method, class A>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a) {
|
||||
return new CefRunnableMethod<T, Method, Tuple1<A> >(object,
|
||||
method,
|
||||
MakeTuple(a));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b) {
|
||||
return new CefRunnableMethod<T, Method, Tuple2<A, B> >(object, method,
|
||||
MakeTuple(a, b));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c) {
|
||||
return new CefRunnableMethod<T, Method, Tuple3<A, B, C> >(object, method,
|
||||
MakeTuple(a, b,
|
||||
c));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d) {
|
||||
return new CefRunnableMethod<T, Method, Tuple4<A, B, C, D> >(object, method,
|
||||
MakeTuple(a, b,
|
||||
c,
|
||||
d));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e) {
|
||||
return new CefRunnableMethod<T,
|
||||
Method,
|
||||
Tuple5<A, B, C, D, E> >(object,
|
||||
method,
|
||||
MakeTuple(a, b, c, d,
|
||||
e));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E,
|
||||
class F>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f) {
|
||||
return new CefRunnableMethod<T,
|
||||
Method,
|
||||
Tuple6<A, B, C, D, E, F> >(object,
|
||||
method,
|
||||
MakeTuple(a, b, c, d,
|
||||
e, f));
|
||||
}
|
||||
|
||||
template <class T, class Method, class A, class B, class C, class D, class E,
|
||||
class F, class G>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableMethod(T* object, Method method,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g) {
|
||||
return new CefRunnableMethod<T,
|
||||
Method,
|
||||
Tuple7<A, B, C, D, E, F, G> >(object,
|
||||
method,
|
||||
MakeTuple(a, b, c,
|
||||
d, e, f,
|
||||
g));
|
||||
}
|
||||
|
||||
// CefRunnableFunction and NewCefRunnableFunction implementation --------------
|
||||
|
||||
template <class Function, class Params>
|
||||
class CefRunnableFunction : public CefTask {
|
||||
public:
|
||||
CefRunnableFunction(Function function, const Params& params)
|
||||
: function_(function), params_(params) {
|
||||
}
|
||||
|
||||
~CefRunnableFunction() {
|
||||
}
|
||||
|
||||
virtual void Execute(CefThreadId threadId) {
|
||||
if (function_)
|
||||
DispatchToFunction(function_, params_);
|
||||
}
|
||||
|
||||
private:
|
||||
Function function_;
|
||||
Params params_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefRunnableFunction);
|
||||
};
|
||||
|
||||
template <class Function>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function) {
|
||||
return new CefRunnableFunction<Function, Tuple0>(function, MakeTuple());
|
||||
}
|
||||
|
||||
template <class Function, class A>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a) {
|
||||
return new CefRunnableFunction<Function, Tuple1<A> >(function, MakeTuple(a));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b) {
|
||||
return new CefRunnableFunction<Function, Tuple2<A, B> >(function,
|
||||
MakeTuple(a, b));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c) {
|
||||
return new CefRunnableFunction<Function, Tuple3<A, B, C> >(function,
|
||||
MakeTuple(a, b,
|
||||
c));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d) {
|
||||
return new CefRunnableFunction<Function, Tuple4<A, B, C, D> >(function,
|
||||
MakeTuple(a, b,
|
||||
c,
|
||||
d));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e) {
|
||||
return new CefRunnableFunction<Function, Tuple5<A, B, C, D, E> >(function,
|
||||
MakeTuple(a, b, c, d, e));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
class F>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f) {
|
||||
return new CefRunnableFunction<Function, Tuple6<A, B, C, D, E, F> >(function,
|
||||
MakeTuple(a, b, c, d, e, f));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
class F, class G>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g) {
|
||||
return new CefRunnableFunction<Function, Tuple7<A, B, C, D, E, F, G> >(
|
||||
function, MakeTuple(a, b, c, d, e, f, g));
|
||||
}
|
||||
|
||||
template <class Function, class A, class B, class C, class D, class E,
|
||||
class F, class G, class H>
|
||||
inline CefRefPtr<CefTask> NewCefRunnableFunction(Function function,
|
||||
const A& a, const B& b,
|
||||
const C& c, const D& d,
|
||||
const E& e, const F& f,
|
||||
const G& g, const H& h) {
|
||||
return new CefRunnableFunction<Function, Tuple8<A, B, C, D, E, F, G, H> >(
|
||||
function, MakeTuple(a, b, c, d, e, f, g, h));
|
||||
}
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_RUNNABLE_H_
|
@ -1,231 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_SCHEME_H_
|
||||
#define CEF_INCLUDE_CEF_SCHEME_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_response.h"
|
||||
#include "include/cef_request.h"
|
||||
|
||||
class CefSchemeHandler;
|
||||
class CefSchemeHandlerFactory;
|
||||
|
||||
///
|
||||
// Register a scheme handler factory for the specified |scheme_name| and
|
||||
// optional |domain_name|. An empty |domain_name| value for a standard scheme
|
||||
// will cause the factory to match all domain names. The |domain_name| value
|
||||
// will be ignored for non-standard schemes. If |scheme_name| is a built-in
|
||||
// scheme and no handler is returned by |factory| then the built-in scheme
|
||||
// handler factory will be called. If |scheme_name| is a custom scheme the
|
||||
// CefRegisterCustomScheme() function should be called for that scheme.
|
||||
// This function may be called multiple times to change or remove the factory
|
||||
// that matches the specified |scheme_name| and optional |domain_name|.
|
||||
// Returns false if an error occurs. This function may be called on any thread.
|
||||
///
|
||||
/*--cef(optional_param=domain_name,optional_param=factory)--*/
|
||||
bool CefRegisterSchemeHandlerFactory(const CefString& scheme_name,
|
||||
const CefString& domain_name,
|
||||
CefRefPtr<CefSchemeHandlerFactory> factory);
|
||||
|
||||
///
|
||||
// Clear all registered scheme handler factories. Returns false on error. This
|
||||
// function may be called on any thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefClearSchemeHandlerFactories();
|
||||
|
||||
|
||||
///
|
||||
// Class that manages custom scheme registrations.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefSchemeRegistrar : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Register a custom scheme. This method should not be called for the built-in
|
||||
// HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
|
||||
//
|
||||
// If |is_standard| is true the scheme will be treated as a standard scheme.
|
||||
// Standard schemes are subject to URL canonicalization and parsing rules as
|
||||
// defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available
|
||||
// at http://www.ietf.org/rfc/rfc1738.txt
|
||||
//
|
||||
// In particular, the syntax for standard scheme URLs must be of the form:
|
||||
// <pre>
|
||||
// [scheme]://[username]:[password]@[host]:[port]/[url-path]
|
||||
// </pre>
|
||||
// Standard scheme URLs must have a host component that is a fully qualified
|
||||
// domain name as defined in Section 3.5 of RFC 1034 [13] and Section 2.1 of
|
||||
// RFC 1123. These URLs will be canonicalized to "scheme://host/path" in the
|
||||
// simplest case and "scheme://username:password@host:port/path" in the most
|
||||
// explicit case. For example, "scheme:host/path" and "scheme:///host/path"
|
||||
// will both be canonicalized to "scheme://host/path". The origin of a
|
||||
// standard scheme URL is the combination of scheme, host and port (i.e.,
|
||||
// "scheme://host:port" in the most explicit case).
|
||||
//
|
||||
// For non-standard scheme URLs only the "scheme:" component is parsed and
|
||||
// canonicalized. The remainder of the URL will be passed to the handler
|
||||
// as-is. For example, "scheme:///some%20text" will remain the same.
|
||||
// Non-standard scheme URLs cannot be used as a target for form submission.
|
||||
//
|
||||
// If |is_local| is true the scheme will be treated as local (i.e., with the
|
||||
// same security rules as those applied to "file" URLs). Normal pages cannot
|
||||
// link to or access local URLs. Also, by default, local URLs can only perform
|
||||
// XMLHttpRequest calls to the same URL (origin + path) that originated the
|
||||
// request. To allow XMLHttpRequest calls from a local URL to other URLs with
|
||||
// the same origin set the CefSettings.file_access_from_file_urls_allowed
|
||||
// value to true. To allow XMLHttpRequest calls from a local URL to all
|
||||
// origins set the CefSettings.universal_access_from_file_urls_allowed value
|
||||
// to true.
|
||||
//
|
||||
// If |is_display_isolated| is true the scheme will be treated as display-
|
||||
// isolated. This means that pages cannot display these URLs unless they are
|
||||
// from the same scheme. For example, pages in another origin cannot create
|
||||
// iframes or hyperlinks to URLs with this scheme.
|
||||
//
|
||||
// This function may be called on any thread. It should only be called once
|
||||
// per unique |scheme_name| value. If |scheme_name| is already registered or
|
||||
// if an error occurs this method will return false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool AddCustomScheme(const CefString& scheme_name,
|
||||
bool is_standard,
|
||||
bool is_local,
|
||||
bool is_display_isolated) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class that creates CefSchemeHandler instances. The methods of this class will
|
||||
// always be called on the IO thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefSchemeHandlerFactory : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Return a new scheme handler instance to handle the request. |browser| will
|
||||
// be the browser window that initiated the request. If the request was
|
||||
// initiated using the CefWebURLRequest API |browser| will be NULL. The
|
||||
// |request| object passed to this method will not contain cookie data.
|
||||
///
|
||||
/*--cef(optional_param=browser)--*/
|
||||
virtual CefRefPtr<CefSchemeHandler> Create(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& scheme_name,
|
||||
CefRefPtr<CefRequest> request) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Class used to facilitate asynchronous responses to custom scheme handler
|
||||
// requests. The methods of this class may be called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefSchemeHandlerCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Notify that header information is now available for retrieval.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void HeadersAvailable() =0;
|
||||
|
||||
///
|
||||
// Notify that response data is now available for reading.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void BytesAvailable() =0;
|
||||
|
||||
///
|
||||
// Cancel processing of the request.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Cancel() =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Class used to implement a custom scheme handler interface. The methods of
|
||||
// this class will always be called on the IO thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefSchemeHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Begin processing the request. To handle the request return true and call
|
||||
// HeadersAvailable() once the response header information is available
|
||||
// (HeadersAvailable() can also be called from inside this method if header
|
||||
// information is available immediately). To cancel the request return false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefSchemeHandlerCallback> callback) =0;
|
||||
|
||||
///
|
||||
// Retrieve response header information. If the response length is not known
|
||||
// set |response_length| to -1 and ReadResponse() will be called until it
|
||||
// returns false. If the response length is known set |response_length|
|
||||
// to a positive value and ReadResponse() will be called until it returns
|
||||
// false or the specified number of bytes have been read. Use the |response|
|
||||
// object to set the mime type, http status code and other optional header
|
||||
// values. To redirect the request to a new URL set |redirectUrl| to the new
|
||||
// URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) =0;
|
||||
|
||||
///
|
||||
// Read response data. If data is available immediately copy up to
|
||||
// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
|
||||
// bytes copied, and return true. To read the data at a later time set
|
||||
// |bytes_read| to 0, return true and call BytesAvailable() when the data is
|
||||
// available. To indicate response completion return false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ReadResponse(void* data_out,
|
||||
int bytes_to_read,
|
||||
int& bytes_read,
|
||||
CefRefPtr<CefSchemeHandlerCallback> callback) =0;
|
||||
|
||||
///
|
||||
// Request processing has been canceled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Cancel() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_SCHEME_H_
|
@ -1,210 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_STREAM_H_
|
||||
#define CEF_INCLUDE_CEF_STREAM_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Interface the client can implement to provide a custom stream reader. The
|
||||
// methods of this class may be called on any thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefReadHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Read raw binary data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) =0;
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of
|
||||
// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
|
||||
// failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Seek(int64 offset, int whence) =0;
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 Tell() =0;
|
||||
|
||||
///
|
||||
// Return non-zero if at end of file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Eof() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to read data from a stream. The methods of this class may be
|
||||
// called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefStreamReader : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Create a new CefStreamReader object from a file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefStreamReader> CreateForFile(const CefString& fileName);
|
||||
///
|
||||
// Create a new CefStreamReader object from data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefStreamReader> CreateForData(void* data, size_t size);
|
||||
///
|
||||
// Create a new CefStreamReader object from a custom handler.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefStreamReader> CreateForHandler(
|
||||
CefRefPtr<CefReadHandler> handler);
|
||||
|
||||
///
|
||||
// Read raw binary data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) =0;
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of
|
||||
// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
|
||||
// failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Seek(int64 offset, int whence) =0;
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 Tell() =0;
|
||||
|
||||
///
|
||||
// Return non-zero if at end of file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Eof() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Interface the client can implement to provide a custom stream writer. The
|
||||
// methods of this class may be called on any thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefWriteHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Write raw binary data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) =0;
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of
|
||||
// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
|
||||
// failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Seek(int64 offset, int whence) =0;
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 Tell() =0;
|
||||
|
||||
///
|
||||
// Flush the stream.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Flush() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Class used to write data to a stream. The methods of this class may be called
|
||||
// on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefStreamWriter : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Create a new CefStreamWriter object for a file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefStreamWriter> CreateForFile(const CefString& fileName);
|
||||
///
|
||||
// Create a new CefStreamWriter object for a custom handler.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefStreamWriter> CreateForHandler(
|
||||
CefRefPtr<CefWriteHandler> handler);
|
||||
|
||||
///
|
||||
// Write raw binary data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) =0;
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of
|
||||
// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
|
||||
// failure.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Seek(int64 offset, int whence) =0;
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 Tell() =0;
|
||||
|
||||
///
|
||||
// Flush the stream.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Flush() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_STREAM_H_
|
@ -1,89 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_TASK_H_
|
||||
#define CEF_INCLUDE_CEF_TASK_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
class CefTask;
|
||||
|
||||
typedef cef_thread_id_t CefThreadId;
|
||||
|
||||
///
|
||||
// CEF maintains multiple internal threads that are used for handling different
|
||||
// types of tasks. The UI thread creates the browser window and is used for all
|
||||
// interaction with the WebKit rendering engine and V8 JavaScript engine (The
|
||||
// UI thread will be the same as the main application thread if CefInitialize()
|
||||
// is called with a CefSettings.multi_threaded_message_loop value of false.) The
|
||||
// IO thread is used for handling schema and network requests. The FILE thread
|
||||
// is used for the application cache and other miscellaneous activities. This
|
||||
// function will return true if called on the specified thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefCurrentlyOn(CefThreadId threadId);
|
||||
|
||||
///
|
||||
// Post a task for execution on the specified thread. This function may be
|
||||
// called on any thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefPostTask(CefThreadId threadId, CefRefPtr<CefTask> task);
|
||||
|
||||
///
|
||||
// Post a task for delayed execution on the specified thread. This function may
|
||||
// be called on any thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task,
|
||||
int64 delay_ms);
|
||||
|
||||
|
||||
///
|
||||
// Implement this interface for task execution. The methods of this class may
|
||||
// be called on any thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefTask : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Method that will be executed. |threadId| is the thread executing the call.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Execute(CefThreadId threadId) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_TASK_H_
|
@ -1,60 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_URL_H_
|
||||
#define CEF_INCLUDE_CEF_URL_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
// Parse the specified |url| into its component parts.
|
||||
// Returns false if the URL is empty or invalid.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefParseURL(const CefString& url,
|
||||
CefURLParts& parts);
|
||||
|
||||
///
|
||||
// Creates a URL from the specified |parts|, which must contain a non-empty
|
||||
// spec or a non-empty host and path (at a minimum), but not both.
|
||||
// Returns false if |parts| isn't initialized as described.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefCreateURL(const CefURLParts& parts,
|
||||
CefString& url);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_URL_H_
|
@ -1,851 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_V8_H_
|
||||
#define CEF_INCLUDE_CEF_V8_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include <vector>
|
||||
|
||||
class CefV8Exception;
|
||||
class CefV8Handler;
|
||||
class CefV8StackFrame;
|
||||
class CefV8Value;
|
||||
|
||||
|
||||
///
|
||||
// Register a new V8 extension with the specified JavaScript extension code and
|
||||
// handler. Functions implemented by the handler are prototyped using the
|
||||
// keyword 'native'. The calling of a native function is restricted to the scope
|
||||
// in which the prototype of the native function is defined. This function may
|
||||
// be called on any thread.
|
||||
//
|
||||
// Example JavaScript extension code:
|
||||
// <pre>
|
||||
// // create the 'example' global object if it doesn't already exist.
|
||||
// if (!example)
|
||||
// example = {};
|
||||
// // create the 'example.test' global object if it doesn't already exist.
|
||||
// if (!example.test)
|
||||
// example.test = {};
|
||||
// (function() {
|
||||
// // Define the function 'example.test.myfunction'.
|
||||
// example.test.myfunction = function() {
|
||||
// // Call CefV8Handler::Execute() with the function name 'MyFunction'
|
||||
// // and no arguments.
|
||||
// native function MyFunction();
|
||||
// return MyFunction();
|
||||
// };
|
||||
// // Define the getter function for parameter 'example.test.myparam'.
|
||||
// example.test.__defineGetter__('myparam', function() {
|
||||
// // Call CefV8Handler::Execute() with the function name 'GetMyParam'
|
||||
// // and no arguments.
|
||||
// native function GetMyParam();
|
||||
// return GetMyParam();
|
||||
// });
|
||||
// // Define the setter function for parameter 'example.test.myparam'.
|
||||
// example.test.__defineSetter__('myparam', function(b) {
|
||||
// // Call CefV8Handler::Execute() with the function name 'SetMyParam'
|
||||
// // and a single argument.
|
||||
// native function SetMyParam();
|
||||
// if(b) SetMyParam(b);
|
||||
// });
|
||||
//
|
||||
// // Extension definitions can also contain normal JavaScript variables
|
||||
// // and functions.
|
||||
// var myint = 0;
|
||||
// example.test.increment = function() {
|
||||
// myint += 1;
|
||||
// return myint;
|
||||
// };
|
||||
// })();
|
||||
// </pre>
|
||||
// Example usage in the page:
|
||||
// <pre>
|
||||
// // Call the function.
|
||||
// example.test.myfunction();
|
||||
// // Set the parameter.
|
||||
// example.test.myparam = value;
|
||||
// // Get the parameter.
|
||||
// value = example.test.myparam;
|
||||
// // Call another function.
|
||||
// example.test.increment();
|
||||
// </pre>
|
||||
///
|
||||
/*--cef(optional_param=handler)--*/
|
||||
bool CefRegisterExtension(const CefString& extension_name,
|
||||
const CefString& javascript_code,
|
||||
CefRefPtr<CefV8Handler> handler);
|
||||
|
||||
|
||||
///
|
||||
// Class that encapsulates a V8 context handle. The methods of this class may
|
||||
// only be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefV8Context : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns the current (top) context object in the V8 context stack.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Context> GetCurrentContext();
|
||||
|
||||
///
|
||||
// Returns the entered (bottom) context object in the V8 context stack.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Context> GetEnteredContext();
|
||||
|
||||
///
|
||||
// Returns true if V8 is currently inside a context.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static bool InContext();
|
||||
|
||||
///
|
||||
// Returns true if this object is valid. Do not call any other methods if this
|
||||
// method returns false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() =0;
|
||||
|
||||
///
|
||||
// Returns the browser for this context.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
|
||||
|
||||
///
|
||||
// Returns the frame for this context.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefFrame> GetFrame() =0;
|
||||
|
||||
///
|
||||
// Returns the global object for this context. The context must be entered
|
||||
// before calling this method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefV8Value> GetGlobal() =0;
|
||||
|
||||
///
|
||||
// Enter this context. A context must be explicitly entered before creating a
|
||||
// V8 Object, Array, Function or Date asynchronously. Exit() must be called
|
||||
// the same number of times as Enter() before releasing this context. V8
|
||||
// objects belong to the context in which they are created. Returns true if
|
||||
// the scope was entered successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Enter() =0;
|
||||
|
||||
///
|
||||
// Exit this context. Call this method only after calling Enter(). Returns
|
||||
// true if the scope was exited successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Exit() =0;
|
||||
|
||||
///
|
||||
// Returns true if this object is pointing to the same handle as |that|
|
||||
// object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefV8Context> that) =0;
|
||||
|
||||
///
|
||||
// Evaluates the specified JavaScript code using this context's global object.
|
||||
// On success |retval| will be set to the return value, if any, and the
|
||||
// function will return true. On failure |exception| will be set to the
|
||||
// exception, if any, and the function will return false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Eval(const CefString& code,
|
||||
CefRefPtr<CefV8Value>& retval,
|
||||
CefRefPtr<CefV8Exception>& exception) =0;
|
||||
};
|
||||
|
||||
|
||||
typedef std::vector<CefRefPtr<CefV8Value> > CefV8ValueList;
|
||||
|
||||
///
|
||||
// Interface that should be implemented to handle V8 function calls. The methods
|
||||
// of this class will always be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefV8Handler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Handle execution of the function identified by |name|. |object| is the
|
||||
// receiver ('this' object) of the function. |arguments| is the list of
|
||||
// arguments passed to the function. If execution succeeds set |retval| to the
|
||||
// function return value. If execution fails set |exception| to the exception
|
||||
// that will be thrown. Return true if execution was handled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Execute(const CefString& name,
|
||||
CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments,
|
||||
CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Interface that should be implemented to handle V8 accessor calls. Accessor
|
||||
// identifiers are registered by calling CefV8Value::SetValue(). The methods
|
||||
// of this class will always be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefV8Accessor : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Handle retrieval the accessor value identified by |name|. |object| is the
|
||||
// receiver ('this' object) of the accessor. If retrieval succeeds set
|
||||
// |retval| to the return value. If retrieval fails set |exception| to the
|
||||
// exception that will be thrown. Return true if accessor retrieval was
|
||||
// handled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Get(const CefString& name,
|
||||
const CefRefPtr<CefV8Value> object,
|
||||
CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception) =0;
|
||||
|
||||
///
|
||||
// Handle assignment of the accessor value identified by |name|. |object| is
|
||||
// the receiver ('this' object) of the accessor. |value| is the new value
|
||||
// being assigned to the accessor. If assignment fails set |exception| to the
|
||||
// exception that will be thrown. Return true if accessor assignment was
|
||||
// handled.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Set(const CefString& name,
|
||||
const CefRefPtr<CefV8Value> object,
|
||||
const CefRefPtr<CefV8Value> value,
|
||||
CefString& exception) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing a V8 exception.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefV8Exception : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns the exception message.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetMessage() =0;
|
||||
|
||||
///
|
||||
// Returns the line of source code that the exception occurred within.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetSourceLine() =0;
|
||||
|
||||
///
|
||||
// Returns the resource name for the script from where the function causing
|
||||
// the error originates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetScriptResourceName() =0;
|
||||
|
||||
///
|
||||
// Returns the 1-based number of the line where the error occurred or 0 if the
|
||||
// line number is unknown.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetLineNumber() =0;
|
||||
|
||||
///
|
||||
// Returns the index within the script of the first character where the error
|
||||
// occurred.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetStartPosition() =0;
|
||||
|
||||
///
|
||||
// Returns the index within the script of the last character where the error
|
||||
// occurred.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetEndPosition() =0;
|
||||
|
||||
///
|
||||
// Returns the index within the line of the first character where the error
|
||||
// occurred.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetStartColumn() =0;
|
||||
|
||||
///
|
||||
// Returns the index within the line of the last character where the error
|
||||
// occurred.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetEndColumn() =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing a V8 value. The methods of this class may only be called
|
||||
// on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefV8Value : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_v8_accesscontrol_t AccessControl;
|
||||
typedef cef_v8_propertyattribute_t PropertyAttribute;
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type undefined.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateUndefined();
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type null.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateNull();
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type bool.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateBool(bool value);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type int.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateInt(int32 value);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type unsigned int.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateUInt(uint32 value);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type double.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateDouble(double value);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type Date. This method should only be
|
||||
// called from within the scope of a CefV8ContextHandler, CefV8Handler or
|
||||
// CefV8Accessor callback, or in combination with calling Enter() and Exit()
|
||||
// on a stored CefV8Context reference.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateDate(const CefTime& date);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type string.
|
||||
///
|
||||
/*--cef(optional_param=value)--*/
|
||||
static CefRefPtr<CefV8Value> CreateString(const CefString& value);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type object with optional accessor. This
|
||||
// method should only be called from within the scope of a
|
||||
// CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in
|
||||
// combination with calling Enter() and Exit() on a stored CefV8Context
|
||||
// reference.
|
||||
///
|
||||
/*--cef(optional_param=accessor)--*/
|
||||
static CefRefPtr<CefV8Value> CreateObject(CefRefPtr<CefV8Accessor> accessor);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type array with the specified |length|.
|
||||
// If |length| is negative the returned array will have length 0. This method
|
||||
// should only be called from within the scope of a CefV8ContextHandler,
|
||||
// CefV8Handler or CefV8Accessor callback, or in combination with calling
|
||||
// Enter() and Exit() on a stored CefV8Context reference.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateArray(int length);
|
||||
|
||||
///
|
||||
// Create a new CefV8Value object of type function. This method should only be
|
||||
// called from within the scope of a CefV8ContextHandler, CefV8Handler or
|
||||
// CefV8Accessor callback, or in combination with calling Enter() and Exit()
|
||||
// on a stored CefV8Context reference.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8Value> CreateFunction(const CefString& name,
|
||||
CefRefPtr<CefV8Handler> handler);
|
||||
|
||||
///
|
||||
// Returns true if this object is valid. Do not call any other methods if this
|
||||
// method returns false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() =0;
|
||||
|
||||
///
|
||||
// True if the value type is undefined.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsUndefined() =0;
|
||||
|
||||
///
|
||||
// True if the value type is null.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsNull() =0;
|
||||
|
||||
///
|
||||
// True if the value type is bool.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsBool() =0;
|
||||
|
||||
///
|
||||
// True if the value type is int.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsInt() =0;
|
||||
|
||||
///
|
||||
// True if the value type is unsigned int.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsUInt() =0;
|
||||
|
||||
///
|
||||
// True if the value type is double.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsDouble() =0;
|
||||
|
||||
///
|
||||
// True if the value type is Date.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsDate() =0;
|
||||
|
||||
///
|
||||
// True if the value type is string.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsString() =0;
|
||||
|
||||
///
|
||||
// True if the value type is object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsObject() =0;
|
||||
|
||||
///
|
||||
// True if the value type is array.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsArray() =0;
|
||||
|
||||
///
|
||||
// True if the value type is function.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsFunction() =0;
|
||||
|
||||
///
|
||||
// Returns true if this object is pointing to the same handle as |that|
|
||||
// object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsSame(CefRefPtr<CefV8Value> that) =0;
|
||||
|
||||
///
|
||||
// Return a bool value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetBoolValue() =0;
|
||||
|
||||
///
|
||||
// Return an int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int32 GetIntValue() =0;
|
||||
|
||||
///
|
||||
// Return an unisgned int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual uint32 GetUIntValue() =0;
|
||||
|
||||
///
|
||||
// Return a double value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual double GetDoubleValue() =0;
|
||||
|
||||
///
|
||||
// Return a Date value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefTime GetDateValue() =0;
|
||||
|
||||
///
|
||||
// Return a string value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetStringValue() =0;
|
||||
|
||||
|
||||
// OBJECT METHODS - These methods are only available on objects. Arrays and
|
||||
// functions are also objects. String- and integer-based keys can be used
|
||||
// interchangably with the framework converting between them as necessary.
|
||||
|
||||
///
|
||||
// Returns true if this is a user created object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsUserCreated() =0;
|
||||
|
||||
///
|
||||
// Returns true if the last method call resulted in an exception. This
|
||||
// attribute exists only in the scope of the current CEF value object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasException() =0;
|
||||
|
||||
///
|
||||
// Returns the exception resulting from the last method call. This attribute
|
||||
// exists only in the scope of the current CEF value object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefV8Exception> GetException() =0;
|
||||
|
||||
///
|
||||
// Clears the last exception and returns true on success.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool ClearException() =0;
|
||||
|
||||
///
|
||||
// Returns true if this object will re-throw future exceptions. This attribute
|
||||
// exists only in the scope of the current CEF value object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool WillRethrowExceptions() =0;
|
||||
|
||||
///
|
||||
// Set whether this object will re-throw future exceptions. By default
|
||||
// exceptions are not re-thrown. If a exception is re-thrown the current
|
||||
// context should not be accessed again until after the exception has been
|
||||
// caught and not re-thrown. Returns true on success. This attribute exists
|
||||
// only in the scope of the current CEF value object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool SetRethrowExceptions(bool rethrow) =0;
|
||||
|
||||
///
|
||||
// Returns true if the object has a value with the specified identifier.
|
||||
///
|
||||
/*--cef(capi_name=has_value_bykey,optional_param=key)--*/
|
||||
virtual bool HasValue(const CefString& key) =0;
|
||||
|
||||
///
|
||||
// Returns true if the object has a value with the specified identifier.
|
||||
///
|
||||
/*--cef(capi_name=has_value_byindex,index_param=index)--*/
|
||||
virtual bool HasValue(int index) =0;
|
||||
|
||||
///
|
||||
// Deletes the value with the specified identifier and returns true on
|
||||
// success. Returns false if this method is called incorrectly or an exception
|
||||
// is thrown. For read-only and don't-delete values this method will return
|
||||
// true even though deletion failed.
|
||||
///
|
||||
/*--cef(capi_name=delete_value_bykey,optional_param=key)--*/
|
||||
virtual bool DeleteValue(const CefString& key) =0;
|
||||
|
||||
///
|
||||
// Deletes the value with the specified identifier and returns true on
|
||||
// success. Returns false if this method is called incorrectly, deletion fails
|
||||
// or an exception is thrown. For read-only and don't-delete values this
|
||||
// method will return true even though deletion failed.
|
||||
///
|
||||
/*--cef(capi_name=delete_value_byindex,index_param=index)--*/
|
||||
virtual bool DeleteValue(int index) =0;
|
||||
|
||||
///
|
||||
// Returns the value with the specified identifier on success. Returns NULL
|
||||
// if this method is called incorrectly or an exception is thrown.
|
||||
///
|
||||
/*--cef(capi_name=get_value_bykey,optional_param=key)--*/
|
||||
virtual CefRefPtr<CefV8Value> GetValue(const CefString& key) =0;
|
||||
|
||||
///
|
||||
// Returns the value with the specified identifier on success. Returns NULL
|
||||
// if this method is called incorrectly or an exception is thrown.
|
||||
///
|
||||
/*--cef(capi_name=get_value_byindex,index_param=index)--*/
|
||||
virtual CefRefPtr<CefV8Value> GetValue(int index) =0;
|
||||
|
||||
///
|
||||
// Associates a value with the specified identifier and returns true on
|
||||
// success. Returns false if this method is called incorrectly or an exception
|
||||
// is thrown. For read-only values this method will return true even though
|
||||
// assignment failed.
|
||||
///
|
||||
/*--cef(capi_name=set_value_bykey,optional_param=key)--*/
|
||||
virtual bool SetValue(const CefString& key, CefRefPtr<CefV8Value> value,
|
||||
PropertyAttribute attribute) =0;
|
||||
|
||||
///
|
||||
// Associates a value with the specified identifier and returns true on
|
||||
// success. Returns false if this method is called incorrectly or an exception
|
||||
// is thrown. For read-only values this method will return true even though
|
||||
// assignment failed.
|
||||
///
|
||||
/*--cef(capi_name=set_value_byindex,index_param=index)--*/
|
||||
virtual bool SetValue(int index, CefRefPtr<CefV8Value> value) =0;
|
||||
|
||||
///
|
||||
// Registers an identifier and returns true on success. Access to the
|
||||
// identifier will be forwarded to the CefV8Accessor instance passed to
|
||||
// CefV8Value::CreateObject(). Returns false if this method is called
|
||||
// incorrectly or an exception is thrown. For read-only values this method
|
||||
// will return true even though assignment failed.
|
||||
///
|
||||
/*--cef(capi_name=set_value_byaccessor,optional_param=key)--*/
|
||||
virtual bool SetValue(const CefString& key, AccessControl settings,
|
||||
PropertyAttribute attribute) =0;
|
||||
|
||||
///
|
||||
// Read the keys for the object's values into the specified vector. Integer-
|
||||
// based keys will also be returned as strings.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool GetKeys(std::vector<CefString>& keys) =0;
|
||||
|
||||
///
|
||||
// Sets the user data for this object and returns true on success. Returns
|
||||
// false if this method is called incorrectly. This method can only be called
|
||||
// on user created objects.
|
||||
///
|
||||
/*--cef(optional_param=user_data)--*/
|
||||
virtual bool SetUserData(CefRefPtr<CefBase> user_data) =0;
|
||||
|
||||
///
|
||||
// Returns the user data, if any, assigned to this object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBase> GetUserData() =0;
|
||||
|
||||
///
|
||||
// Returns the amount of externally allocated memory registered for the
|
||||
// object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetExternallyAllocatedMemory() =0;
|
||||
|
||||
///
|
||||
// Adjusts the amount of registered external memory for the object. Used to
|
||||
// give V8 an indication of the amount of externally allocated memory that is
|
||||
// kept alive by JavaScript objects. V8 uses this information to decide when
|
||||
// to perform global garbage collection. Each CefV8Value tracks the amount of
|
||||
// external memory associated with it and automatically decreases the global
|
||||
// total by the appropriate amount on its destruction. |change_in_bytes|
|
||||
// specifies the number of bytes to adjust by. This method returns the number
|
||||
// of bytes associated with the object after the adjustment. This method can
|
||||
// only be called on user created objects.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) =0;
|
||||
|
||||
|
||||
// ARRAY METHODS - These methods are only available on arrays.
|
||||
|
||||
///
|
||||
// Returns the number of elements in the array.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetArrayLength() =0;
|
||||
|
||||
|
||||
// FUNCTION METHODS - These methods are only available on functions.
|
||||
|
||||
///
|
||||
// Returns the function name.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFunctionName() =0;
|
||||
|
||||
///
|
||||
// Returns the function handler or NULL if not a CEF-created function.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefV8Handler> GetFunctionHandler() =0;
|
||||
|
||||
///
|
||||
// Execute the function using the current V8 context. This method should only
|
||||
// be called from within the scope of a CefV8Handler or CefV8Accessor
|
||||
// callback, or in combination with calling Enter() and Exit() on a stored
|
||||
// CefV8Context reference. |object| is the receiver ('this' object) of the
|
||||
// function. If |object| is empty the current context's global object will be
|
||||
// used. |arguments| is the list of arguments that will be passed to the
|
||||
// function. Returns the function return value on success. Returns NULL if
|
||||
// this method is called incorrectly or an exception is thrown.
|
||||
///
|
||||
/*--cef(optional_param=object)--*/
|
||||
virtual CefRefPtr<CefV8Value> ExecuteFunction(
|
||||
CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments) =0;
|
||||
|
||||
///
|
||||
// Execute the function using the specified V8 context. |object| is the
|
||||
// receiver ('this' object) of the function. If |object| is empty the
|
||||
// specified context's global object will be used. |arguments| is the list of
|
||||
// arguments that will be passed to the function. Returns the function return
|
||||
// value on success. Returns NULL if this method is called incorrectly or an
|
||||
// exception is thrown.
|
||||
///
|
||||
/*--cef(optional_param=object)--*/
|
||||
virtual CefRefPtr<CefV8Value> ExecuteFunctionWithContext(
|
||||
CefRefPtr<CefV8Context> context,
|
||||
CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing a V8 stack trace. The methods of this class may only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefV8StackTrace : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns the stack trace for the currently active context. |frame_limit| is
|
||||
// the maximum number of frames that will be captured.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefV8StackTrace> GetCurrent(int frame_limit);
|
||||
|
||||
///
|
||||
// Returns true if this object is valid. Do not call any other methods if this
|
||||
// method returns false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() =0;
|
||||
|
||||
///
|
||||
// Returns the number of stack frames.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetFrameCount() =0;
|
||||
|
||||
///
|
||||
// Returns the stack frame at the specified 0-based index.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefV8StackFrame> GetFrame(int index) =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing a V8 stack frame. The methods of this class may only be
|
||||
// called on the UI thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefV8StackFrame : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns true if this object is valid. Do not call any other methods if this
|
||||
// method returns false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsValid() =0;
|
||||
|
||||
///
|
||||
// Returns the name of the resource script that contains the function.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetScriptName() =0;
|
||||
|
||||
///
|
||||
// Returns the name of the resource script that contains the function or the
|
||||
// sourceURL value if the script name is undefined and its source ends with
|
||||
// a "//@ sourceURL=..." string.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetScriptNameOrSourceURL() =0;
|
||||
|
||||
///
|
||||
// Returns the name of the function.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFunctionName() =0;
|
||||
|
||||
///
|
||||
// Returns the 1-based line number for the function call or 0 if unknown.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetLineNumber() =0;
|
||||
|
||||
///
|
||||
// Returns the 1-based column offset on the line for the function call or 0 if
|
||||
// unknown.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetColumn() =0;
|
||||
|
||||
///
|
||||
// Returns true if the function was compiled using eval().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsEval() =0;
|
||||
|
||||
///
|
||||
// Returns true if the function was called as a constructor via "new".
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsConstructor() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_V8_H_
|
@ -1,85 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_V8CONTEXT_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_V8CONTEXT_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_v8.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle V8 context events. The methods of this
|
||||
// class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefV8ContextHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called immediately after the V8 context for a frame has been created. To
|
||||
// retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal()
|
||||
// method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {}
|
||||
|
||||
///
|
||||
// Called immediately before the V8 context for a frame is released. No
|
||||
// references to the context should be kept after this method is called.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {}
|
||||
|
||||
///
|
||||
// Called for global uncaught exceptions. Execution of this callback is
|
||||
// disabled by default. To enable set
|
||||
// CefSettings.uncaught_exception_stack_size > 0.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnUncaughtException(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context,
|
||||
CefRefPtr<CefV8Exception> exception,
|
||||
CefRefPtr<CefV8StackTrace> stackTrace) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_V8CONTEXT_HANDLER_H_
|
@ -1,97 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
||||
#define CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
class CefWebPluginInfo;
|
||||
|
||||
///
|
||||
// Returns the number of installed web plugins. This method must be called on
|
||||
// the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
size_t CefGetWebPluginCount();
|
||||
|
||||
///
|
||||
// Returns information for web plugin at the specified zero-based index. This
|
||||
// method must be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
CefRefPtr<CefWebPluginInfo> CefGetWebPluginInfo(int index);
|
||||
|
||||
///
|
||||
// Returns information for web plugin with the specified name. This method must
|
||||
// be called on the UI thread.
|
||||
///
|
||||
/*--cef(capi_name=cef_get_web_plugin_info_byname)--*/
|
||||
CefRefPtr<CefWebPluginInfo> CefGetWebPluginInfo(const CefString& name);
|
||||
|
||||
|
||||
///
|
||||
// Information about a specific web plugin.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefWebPluginInfo : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Returns the plugin name (i.e. Flash).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetName() =0;
|
||||
|
||||
///
|
||||
// Returns the plugin file path (DLL/bundle/library).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetPath() =0;
|
||||
|
||||
///
|
||||
// Returns the version of the plugin (may be OS-specific).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetVersion() =0;
|
||||
|
||||
///
|
||||
// Returns a description of the plugin from the version information.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetDescription() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
@ -1,135 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_WEB_URLREQUEST_H_
|
||||
#define CEF_INCLUDE_CEF_WEB_URLREQUEST_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_request.h"
|
||||
#include "include/cef_response.h"
|
||||
|
||||
class CefWebURLRequestClient;
|
||||
|
||||
///
|
||||
// Class used to make a Web URL request. Web URL requests are not associated
|
||||
// with a browser instance so no CefClient callbacks will be executed. The
|
||||
// methods of this class may be called on any thread.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefWebURLRequest : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_weburlrequest_state_t RequestState;
|
||||
|
||||
///
|
||||
// Create a new CefWebUrlRequest object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefWebURLRequest> CreateWebURLRequest(
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefWebURLRequestClient> client);
|
||||
|
||||
///
|
||||
// Cancels the request.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Cancel() =0;
|
||||
|
||||
///
|
||||
// Returns the current ready state of the request.
|
||||
///
|
||||
/*--cef(default_retval=WUR_STATE_UNSENT)--*/
|
||||
virtual RequestState GetState() =0;
|
||||
};
|
||||
|
||||
///
|
||||
// Interface that should be implemented by the CefWebURLRequest client. The
|
||||
// methods of this class will always be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefWebURLRequestClient : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_weburlrequest_state_t RequestState;
|
||||
typedef cef_handler_errorcode_t ErrorCode;
|
||||
|
||||
///
|
||||
// Notifies the client that the request state has changed. State change
|
||||
// notifications will always be sent before the below notification methods
|
||||
// are called.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnStateChange(CefRefPtr<CefWebURLRequest> requester,
|
||||
RequestState state) =0;
|
||||
|
||||
///
|
||||
// Notifies the client that the request has been redirected and provides a
|
||||
// chance to change the request parameters.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnRedirect(CefRefPtr<CefWebURLRequest> requester,
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefResponse> response) =0;
|
||||
|
||||
///
|
||||
// Notifies the client of the response data.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnHeadersReceived(CefRefPtr<CefWebURLRequest> requester,
|
||||
CefRefPtr<CefResponse> response) =0;
|
||||
|
||||
///
|
||||
// Notifies the client of the upload progress.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnProgress(CefRefPtr<CefWebURLRequest> requester,
|
||||
uint64 bytesSent, uint64 totalBytesToBeSent) =0;
|
||||
|
||||
///
|
||||
// Notifies the client that content has been received.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnData(CefRefPtr<CefWebURLRequest> requester,
|
||||
const void* data, int dataLength) =0;
|
||||
|
||||
///
|
||||
// Notifies the client that the request ended with an error.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnError(CefRefPtr<CefWebURLRequest> requester,
|
||||
ErrorCode errorCode) =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_WEB_URLREQUEST_H_
|
@ -1,268 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_XML_READER_H_
|
||||
#define CEF_INCLUDE_CEF_XML_READER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_stream.h"
|
||||
|
||||
///
|
||||
// Class that supports the reading of XML data via the libxml streaming API.
|
||||
// The methods of this class should only be called on the thread that creates
|
||||
// the object.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefXmlReader : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_xml_encoding_type_t EncodingType;
|
||||
typedef cef_xml_node_type_t NodeType;
|
||||
|
||||
///
|
||||
// Create a new CefXmlReader object. The returned object's methods can only
|
||||
// be called from the thread that created the object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefXmlReader> Create(CefRefPtr<CefStreamReader> stream,
|
||||
EncodingType encodingType,
|
||||
const CefString& URI);
|
||||
|
||||
///
|
||||
// Moves the cursor to the next node in the document. This method must be
|
||||
// called at least once to set the current cursor position. Returns true if
|
||||
// the cursor position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToNextNode() =0;
|
||||
|
||||
///
|
||||
// Close the document. This should be called directly to ensure that cleanup
|
||||
// occurs on the correct thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Close() =0;
|
||||
|
||||
///
|
||||
// Returns true if an error has been reported by the XML parser.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasError() =0;
|
||||
|
||||
///
|
||||
// Returns the error string.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetError() =0;
|
||||
|
||||
|
||||
// The below methods retrieve data for the node at the current cursor
|
||||
// position.
|
||||
|
||||
///
|
||||
// Returns the node type.
|
||||
///
|
||||
/*--cef(default_retval=XML_NODE_UNSUPPORTED)--*/
|
||||
virtual NodeType GetType() =0;
|
||||
|
||||
///
|
||||
// Returns the node depth. Depth starts at 0 for the root node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetDepth() =0;
|
||||
|
||||
///
|
||||
// Returns the local name. See
|
||||
// http://www.w3.org/TR/REC-xml-names/#NT-LocalPart for additional details.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetLocalName() =0;
|
||||
|
||||
///
|
||||
// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for
|
||||
// additional details.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetPrefix() =0;
|
||||
|
||||
///
|
||||
// Returns the qualified name, equal to (Prefix:)LocalName. See
|
||||
// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetQualifiedName() =0;
|
||||
|
||||
///
|
||||
// Returns the URI defining the namespace associated with the node. See
|
||||
// http://www.w3.org/TR/REC-xml-names/ for additional details.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetNamespaceURI() =0;
|
||||
|
||||
///
|
||||
// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for
|
||||
// additional details.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetBaseURI() =0;
|
||||
|
||||
///
|
||||
// Returns the xml:lang scope within which the node resides. See
|
||||
// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetXmlLang() =0;
|
||||
|
||||
///
|
||||
// Returns true if the node represents an empty element. <a/> is considered
|
||||
// empty but <a></a> is not.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsEmptyElement() =0;
|
||||
|
||||
///
|
||||
// Returns true if the node has a text value.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasValue() =0;
|
||||
|
||||
///
|
||||
// Returns the text value.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetValue() =0;
|
||||
|
||||
///
|
||||
// Returns true if the node has attributes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasAttributes() =0;
|
||||
|
||||
///
|
||||
// Returns the number of attributes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual size_t GetAttributeCount() =0;
|
||||
|
||||
///
|
||||
// Returns the value of the attribute at the specified 0-based index.
|
||||
///
|
||||
/*--cef(capi_name=get_attribute_byindex,index_param=index)--*/
|
||||
virtual CefString GetAttribute(int index) =0;
|
||||
|
||||
///
|
||||
// Returns the value of the attribute with the specified qualified name.
|
||||
///
|
||||
/*--cef(capi_name=get_attribute_byqname)--*/
|
||||
virtual CefString GetAttribute(const CefString& qualifiedName) =0;
|
||||
|
||||
///
|
||||
// Returns the value of the attribute with the specified local name and
|
||||
// namespace URI.
|
||||
///
|
||||
/*--cef(capi_name=get_attribute_bylname)--*/
|
||||
virtual CefString GetAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) =0;
|
||||
|
||||
///
|
||||
// Returns an XML representation of the current node's children.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetInnerXml() =0;
|
||||
|
||||
///
|
||||
// Returns an XML representation of the current node including its children.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetOuterXml() =0;
|
||||
|
||||
///
|
||||
// Returns the line number for the current node.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetLineNumber() =0;
|
||||
|
||||
|
||||
// Attribute nodes are not traversed by default. The below methods can be
|
||||
// used to move the cursor to an attribute node. MoveToCarryingElement() can
|
||||
// be called afterwards to return the cursor to the carrying element. The
|
||||
// depth of an attribute node will be 1 + the depth of the carrying element.
|
||||
|
||||
///
|
||||
// Moves the cursor to the attribute at the specified 0-based index. Returns
|
||||
// true if the cursor position was set successfully.
|
||||
///
|
||||
/*--cef(capi_name=move_to_attribute_byindex,index_param=index)--*/
|
||||
virtual bool MoveToAttribute(int index) =0;
|
||||
|
||||
///
|
||||
// Moves the cursor to the attribute with the specified qualified name.
|
||||
// Returns true if the cursor position was set successfully.
|
||||
///
|
||||
/*--cef(capi_name=move_to_attribute_byqname)--*/
|
||||
virtual bool MoveToAttribute(const CefString& qualifiedName) =0;
|
||||
|
||||
///
|
||||
// Moves the cursor to the attribute with the specified local name and
|
||||
// namespace URI. Returns true if the cursor position was set successfully.
|
||||
///
|
||||
/*--cef(capi_name=move_to_attribute_bylname)--*/
|
||||
virtual bool MoveToAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) =0;
|
||||
|
||||
///
|
||||
// Moves the cursor to the first attribute in the current element. Returns
|
||||
// true if the cursor position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToFirstAttribute() =0;
|
||||
|
||||
///
|
||||
// Moves the cursor to the next attribute in the current element. Returns
|
||||
// true if the cursor position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToNextAttribute() =0;
|
||||
|
||||
///
|
||||
// Moves the cursor back to the carrying element. Returns true if the cursor
|
||||
// position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToCarryingElement() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_XML_READER_H_
|
@ -1,141 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_ZIP_READER_H_
|
||||
#define CEF_INCLUDE_CEF_ZIP_READER_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_stream.h"
|
||||
|
||||
///
|
||||
// Class that supports the reading of zip archives via the zlib unzip API.
|
||||
// The methods of this class should only be called on the thread that creates
|
||||
// the object.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefZipReader : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Create a new CefZipReader object. The returned object's methods can only
|
||||
// be called from the thread that created the object.
|
||||
///
|
||||
/*--cef()--*/
|
||||
static CefRefPtr<CefZipReader> Create(CefRefPtr<CefStreamReader> stream);
|
||||
|
||||
///
|
||||
// Moves the cursor to the first file in the archive. Returns true if the
|
||||
// cursor position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToFirstFile() =0;
|
||||
|
||||
///
|
||||
// Moves the cursor to the next file in the archive. Returns true if the
|
||||
// cursor position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToNextFile() =0;
|
||||
|
||||
///
|
||||
// Moves the cursor to the specified file in the archive. If |caseSensitive|
|
||||
// is true then the search will be case sensitive. Returns true if the cursor
|
||||
// position was set successfully.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MoveToFile(const CefString& fileName, bool caseSensitive) =0;
|
||||
|
||||
///
|
||||
// Closes the archive. This should be called directly to ensure that cleanup
|
||||
// occurs on the correct thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Close() =0;
|
||||
|
||||
|
||||
// The below methods act on the file at the current cursor position.
|
||||
|
||||
///
|
||||
// Returns the name of the file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetFileName() =0;
|
||||
|
||||
///
|
||||
// Returns the uncompressed size of the file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 GetFileSize() =0;
|
||||
|
||||
///
|
||||
// Returns the last modified timestamp for the file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual time_t GetFileLastModified() =0;
|
||||
|
||||
///
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
// optionally be specified.
|
||||
///
|
||||
/*--cef(optional_param=password)--*/
|
||||
virtual bool OpenFile(const CefString& password) =0;
|
||||
|
||||
///
|
||||
// Closes the file.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CloseFile() =0;
|
||||
|
||||
///
|
||||
// Read uncompressed file contents into the specified buffer. Returns < 0 if
|
||||
// an error occurred, 0 if at the end of file, or the number of bytes read.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int ReadFile(void* buffer, size_t bufferSize) =0;
|
||||
|
||||
///
|
||||
// Returns the current offset in the uncompressed file contents.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int64 Tell() =0;
|
||||
|
||||
///
|
||||
// Returns true if at end of the file contents.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Eof() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_ZIP_READER_H_
|
@ -1,72 +0,0 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_ZOOM_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_ZOOM_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Implement this interface to customize zoom handling. The methods of this
|
||||
// class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefZoomHandler : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Called when the browser wants to retrieve the zoom level for the given
|
||||
// |url|. Return true if |zoomLevel| has been set to the custom zoom level.
|
||||
// Return false for the browser's default zoom handling behavior.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnGetZoomLevel(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
double& zoomLevel) { return false; }
|
||||
|
||||
///
|
||||
// Called when the browser's zoom level has been set to |zoomLevel| for the
|
||||
// given |url|. Return true to indicate that the new setting has been handled.
|
||||
// Return false to use the browser's default zoom handling behavior.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnSetZoomLevel(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
double zoomLevel) { return false; }
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_ZOOM_HANDLER_H_
|
@ -1,129 +0,0 @@
|
||||
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
#else // !BUILDING_CEF_SHARED
|
||||
|
||||
#if defined(_WIN32)
|
||||
#ifndef OS_WIN
|
||||
#define OS_WIN 1
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
#ifndef OS_MACOSX
|
||||
#define OS_MACOSX 1
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
#ifndef OS_LINUX
|
||||
#define OS_LINUX 1
|
||||
#endif
|
||||
#else
|
||||
#error Please add support for your platform in cef_build.h
|
||||
#endif
|
||||
|
||||
// For access to standard POSIXish features, use OS_POSIX instead of a
|
||||
// more specific macro.
|
||||
#if defined(OS_MACOSX) || defined(OS_LINUX)
|
||||
#ifndef OS_POSIX
|
||||
#define OS_POSIX 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Compiler detection.
|
||||
#if defined(__GNUC__)
|
||||
#ifndef COMPILER_GCC
|
||||
#define COMPILER_GCC 1
|
||||
#endif
|
||||
#elif defined(_MSC_VER)
|
||||
#ifndef COMPILER_MSVC
|
||||
#define COMPILER_MSVC 1
|
||||
#endif
|
||||
#else
|
||||
#error Please add support for your compiler in cef_build.h
|
||||
#endif
|
||||
|
||||
// Annotate a virtual method indicating it must be overriding a virtual
|
||||
// method in the parent class.
|
||||
// Use like:
|
||||
// virtual void foo() OVERRIDE;
|
||||
#ifndef OVERRIDE
|
||||
#if defined(COMPILER_MSVC)
|
||||
#define OVERRIDE override
|
||||
#elif defined(__clang__)
|
||||
#define OVERRIDE override
|
||||
#else
|
||||
#define OVERRIDE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ALLOW_THIS_IN_INITIALIZER_LIST
|
||||
#if defined(COMPILER_MSVC)
|
||||
|
||||
// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
|
||||
// The warning remains disabled until popped by MSVC_POP_WARNING.
|
||||
#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
|
||||
__pragma(warning(disable:n))
|
||||
|
||||
// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
|
||||
// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
|
||||
// warnings.
|
||||
#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
|
||||
|
||||
// Pop effects of innermost MSVC_PUSH_* macro.
|
||||
#define MSVC_POP_WARNING() __pragma(warning(pop))
|
||||
|
||||
// Allows |this| to be passed as an argument in constructor initializer lists.
|
||||
// This uses push/pop instead of the seemingly simpler suppress feature to avoid
|
||||
// having the warning be disabled for more than just |code|.
|
||||
//
|
||||
// Example usage:
|
||||
// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
|
||||
//
|
||||
// Compiler warning C4355: 'this': used in base member initializer list:
|
||||
// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
|
||||
code \
|
||||
MSVC_POP_WARNING()
|
||||
#else // !COMPILER_MSVC
|
||||
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
|
||||
|
||||
#endif // !COMPILER_MSVC
|
||||
#endif
|
||||
|
||||
#endif // !BUILDING_CEF_SHARED
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_BUILD_H_
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user