diff --git a/.github b/.github index 079fcb433..fc652aa74 100644 --- a/.github +++ b/.github @@ -1,3 +1,2 @@ [docs] title = The Guide to Atom - manifest = intro.md, features.md, configuring-and-extending.md, styling.md, packages/intro.md, packages/installing.md, packages/markdown-preview.md, packages/wrap-guide.md diff --git a/.gitignore b/.gitignore index 2d92c1880..15d8caaf4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ build node_modules npm-debug.log /tags +/cef/ diff --git a/.gitmodules b/.gitmodules index 6495d34a2..c3f82e270 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,3 +46,6 @@ [submodule "vendor/packages/python.tmbundle"] path = vendor/packages/python.tmbundle url = https://github.com/textmate/python.tmbundle +[submodule "prebuilt-cef"] + path = prebuilt-cef + url = https://github.com/github/prebuilt-cef diff --git a/README.md b/README.md index 00db8d6b6..876a6697f 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ![atom](http://f.cl.ly/items/3h1L1O333p1d0W3D2K3r/atom-sketch.jpg) -## Building from source +Check out our [documentation on the docs tab](https://github.com/github/atom/docs). -*Be forwarned: Atom is pre-alpha software!* +## Building from source Requirements @@ -18,90 +18,3 @@ Requirements 2. cd ~/github/atom && `rake install` -Atom is installed! Type `atom [path]` from the commmand line or find it in `/Applications/Atom.app` - -## Your ~/.atom Directory -A basic ~/.atom directory is installed when you run `rake install`. Take a look at ~/.atom/user.coffee for more information. - -## Basic Keyboard shortcuts -Atom doesn't have much in the way of menus yet. Use these keyboard shortcuts to -explore features. - -`meta-o` : open file/directory - -`meta-n` : new window - -`meta-t` : open fuzzy file finder - -`meta-:` : open command prompt - -`meta-f` : open command prompt with / - -`meta-g` : repeat the last search - -`meta-r` : reload the current window - -`meta-alt-ctrl-s` : run specs - -`meta-alt-arrows` : split screen in direction of arrow - -`meta-alt-w` : toggle word wrap - -`meta-alt-f` : fold selected lines - -`meta-l` : go to line - -Most default OS X keybindings also work. - -## TreeView Keyboard shortcuts -With the treeview focused: - -`a` : Add a new file or directory. Directories end with '/'. - -`m` : Rename a file or directory - -## Init Script - -Atom will require `~/.atom/user.coffee` whenever a window is opened or reloaded if it is present in your -home directory. This is a rudimentary jumping off point for your own customizations. - -## Command Panel - -A partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam) - -*Examples* - -`,` selects entire file - -`1,4` selects lines 1-4 - -`/pattern` selects the first match after the cursor/selection - -`s/pattern/replacement` replace first text matching pattern in current selection - -`s/pattern/replacement/g` replace all text matching pattern in current selection - -`,s/pattern/replacement/g` replace all text matching pattern in file - -`1,4s/pattern/replacement` replace all text matching pattern in lines 1-4 - -`x/pattern` selects all matches in the current selections - -`,x/pattern` selects all matches in the file - -`,x/pattern1/ x/pattern2` "structural regex" - selects all matches of pattern2 inside matches of pattern1 - -## Key Bindings - -Atom has a CSS based key binding scheme. We will add a nicer loading mechanism, but for now you can bind -keys by calling `window.keymap.bindKeys` with a CSS selector and a hash of key-pattern -> event mappings. - -```coffeescript -window.keymap.bindKeys '.editor' - 'ctrl-p': 'party-time' - 'ctrl-q': 'open-dialog-q' -``` - -When a keypress matches a pattern on an element that matches the selector, it will be translated to the -named event, which will bubble up the DOM from the site of the keypress. Extension code can listen for -the named event and react to it. diff --git a/Rakefile b/Rakefile index 9e4b28940..071121f0b 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,7 @@ BUILD_DIR = 'atom-build' require 'erb' desc "Build Atom via `xcodebuild`" -task :build => "create-project" do +task :build => "create-xcode-project" do command = "xcodebuild -target Atom -configuration Release SYMROOT=#{BUILD_DIR}" output = `#{command}` if $?.exitstatus != 0 @@ -15,11 +15,19 @@ task :build => "create-project" do end desc "Create xcode project from gyp file" -task "create-project" => "bootstrap" do +task "create-xcode-project" => "update-cef" do `rm -rf atom.xcodeproj` `gyp --depth=. atom.gyp` end +desc "Update CEF to the latest version specified by the prebuilt-cef submodule" +task "update-cef" => "bootstrap" do + exit 1 unless system %{prebuilt-cef/script/download -f cef} + Dir.glob('cef/*.gypi').each do |filename| + `sed -i '' -e "s/'include\\//'cef\\/include\\//" -e "s/'libcef_dll\\//'cef\\/libcef_dll\\//" #{filename}` + end +end + task "bootstrap" do `script/bootstrap` end @@ -35,15 +43,8 @@ task :install => [:clean, :build] do `cp -r #{path} #{File.expand_path(dest)}` # Install cli atom - usr_bin_path = default_usr_bin_path = "/opt/github/bin" + usr_bin_path = "/opt/github/bin" cli_path = "#{usr_bin_path}/atom" - stable_cli_path = "#{usr_bin_path}/atom-stable" - `echo "use 'atom --stable' in place of atom-stable." > #{stable_cli_path}` - - if !File.exists?(usr_bin_path) - $stderr.puts "ERROR: Failed to install atom cli tool at '#{usr_bin_path}'" - exit 1 - end template = ERB.new CLI_SCRIPT namespace = OpenStruct.new(:application_path => dest, :resource_path => ATOM_SRC_PATH) @@ -55,27 +56,12 @@ task :install => [:clean, :build] do Rake::Task["create-dot-atom"].invoke() Rake::Task["clone-default-bundles"].invoke() - puts "\033[32mType `atom` to start Atom! In Atom press `cmd-,` to edit your `.atom` directory\033[0m" + puts "\033[32mType `atom` to start Atom! In Atom press `cmd-,` to edit your `~/.atom` directory\033[0m" end desc "Creates .atom file if non exists" task "create-dot-atom" do - # Migration: If there is still a bundle path, rename it to packages - if File.exists?(DOT_ATOM_PATH) and File.exists?(File.join(DOT_ATOM_PATH, "bundles")) - if File.exists?(File.join(DOT_ATOM_PATH, "packages")) - `mv #{File.join(DOT_ATOM_PATH, "bundles", "*")} #{File.join(DOT_ATOM_PATH, "packages")}` - $stderr.puts "WARNING: Bundles from ~/.atom/bundles were moved to ~/.atom/packages" - else - `mv #{File.join(DOT_ATOM_PATH, "bundles")} #{File.join(DOT_ATOM_PATH, "packages")}` - $stderr.puts "WARNING: ~/.atom/bundles was moved to ~/.atom/packages" - end - end - - # Migration: remove files that are no longer needed - `rm -rf #{File.join(DOT_ATOM_PATH, 'default-config.coffee')}` - - dot_atom_template_path = ATOM_SRC_PATH + "/.atom" - replace_dot_atom = false + dot_atom_template_path = ATOM_SRC_PATH + "/dot-atom" if File.exists?(DOT_ATOM_PATH) user_config = "#{DOT_ATOM_PATH}/user.coffee" @@ -85,17 +71,11 @@ task "create-dot-atom" do `mv #{old_user_config} #{user_config}` puts "\033[32mRenamed #{old_user_config} to #{user_config}\033[0m" end - - next + else + `mkdir "#{DOT_ATOM_PATH}"` + `cp -r "#{dot_atom_template_path}/" "#{DOT_ATOM_PATH}"/` + `cp -r "#{ATOM_SRC_PATH}/themes/" "#{DOT_ATOM_PATH}"/themes/` end - - `rm -rf "#{DOT_ATOM_PATH}"` - `mkdir "#{DOT_ATOM_PATH}"` - - `cp "#{dot_atom_template_path}/user.coffee" "#{DOT_ATOM_PATH}"` - `cp "#{dot_atom_template_path}/user.css" "#{DOT_ATOM_PATH}"` - `cp -r "#{dot_atom_template_path}/packages" "#{DOT_ATOM_PATH}"` - `cp -r "#{ATOM_SRC_PATH}/themes" "#{DOT_ATOM_PATH}"` end desc "Clone default bundles into vendor/bundles directory" @@ -112,10 +92,12 @@ task :clean do `rm -rf /tmp/atom-compiled-scripts` end -desc "Run Atom" -task :run, [:atom_arg] => :build do |name, args| +desc "Run the specs" +task :test => ["update-cef", "clone-default-bundles", "build"] do + `pkill Atom` if path = application_path() - cmd = "#{path}/Contents/MacOS/Atom #{args[:atom_arg]} 2> /dev/null" + `rm -rf path` + cmd = "#{path}/Contents/MacOS/Atom --test --resource-path=#{ATOM_SRC_PATH} 2> /dev/null" system(cmd) exit($?.exitstatus) else @@ -123,19 +105,13 @@ task :run, [:atom_arg] => :build do |name, args| end end -desc "Run the specs" -task :test => ["clean", "clone-default-bundles"] do - `pkill Atom` - Rake::Task["run"].invoke("--test --resource-path=#{ATOM_SRC_PATH}") -end - desc "Run the benchmarks" task :benchmark do Rake::Task["run"].invoke("--benchmark") end task :nof do - system %{find . -name *spec.coffee | grep -v #{BUILD_DIR} | xargs sed -E -i "" "s/f+(it|describe) +(['\\"])/\\1 \\2/g"} + system %{find . -name *spec.coffee | grep --invert-match --regexp "#{BUILD_DIR}\\|##package-name##" | xargs sed -E -i "" "s/f+(it|describe) +(['\\"])/\\1 \\2/g"} end task :tags do diff --git a/atom.gyp b/atom.gyp index b52c5b3ac..e06b0d664 100644 --- a/atom.gyp +++ b/atom.gyp @@ -25,7 +25,7 @@ 'default_configuration': 'Debug', 'configurations': { 'Debug': { - 'defines': ['DEBUG=1', 'RESOURCE_PATH="$PROJECT_DIR"'], + 'defines': ['DEBUG=1'], 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL' : '0' }, }, 'Release': { @@ -132,8 +132,8 @@ { 'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/', 'files': [ - 'cef/frameworks/libcef.dylib', - 'cef/frameworks/ffmpegsumo.so', + 'cef/Release/libcef.dylib', + 'cef/Release/ffmpegsumo.so', ], }, { @@ -246,7 +246,7 @@ ], 'link_settings': { 'libraries': [ - 'cef/frameworks/libcef.dylib', + 'cef/Release/libcef.dylib', ], } }, diff --git a/benchmark/benchmark-suite.coffee b/benchmark/benchmark-suite.coffee index 41e437f9b..d77958db7 100644 --- a/benchmark/benchmark-suite.coffee +++ b/benchmark/benchmark-suite.coffee @@ -22,7 +22,7 @@ describe "editor.", -> editor.on 'editor:display-updated', done runs -> - projectPath = rootView.project.getPath() + projectPath = project.getPath() $(window).off 'beforeunload' window.shutdown() atom.setRootViewStateForPath(projectPath, null) @@ -38,7 +38,7 @@ describe "editor.", -> describe "opening-buffers.", -> benchmark "300-line-file.", -> - buffer = rootView.project.bufferForPath('medium.coffee') + buffer = project.bufferForPath('medium.coffee') describe "empty-file.", -> benchmark "insert-delete", -> diff --git a/cef/Resources/aliasCursor.png b/cef/Resources/aliasCursor.png deleted file mode 100644 index d33d7e98f..000000000 Binary files a/cef/Resources/aliasCursor.png and /dev/null differ diff --git a/cef/Resources/am.lproj/locale.pak b/cef/Resources/am.lproj/locale.pak deleted file mode 100644 index 65189adb0..000000000 Binary files a/cef/Resources/am.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ar.lproj/locale.pak b/cef/Resources/ar.lproj/locale.pak deleted file mode 100644 index fcbab5ebc..000000000 Binary files a/cef/Resources/ar.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/bg.lproj/locale.pak b/cef/Resources/bg.lproj/locale.pak deleted file mode 100644 index 6a462255a..000000000 Binary files a/cef/Resources/bg.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/bn.lproj/locale.pak b/cef/Resources/bn.lproj/locale.pak deleted file mode 100644 index 895709a20..000000000 Binary files a/cef/Resources/bn.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ca.lproj/locale.pak b/cef/Resources/ca.lproj/locale.pak deleted file mode 100644 index 587b9e43e..000000000 Binary files a/cef/Resources/ca.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/cef.pak b/cef/Resources/cef.pak deleted file mode 100644 index 37fa7fb5e..000000000 Binary files a/cef/Resources/cef.pak and /dev/null differ diff --git a/cef/Resources/cellCursor.png b/cef/Resources/cellCursor.png deleted file mode 100644 index 5c616c47b..000000000 Binary files a/cef/Resources/cellCursor.png and /dev/null differ diff --git a/cef/Resources/contextMenuCursor.png b/cef/Resources/contextMenuCursor.png deleted file mode 100644 index ae100c7ea..000000000 Binary files a/cef/Resources/contextMenuCursor.png and /dev/null differ diff --git a/cef/Resources/copyCursor.png b/cef/Resources/copyCursor.png deleted file mode 100644 index 33be332bb..000000000 Binary files a/cef/Resources/copyCursor.png and /dev/null differ diff --git a/cef/Resources/cs.lproj/locale.pak b/cef/Resources/cs.lproj/locale.pak deleted file mode 100644 index de45ea970..000000000 Binary files a/cef/Resources/cs.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/da.lproj/locale.pak b/cef/Resources/da.lproj/locale.pak deleted file mode 100644 index eff5594cc..000000000 Binary files a/cef/Resources/da.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/de.lproj/locale.pak b/cef/Resources/de.lproj/locale.pak deleted file mode 100644 index 58e3ecf6b..000000000 Binary files a/cef/Resources/de.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/deleteButton.png b/cef/Resources/deleteButton.png deleted file mode 100644 index 67e2240c5..000000000 Binary files a/cef/Resources/deleteButton.png and /dev/null differ diff --git a/cef/Resources/deleteButton.tiff b/cef/Resources/deleteButton.tiff deleted file mode 100644 index bf4347ef6..000000000 Binary files a/cef/Resources/deleteButton.tiff and /dev/null differ diff --git a/cef/Resources/deleteButton@2x.png b/cef/Resources/deleteButton@2x.png deleted file mode 100644 index e6046d475..000000000 Binary files a/cef/Resources/deleteButton@2x.png and /dev/null differ diff --git a/cef/Resources/deleteButtonPressed.png b/cef/Resources/deleteButtonPressed.png deleted file mode 100644 index 2dbd13df4..000000000 Binary files a/cef/Resources/deleteButtonPressed.png and /dev/null differ diff --git a/cef/Resources/deleteButtonPressed.tiff b/cef/Resources/deleteButtonPressed.tiff deleted file mode 100644 index 6232484d6..000000000 Binary files a/cef/Resources/deleteButtonPressed.tiff and /dev/null differ diff --git a/cef/Resources/deleteButtonPressed@2x.png b/cef/Resources/deleteButtonPressed@2x.png deleted file mode 100644 index 3c999a7db..000000000 Binary files a/cef/Resources/deleteButtonPressed@2x.png and /dev/null differ diff --git a/cef/Resources/devtools_resources.pak b/cef/Resources/devtools_resources.pak deleted file mode 100644 index d56217fb7..000000000 Binary files a/cef/Resources/devtools_resources.pak and /dev/null differ diff --git a/cef/Resources/eastResizeCursor.png b/cef/Resources/eastResizeCursor.png deleted file mode 100644 index 9c1592e5d..000000000 Binary files a/cef/Resources/eastResizeCursor.png and /dev/null differ diff --git a/cef/Resources/eastWestResizeCursor.png b/cef/Resources/eastWestResizeCursor.png deleted file mode 100644 index f43202ef5..000000000 Binary files a/cef/Resources/eastWestResizeCursor.png and /dev/null differ diff --git a/cef/Resources/el.lproj/locale.pak b/cef/Resources/el.lproj/locale.pak deleted file mode 100644 index 90c7963fe..000000000 Binary files a/cef/Resources/el.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/en.lproj/locale.pak b/cef/Resources/en.lproj/locale.pak deleted file mode 100644 index 0eeeefc13..000000000 Binary files a/cef/Resources/en.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/en_GB.lproj/locale.pak b/cef/Resources/en_GB.lproj/locale.pak deleted file mode 100644 index 90f29dc40..000000000 Binary files a/cef/Resources/en_GB.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/es.lproj/locale.pak b/cef/Resources/es.lproj/locale.pak deleted file mode 100644 index f835a1360..000000000 Binary files a/cef/Resources/es.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/es_419.lproj/locale.pak b/cef/Resources/es_419.lproj/locale.pak deleted file mode 100644 index bfbcdcac1..000000000 Binary files a/cef/Resources/es_419.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/et.lproj/locale.pak b/cef/Resources/et.lproj/locale.pak deleted file mode 100644 index cefbf4dbc..000000000 Binary files a/cef/Resources/et.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/fa.lproj/locale.pak b/cef/Resources/fa.lproj/locale.pak deleted file mode 100644 index a4778379f..000000000 Binary files a/cef/Resources/fa.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/fi.lproj/locale.pak b/cef/Resources/fi.lproj/locale.pak deleted file mode 100644 index 305c8b4ff..000000000 Binary files a/cef/Resources/fi.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/fil.lproj/locale.pak b/cef/Resources/fil.lproj/locale.pak deleted file mode 100644 index 0bdb2166a..000000000 Binary files a/cef/Resources/fil.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/fr.lproj/locale.pak b/cef/Resources/fr.lproj/locale.pak deleted file mode 100644 index a9211de68..000000000 Binary files a/cef/Resources/fr.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/gu.lproj/locale.pak b/cef/Resources/gu.lproj/locale.pak deleted file mode 100644 index 6c3b22dc1..000000000 Binary files a/cef/Resources/gu.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/he.lproj/locale.pak b/cef/Resources/he.lproj/locale.pak deleted file mode 100644 index aae8411e3..000000000 Binary files a/cef/Resources/he.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/helpCursor.png b/cef/Resources/helpCursor.png deleted file mode 100644 index 6828d6a4d..000000000 Binary files a/cef/Resources/helpCursor.png and /dev/null differ diff --git a/cef/Resources/hi.lproj/locale.pak b/cef/Resources/hi.lproj/locale.pak deleted file mode 100644 index 000033420..000000000 Binary files a/cef/Resources/hi.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/hr.lproj/locale.pak b/cef/Resources/hr.lproj/locale.pak deleted file mode 100644 index b724a94ef..000000000 Binary files a/cef/Resources/hr.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/hu.lproj/locale.pak b/cef/Resources/hu.lproj/locale.pak deleted file mode 100644 index dd842fc21..000000000 Binary files a/cef/Resources/hu.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/id.lproj/locale.pak b/cef/Resources/id.lproj/locale.pak deleted file mode 100644 index 98826d0d1..000000000 Binary files a/cef/Resources/id.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/inputSpeech.png b/cef/Resources/inputSpeech.png deleted file mode 100644 index 8a5c469da..000000000 Binary files a/cef/Resources/inputSpeech.png and /dev/null differ diff --git a/cef/Resources/inputSpeech.tiff b/cef/Resources/inputSpeech.tiff deleted file mode 100644 index 11ba12959..000000000 Binary files a/cef/Resources/inputSpeech.tiff and /dev/null differ diff --git a/cef/Resources/it.lproj/locale.pak b/cef/Resources/it.lproj/locale.pak deleted file mode 100644 index 663343821..000000000 Binary files a/cef/Resources/it.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ja.lproj/locale.pak b/cef/Resources/ja.lproj/locale.pak deleted file mode 100644 index bc1f486fb..000000000 Binary files a/cef/Resources/ja.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/kn.lproj/locale.pak b/cef/Resources/kn.lproj/locale.pak deleted file mode 100644 index f25deb996..000000000 Binary files a/cef/Resources/kn.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ko.lproj/locale.pak b/cef/Resources/ko.lproj/locale.pak deleted file mode 100644 index 9600b505a..000000000 Binary files a/cef/Resources/ko.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/linearSRGB.icc b/cef/Resources/linearSRGB.icc deleted file mode 100644 index 5cc437106..000000000 Binary files a/cef/Resources/linearSRGB.icc and /dev/null differ diff --git a/cef/Resources/linkCursor.png b/cef/Resources/linkCursor.png deleted file mode 100644 index e5e274936..000000000 Binary files a/cef/Resources/linkCursor.png and /dev/null differ diff --git a/cef/Resources/lt.lproj/locale.pak b/cef/Resources/lt.lproj/locale.pak deleted file mode 100644 index 804667adc..000000000 Binary files a/cef/Resources/lt.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/lv.lproj/locale.pak b/cef/Resources/lv.lproj/locale.pak deleted file mode 100644 index 5027dd259..000000000 Binary files a/cef/Resources/lv.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/missingImage.png b/cef/Resources/missingImage.png deleted file mode 100644 index 5c24d20c2..000000000 Binary files a/cef/Resources/missingImage.png and /dev/null differ diff --git a/cef/Resources/missingImage.tiff b/cef/Resources/missingImage.tiff deleted file mode 100644 index bfde916ea..000000000 Binary files a/cef/Resources/missingImage.tiff and /dev/null differ diff --git a/cef/Resources/missingImage@2x.png b/cef/Resources/missingImage@2x.png deleted file mode 100644 index 6573d1747..000000000 Binary files a/cef/Resources/missingImage@2x.png and /dev/null differ diff --git a/cef/Resources/ml.lproj/locale.pak b/cef/Resources/ml.lproj/locale.pak deleted file mode 100644 index 4ba5c4d40..000000000 Binary files a/cef/Resources/ml.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/moveCursor.png b/cef/Resources/moveCursor.png deleted file mode 100644 index 4ca8d7037..000000000 Binary files a/cef/Resources/moveCursor.png and /dev/null differ diff --git a/cef/Resources/mr.lproj/locale.pak b/cef/Resources/mr.lproj/locale.pak deleted file mode 100644 index 35a709f9d..000000000 Binary files a/cef/Resources/mr.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ms.lproj/locale.pak b/cef/Resources/ms.lproj/locale.pak deleted file mode 100644 index 6d1eb5d9c..000000000 Binary files a/cef/Resources/ms.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/nb.lproj/locale.pak b/cef/Resources/nb.lproj/locale.pak deleted file mode 100644 index 500a994e1..000000000 Binary files a/cef/Resources/nb.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/nl.lproj/locale.pak b/cef/Resources/nl.lproj/locale.pak deleted file mode 100644 index 20aa175e2..000000000 Binary files a/cef/Resources/nl.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/noDropCursor.png b/cef/Resources/noDropCursor.png deleted file mode 100644 index 54463fc0c..000000000 Binary files a/cef/Resources/noDropCursor.png and /dev/null differ diff --git a/cef/Resources/noneCursor.png b/cef/Resources/noneCursor.png deleted file mode 100644 index bd1ff356f..000000000 Binary files a/cef/Resources/noneCursor.png and /dev/null differ diff --git a/cef/Resources/northEastResizeCursor.png b/cef/Resources/northEastResizeCursor.png deleted file mode 100644 index 0e8963907..000000000 Binary files a/cef/Resources/northEastResizeCursor.png and /dev/null differ diff --git a/cef/Resources/northEastSouthWestResizeCursor.png b/cef/Resources/northEastSouthWestResizeCursor.png deleted file mode 100644 index 9904c7b61..000000000 Binary files a/cef/Resources/northEastSouthWestResizeCursor.png and /dev/null differ diff --git a/cef/Resources/northResizeCursor.png b/cef/Resources/northResizeCursor.png deleted file mode 100644 index 0d020dbab..000000000 Binary files a/cef/Resources/northResizeCursor.png and /dev/null differ diff --git a/cef/Resources/northSouthResizeCursor.png b/cef/Resources/northSouthResizeCursor.png deleted file mode 100644 index 92400e919..000000000 Binary files a/cef/Resources/northSouthResizeCursor.png and /dev/null differ diff --git a/cef/Resources/northWestResizeCursor.png b/cef/Resources/northWestResizeCursor.png deleted file mode 100644 index 6723f614a..000000000 Binary files a/cef/Resources/northWestResizeCursor.png and /dev/null differ diff --git a/cef/Resources/northWestSouthEastResizeCursor.png b/cef/Resources/northWestSouthEastResizeCursor.png deleted file mode 100644 index b8de34ce7..000000000 Binary files a/cef/Resources/northWestSouthEastResizeCursor.png and /dev/null differ diff --git a/cef/Resources/nullPlugin.png b/cef/Resources/nullPlugin.png deleted file mode 100644 index a4195f67d..000000000 Binary files a/cef/Resources/nullPlugin.png and /dev/null differ diff --git a/cef/Resources/nullPlugin@2x.png b/cef/Resources/nullPlugin@2x.png deleted file mode 100644 index ccc40188a..000000000 Binary files a/cef/Resources/nullPlugin@2x.png and /dev/null differ diff --git a/cef/Resources/panIcon.png b/cef/Resources/panIcon.png deleted file mode 100644 index 4ca8d7037..000000000 Binary files a/cef/Resources/panIcon.png and /dev/null differ diff --git a/cef/Resources/pl.lproj/locale.pak b/cef/Resources/pl.lproj/locale.pak deleted file mode 100644 index 31af234a2..000000000 Binary files a/cef/Resources/pl.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/progressCursor.png b/cef/Resources/progressCursor.png deleted file mode 100644 index 25d702143..000000000 Binary files a/cef/Resources/progressCursor.png and /dev/null differ diff --git a/cef/Resources/pt_BR.lproj/locale.pak b/cef/Resources/pt_BR.lproj/locale.pak deleted file mode 100644 index 08adda03e..000000000 Binary files a/cef/Resources/pt_BR.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/pt_PT.lproj/locale.pak b/cef/Resources/pt_PT.lproj/locale.pak deleted file mode 100644 index f1ec8f4e4..000000000 Binary files a/cef/Resources/pt_PT.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ro.lproj/locale.pak b/cef/Resources/ro.lproj/locale.pak deleted file mode 100644 index 7e8a7a973..000000000 Binary files a/cef/Resources/ro.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ru.lproj/locale.pak b/cef/Resources/ru.lproj/locale.pak deleted file mode 100644 index 03678ade9..000000000 Binary files a/cef/Resources/ru.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/sk.lproj/locale.pak b/cef/Resources/sk.lproj/locale.pak deleted file mode 100644 index 7a0adfabe..000000000 Binary files a/cef/Resources/sk.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/sl.lproj/locale.pak b/cef/Resources/sl.lproj/locale.pak deleted file mode 100644 index a93192cfd..000000000 Binary files a/cef/Resources/sl.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/southEastResizeCursor.png b/cef/Resources/southEastResizeCursor.png deleted file mode 100644 index 415aa633b..000000000 Binary files a/cef/Resources/southEastResizeCursor.png and /dev/null differ diff --git a/cef/Resources/southResizeCursor.png b/cef/Resources/southResizeCursor.png deleted file mode 100644 index 60cf722d1..000000000 Binary files a/cef/Resources/southResizeCursor.png and /dev/null differ diff --git a/cef/Resources/southWestResizeCursor.png b/cef/Resources/southWestResizeCursor.png deleted file mode 100644 index 8dc5cdc58..000000000 Binary files a/cef/Resources/southWestResizeCursor.png and /dev/null differ diff --git a/cef/Resources/sr.lproj/locale.pak b/cef/Resources/sr.lproj/locale.pak deleted file mode 100644 index 9d17cb4f8..000000000 Binary files a/cef/Resources/sr.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/sv.lproj/locale.pak b/cef/Resources/sv.lproj/locale.pak deleted file mode 100644 index 82d18cf87..000000000 Binary files a/cef/Resources/sv.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/sw.lproj/locale.pak b/cef/Resources/sw.lproj/locale.pak deleted file mode 100644 index 6f773aa10..000000000 Binary files a/cef/Resources/sw.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/ta.lproj/locale.pak b/cef/Resources/ta.lproj/locale.pak deleted file mode 100644 index 3a3aa4446..000000000 Binary files a/cef/Resources/ta.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/te.lproj/locale.pak b/cef/Resources/te.lproj/locale.pak deleted file mode 100644 index a225c5496..000000000 Binary files a/cef/Resources/te.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/textAreaResizeCorner.png b/cef/Resources/textAreaResizeCorner.png deleted file mode 100644 index 66105dbcd..000000000 Binary files a/cef/Resources/textAreaResizeCorner.png and /dev/null differ diff --git a/cef/Resources/textAreaResizeCorner.tiff b/cef/Resources/textAreaResizeCorner.tiff deleted file mode 100644 index 5eeab606a..000000000 Binary files a/cef/Resources/textAreaResizeCorner.tiff and /dev/null differ diff --git a/cef/Resources/textAreaResizeCorner@2x.png b/cef/Resources/textAreaResizeCorner@2x.png deleted file mode 100644 index 7d26fbc42..000000000 Binary files a/cef/Resources/textAreaResizeCorner@2x.png and /dev/null differ diff --git a/cef/Resources/th.lproj/locale.pak b/cef/Resources/th.lproj/locale.pak deleted file mode 100644 index d954eecb2..000000000 Binary files a/cef/Resources/th.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/tr.lproj/locale.pak b/cef/Resources/tr.lproj/locale.pak deleted file mode 100644 index fdbf850df..000000000 Binary files a/cef/Resources/tr.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/uk.lproj/locale.pak b/cef/Resources/uk.lproj/locale.pak deleted file mode 100644 index 0ef1824ba..000000000 Binary files a/cef/Resources/uk.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/urlIcon.png b/cef/Resources/urlIcon.png deleted file mode 100644 index 53cb35451..000000000 Binary files a/cef/Resources/urlIcon.png and /dev/null differ diff --git a/cef/Resources/verticalTextCursor.png b/cef/Resources/verticalTextCursor.png deleted file mode 100644 index 0f2877ccc..000000000 Binary files a/cef/Resources/verticalTextCursor.png and /dev/null differ diff --git a/cef/Resources/vi.lproj/locale.pak b/cef/Resources/vi.lproj/locale.pak deleted file mode 100644 index 3ac42090d..000000000 Binary files a/cef/Resources/vi.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/waitCursor.png b/cef/Resources/waitCursor.png deleted file mode 100644 index 91412b818..000000000 Binary files a/cef/Resources/waitCursor.png and /dev/null differ diff --git a/cef/Resources/westResizeCursor.png b/cef/Resources/westResizeCursor.png deleted file mode 100644 index 544439adc..000000000 Binary files a/cef/Resources/westResizeCursor.png and /dev/null differ diff --git a/cef/Resources/zh_CN.lproj/locale.pak b/cef/Resources/zh_CN.lproj/locale.pak deleted file mode 100644 index 50ee386ae..000000000 Binary files a/cef/Resources/zh_CN.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/zh_TW.lproj/locale.pak b/cef/Resources/zh_TW.lproj/locale.pak deleted file mode 100644 index 0d00e83a2..000000000 Binary files a/cef/Resources/zh_TW.lproj/locale.pak and /dev/null differ diff --git a/cef/Resources/zoomInCursor.png b/cef/Resources/zoomInCursor.png deleted file mode 100644 index feec9bcbb..000000000 Binary files a/cef/Resources/zoomInCursor.png and /dev/null differ diff --git a/cef/Resources/zoomOutCursor.png b/cef/Resources/zoomOutCursor.png deleted file mode 100644 index f4a954e32..000000000 Binary files a/cef/Resources/zoomOutCursor.png and /dev/null differ diff --git a/cef/cef_paths.gypi b/cef/cef_paths.gypi deleted file mode 100644 index 963603e8b..000000000 --- a/cef/cef_paths.gypi +++ /dev/null @@ -1,415 +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': [ - 'cef/include/cef_app.h', - 'cef/include/cef_browser.h', - 'cef/include/cef_browser_process_handler.h', - 'cef/include/cef_callback.h', - 'cef/include/cef_client.h', - 'cef/include/cef_command_line.h', - 'cef/include/cef_context_menu_handler.h', - 'cef/include/cef_cookie.h', - 'cef/include/cef_dialog_handler.h', - 'cef/include/cef_display_handler.h', - 'cef/include/cef_dom.h', - 'cef/include/cef_download_handler.h', - 'cef/include/cef_download_item.h', - 'cef/include/cef_focus_handler.h', - 'cef/include/cef_frame.h', - 'cef/include/cef_geolocation.h', - 'cef/include/cef_geolocation_handler.h', - 'cef/include/cef_jsdialog_handler.h', - 'cef/include/cef_keyboard_handler.h', - 'cef/include/cef_life_span_handler.h', - 'cef/include/cef_load_handler.h', - 'cef/include/cef_menu_model.h', - 'cef/include/cef_origin_whitelist.h', - 'cef/include/cef_path_util.h', - 'cef/include/cef_process_message.h', - 'cef/include/cef_process_util.h', - 'cef/include/cef_proxy_handler.h', - 'cef/include/cef_render_handler.h', - 'cef/include/cef_render_process_handler.h', - 'cef/include/cef_request.h', - 'cef/include/cef_request_handler.h', - 'cef/include/cef_resource_bundle_handler.h', - 'cef/include/cef_resource_handler.h', - 'cef/include/cef_response.h', - 'cef/include/cef_scheme.h', - 'cef/include/cef_stream.h', - 'cef/include/cef_string_visitor.h', - 'cef/include/cef_task.h', - 'cef/include/cef_trace.h', - 'cef/include/cef_url.h', - 'cef/include/cef_urlrequest.h', - 'cef/include/cef_v8.h', - 'cef/include/cef_values.h', - 'cef/include/cef_web_plugin.h', - 'cef/include/cef_xml_reader.h', - 'cef/include/cef_zip_reader.h', - ], - 'autogen_capi_includes': [ - 'cef/include/capi/cef_app_capi.h', - 'cef/include/capi/cef_browser_capi.h', - 'cef/include/capi/cef_browser_process_handler_capi.h', - 'cef/include/capi/cef_callback_capi.h', - 'cef/include/capi/cef_client_capi.h', - 'cef/include/capi/cef_command_line_capi.h', - 'cef/include/capi/cef_context_menu_handler_capi.h', - 'cef/include/capi/cef_cookie_capi.h', - 'cef/include/capi/cef_dialog_handler_capi.h', - 'cef/include/capi/cef_display_handler_capi.h', - 'cef/include/capi/cef_dom_capi.h', - 'cef/include/capi/cef_download_handler_capi.h', - 'cef/include/capi/cef_download_item_capi.h', - 'cef/include/capi/cef_focus_handler_capi.h', - 'cef/include/capi/cef_frame_capi.h', - 'cef/include/capi/cef_geolocation_capi.h', - 'cef/include/capi/cef_geolocation_handler_capi.h', - 'cef/include/capi/cef_jsdialog_handler_capi.h', - 'cef/include/capi/cef_keyboard_handler_capi.h', - 'cef/include/capi/cef_life_span_handler_capi.h', - 'cef/include/capi/cef_load_handler_capi.h', - 'cef/include/capi/cef_menu_model_capi.h', - 'cef/include/capi/cef_origin_whitelist_capi.h', - 'cef/include/capi/cef_path_util_capi.h', - 'cef/include/capi/cef_process_message_capi.h', - 'cef/include/capi/cef_process_util_capi.h', - 'cef/include/capi/cef_proxy_handler_capi.h', - 'cef/include/capi/cef_render_handler_capi.h', - 'cef/include/capi/cef_render_process_handler_capi.h', - 'cef/include/capi/cef_request_capi.h', - 'cef/include/capi/cef_request_handler_capi.h', - 'cef/include/capi/cef_resource_bundle_handler_capi.h', - 'cef/include/capi/cef_resource_handler_capi.h', - 'cef/include/capi/cef_response_capi.h', - 'cef/include/capi/cef_scheme_capi.h', - 'cef/include/capi/cef_stream_capi.h', - 'cef/include/capi/cef_string_visitor_capi.h', - 'cef/include/capi/cef_task_capi.h', - 'cef/include/capi/cef_trace_capi.h', - 'cef/include/capi/cef_url_capi.h', - 'cef/include/capi/cef_urlrequest_capi.h', - 'cef/include/capi/cef_v8_capi.h', - 'cef/include/capi/cef_values_capi.h', - 'cef/include/capi/cef_web_plugin_capi.h', - 'cef/include/capi/cef_xml_reader_capi.h', - 'cef/include/capi/cef_zip_reader_capi.h', - ], - 'autogen_library_side': [ - 'cef/libcef_dll/ctocpp/app_ctocpp.cc', - 'cef/libcef_dll/ctocpp/app_ctocpp.h', - 'cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/auth_callback_cpptoc.h', - 'cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h', - 'cef/libcef_dll/cpptoc/binary_value_cpptoc.cc', - 'cef/libcef_dll/cpptoc/binary_value_cpptoc.h', - 'cef/libcef_dll/cpptoc/browser_cpptoc.cc', - 'cef/libcef_dll/cpptoc/browser_cpptoc.h', - 'cef/libcef_dll/cpptoc/browser_host_cpptoc.cc', - 'cef/libcef_dll/cpptoc/browser_host_cpptoc.h', - 'cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/callback_cpptoc.h', - 'cef/libcef_dll/ctocpp/client_ctocpp.cc', - 'cef/libcef_dll/ctocpp/client_ctocpp.h', - 'cef/libcef_dll/cpptoc/command_line_cpptoc.cc', - 'cef/libcef_dll/cpptoc/command_line_cpptoc.h', - 'cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc', - 'cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h', - 'cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc', - 'cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h', - 'cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc', - 'cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h', - 'cef/libcef_dll/cpptoc/domdocument_cpptoc.cc', - 'cef/libcef_dll/cpptoc/domdocument_cpptoc.h', - 'cef/libcef_dll/cpptoc/domevent_cpptoc.cc', - 'cef/libcef_dll/cpptoc/domevent_cpptoc.h', - 'cef/libcef_dll/ctocpp/domevent_listener_ctocpp.cc', - 'cef/libcef_dll/ctocpp/domevent_listener_ctocpp.h', - 'cef/libcef_dll/cpptoc/domnode_cpptoc.cc', - 'cef/libcef_dll/cpptoc/domnode_cpptoc.h', - 'cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc', - 'cef/libcef_dll/ctocpp/domvisitor_ctocpp.h', - 'cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc', - 'cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h', - 'cef/libcef_dll/ctocpp/display_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/display_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/download_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/download_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/download_item_cpptoc.cc', - 'cef/libcef_dll/cpptoc/download_item_cpptoc.h', - 'cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h', - 'cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h', - 'cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/focus_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/frame_cpptoc.cc', - 'cef/libcef_dll/cpptoc/frame_cpptoc.h', - 'cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.h', - 'cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/get_geolocation_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h', - 'cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h', - 'cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/list_value_cpptoc.cc', - 'cef/libcef_dll/cpptoc/list_value_cpptoc.h', - 'cef/libcef_dll/ctocpp/load_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/load_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/menu_model_cpptoc.cc', - 'cef/libcef_dll/cpptoc/menu_model_cpptoc.h', - 'cef/libcef_dll/cpptoc/post_data_cpptoc.cc', - 'cef/libcef_dll/cpptoc/post_data_cpptoc.h', - 'cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc', - 'cef/libcef_dll/cpptoc/post_data_element_cpptoc.h', - 'cef/libcef_dll/cpptoc/process_message_cpptoc.cc', - 'cef/libcef_dll/cpptoc/process_message_cpptoc.h', - 'cef/libcef_dll/ctocpp/proxy_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/proxy_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/quota_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/quota_callback_cpptoc.h', - 'cef/libcef_dll/ctocpp/read_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/read_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/render_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/render_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/request_cpptoc.cc', - 'cef/libcef_dll/cpptoc/request_cpptoc.h', - 'cef/libcef_dll/ctocpp/request_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/request_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h', - 'cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/resource_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/response_cpptoc.cc', - 'cef/libcef_dll/cpptoc/response_cpptoc.h', - 'cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h', - 'cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc', - 'cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h', - 'cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc', - 'cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h', - 'cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc', - 'cef/libcef_dll/cpptoc/stream_reader_cpptoc.h', - 'cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc', - 'cef/libcef_dll/cpptoc/stream_writer_cpptoc.h', - 'cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc', - 'cef/libcef_dll/ctocpp/string_visitor_ctocpp.h', - 'cef/libcef_dll/ctocpp/task_ctocpp.cc', - 'cef/libcef_dll/ctocpp/task_ctocpp.h', - 'cef/libcef_dll/cpptoc/task_runner_cpptoc.cc', - 'cef/libcef_dll/cpptoc/task_runner_cpptoc.h', - 'cef/libcef_dll/ctocpp/trace_client_ctocpp.cc', - 'cef/libcef_dll/ctocpp/trace_client_ctocpp.h', - 'cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc', - 'cef/libcef_dll/cpptoc/urlrequest_cpptoc.h', - 'cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc', - 'cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h', - 'cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8accessor_ctocpp.h', - 'cef/libcef_dll/cpptoc/v8context_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8context_cpptoc.h', - 'cef/libcef_dll/cpptoc/v8exception_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8exception_cpptoc.h', - 'cef/libcef_dll/ctocpp/v8handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h', - 'cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h', - 'cef/libcef_dll/cpptoc/v8value_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8value_cpptoc.h', - 'cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc', - 'cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h', - 'cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc', - 'cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h', - 'cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h', - 'cef/libcef_dll/ctocpp/write_handler_ctocpp.cc', - 'cef/libcef_dll/ctocpp/write_handler_ctocpp.h', - 'cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc', - 'cef/libcef_dll/cpptoc/xml_reader_cpptoc.h', - 'cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc', - 'cef/libcef_dll/cpptoc/zip_reader_cpptoc.h', - ], - 'autogen_client_side': [ - 'cef/libcef_dll/cpptoc/app_cpptoc.cc', - 'cef/libcef_dll/cpptoc/app_cpptoc.h', - 'cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/auth_callback_ctocpp.h', - 'cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h', - 'cef/libcef_dll/ctocpp/binary_value_ctocpp.cc', - 'cef/libcef_dll/ctocpp/binary_value_ctocpp.h', - 'cef/libcef_dll/ctocpp/browser_ctocpp.cc', - 'cef/libcef_dll/ctocpp/browser_ctocpp.h', - 'cef/libcef_dll/ctocpp/browser_host_ctocpp.cc', - 'cef/libcef_dll/ctocpp/browser_host_ctocpp.h', - 'cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/callback_ctocpp.h', - 'cef/libcef_dll/cpptoc/client_cpptoc.cc', - 'cef/libcef_dll/cpptoc/client_cpptoc.h', - 'cef/libcef_dll/ctocpp/command_line_ctocpp.cc', - 'cef/libcef_dll/ctocpp/command_line_ctocpp.h', - 'cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc', - 'cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h', - 'cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc', - 'cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h', - 'cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc', - 'cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h', - 'cef/libcef_dll/ctocpp/domdocument_ctocpp.cc', - 'cef/libcef_dll/ctocpp/domdocument_ctocpp.h', - 'cef/libcef_dll/ctocpp/domevent_ctocpp.cc', - 'cef/libcef_dll/ctocpp/domevent_ctocpp.h', - 'cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc', - 'cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h', - 'cef/libcef_dll/ctocpp/domnode_ctocpp.cc', - 'cef/libcef_dll/ctocpp/domnode_ctocpp.h', - 'cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc', - 'cef/libcef_dll/cpptoc/domvisitor_cpptoc.h', - 'cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc', - 'cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h', - 'cef/libcef_dll/cpptoc/display_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/display_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/download_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/download_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/download_item_ctocpp.cc', - 'cef/libcef_dll/ctocpp/download_item_ctocpp.h', - 'cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h', - 'cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h', - 'cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/focus_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/frame_ctocpp.cc', - 'cef/libcef_dll/ctocpp/frame_ctocpp.h', - 'cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.h', - 'cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h', - 'cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h', - 'cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/list_value_ctocpp.cc', - 'cef/libcef_dll/ctocpp/list_value_ctocpp.h', - 'cef/libcef_dll/cpptoc/load_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/load_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/menu_model_ctocpp.cc', - 'cef/libcef_dll/ctocpp/menu_model_ctocpp.h', - 'cef/libcef_dll/ctocpp/post_data_ctocpp.cc', - 'cef/libcef_dll/ctocpp/post_data_ctocpp.h', - 'cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc', - 'cef/libcef_dll/ctocpp/post_data_element_ctocpp.h', - 'cef/libcef_dll/ctocpp/process_message_ctocpp.cc', - 'cef/libcef_dll/ctocpp/process_message_ctocpp.h', - 'cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/quota_callback_ctocpp.cc', - 'cef/libcef_dll/ctocpp/quota_callback_ctocpp.h', - 'cef/libcef_dll/cpptoc/read_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/read_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/render_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/render_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/request_ctocpp.cc', - 'cef/libcef_dll/ctocpp/request_ctocpp.h', - 'cef/libcef_dll/cpptoc/request_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/request_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h', - 'cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/resource_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/response_ctocpp.cc', - 'cef/libcef_dll/ctocpp/response_ctocpp.h', - 'cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h', - 'cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc', - 'cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h', - 'cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc', - 'cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h', - 'cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc', - 'cef/libcef_dll/ctocpp/stream_reader_ctocpp.h', - 'cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc', - 'cef/libcef_dll/ctocpp/stream_writer_ctocpp.h', - 'cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc', - 'cef/libcef_dll/cpptoc/string_visitor_cpptoc.h', - 'cef/libcef_dll/cpptoc/task_cpptoc.cc', - 'cef/libcef_dll/cpptoc/task_cpptoc.h', - 'cef/libcef_dll/ctocpp/task_runner_ctocpp.cc', - 'cef/libcef_dll/ctocpp/task_runner_ctocpp.h', - 'cef/libcef_dll/cpptoc/trace_client_cpptoc.cc', - 'cef/libcef_dll/cpptoc/trace_client_cpptoc.h', - 'cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc', - 'cef/libcef_dll/ctocpp/urlrequest_ctocpp.h', - 'cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc', - 'cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h', - 'cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8accessor_cpptoc.h', - 'cef/libcef_dll/ctocpp/v8context_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8context_ctocpp.h', - 'cef/libcef_dll/ctocpp/v8exception_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8exception_ctocpp.h', - 'cef/libcef_dll/cpptoc/v8handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/v8handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h', - 'cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h', - 'cef/libcef_dll/ctocpp/v8value_ctocpp.cc', - 'cef/libcef_dll/ctocpp/v8value_ctocpp.h', - 'cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc', - 'cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h', - 'cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc', - 'cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h', - 'cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc', - 'cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h', - 'cef/libcef_dll/cpptoc/write_handler_cpptoc.cc', - 'cef/libcef_dll/cpptoc/write_handler_cpptoc.h', - 'cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc', - 'cef/libcef_dll/ctocpp/xml_reader_ctocpp.h', - 'cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc', - 'cef/libcef_dll/ctocpp/zip_reader_ctocpp.h', - ], - }, -} diff --git a/cef/cef_paths2.gypi b/cef/cef_paths2.gypi deleted file mode 100644 index fadc4f101..000000000 --- a/cef/cef_paths2.gypi +++ /dev/null @@ -1,197 +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': [ - 'cef/include/cef_base.h', - 'cef/include/cef_pack_resources.h', - 'cef/include/cef_pack_strings.h', - 'cef/include/cef_runnable.h', - 'cef/include/cef_trace_event.h', - 'cef/include/cef_version.h', - 'cef/include/internal/cef_build.h', - 'cef/include/internal/cef_export.h', - 'cef/include/internal/cef_ptr.h', - 'cef/include/internal/cef_string.h', - 'cef/include/internal/cef_string_list.h', - 'cef/include/internal/cef_string_map.h', - 'cef/include/internal/cef_string_multimap.h', - 'cef/include/internal/cef_string_types.h', - 'cef/include/internal/cef_string_wrappers.h', - 'cef/include/internal/cef_time.h', - 'cef/include/internal/cef_tuple.h', - 'cef/include/internal/cef_types.h', - 'cef/include/internal/cef_types_wrappers.h', - '<@(autogen_cpp_includes)', - ], - 'includes_capi': [ - 'cef/include/capi/cef_base_capi.h', - '<@(autogen_capi_includes)', - ], - 'includes_wrapper': [ - 'cef/include/wrapper/cef_byte_read_handler.h', - 'cef/include/wrapper/cef_stream_resource_handler.h', - 'cef/include/wrapper/cef_xml_object.h', - 'cef/include/wrapper/cef_zip_archive.h', - ], - 'includes_win': [ - 'cef/include/internal/cef_types_win.h', - 'cef/include/internal/cef_win.h', - ], - 'includes_mac': [ - 'cef/include/cef_application_mac.h', - 'cef/include/internal/cef_mac.h', - 'cef/include/internal/cef_types_mac.h', - ], - 'includes_linux': [ - 'cef/include/internal/cef_linux.h', - 'cef/include/internal/cef_types_linux.h', - ], - 'libcef_sources_common': [ - 'cef/libcef_dll/cef_logging.h', - 'cef/libcef_dll/cpptoc/cpptoc.h', - 'cef/libcef_dll/ctocpp/ctocpp.h', - 'cef/libcef_dll/libcef_dll.cc', - 'cef/libcef_dll/libcef_dll2.cc', - 'cef/libcef_dll/resource.h', - 'cef/libcef_dll/transfer_util.cpp', - 'cef/libcef_dll/transfer_util.h', - '<@(autogen_library_side)', - ], - 'libcef_dll_wrapper_sources_common': [ - 'cef/libcef_dll/cef_logging.h', - 'cef/libcef_dll/cpptoc/base_cpptoc.h', - 'cef/libcef_dll/cpptoc/cpptoc.h', - 'cef/libcef_dll/ctocpp/base_ctocpp.h', - 'cef/libcef_dll/ctocpp/ctocpp.h', - 'cef/libcef_dll/transfer_util.cpp', - 'cef/libcef_dll/transfer_util.h', - 'cef/libcef_dll/wrapper/cef_byte_read_handler.cc', - 'cef/libcef_dll/wrapper/cef_stream_resource_handler.cc', - 'cef/libcef_dll/wrapper/cef_xml_object.cc', - 'cef/libcef_dll/wrapper/cef_zip_archive.cc', - 'cef/libcef_dll/wrapper/libcef_dll_wrapper.cc', - 'cef/libcef_dll/wrapper/libcef_dll_wrapper2.cc', - '<@(autogen_client_side)', - ], - 'cefclient_sources_common': [ - 'tests/cefclient/cefclient.cpp', - 'tests/cefclient/cefclient.h', - 'tests/cefclient/binding_test.cpp', - 'tests/cefclient/binding_test.h', - 'tests/cefclient/client_app.cpp', - 'tests/cefclient/client_app.h', - 'tests/cefclient/client_app_delegates.cpp', - 'tests/cefclient/client_handler.cpp', - 'tests/cefclient/client_handler.h', - 'tests/cefclient/client_renderer.cpp', - 'tests/cefclient/client_renderer.h', - 'tests/cefclient/client_switches.cpp', - 'tests/cefclient/client_switches.h', - 'tests/cefclient/dialog_test.cpp', - 'tests/cefclient/dialog_test.h', - 'tests/cefclient/dom_test.cpp', - 'tests/cefclient/dom_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/res/binding.html', - 'tests/cefclient/res/dialogs.html', - 'tests/cefclient/res/domaccess.html', - 'tests/cefclient/res/localstorage.html', - 'tests/cefclient/res/logo.png', - 'tests/cefclient/res/performance.html', - 'tests/cefclient/res/xmlhttprequest.html', - '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_sources_win': [ - 'tests/cefclient/cefclient.rc', - 'tests/cefclient/cefclient_osr_widget_win.h', - 'tests/cefclient/cefclient_osr_widget_win.cpp', - 'tests/cefclient/cefclient_win.cpp', - 'tests/cefclient/client_handler_win.cpp', - 'tests/cefclient/osrenderer.h', - 'tests/cefclient/osrenderer.cpp', - 'tests/cefclient/resource.h', - 'tests/cefclient/res/cefclient.ico', - 'tests/cefclient/res/logoball.png', - 'tests/cefclient/res/small.ico', - 'tests/cefclient/res/transparency.html', - 'tests/cefclient/resource_util_win.cpp', - ], - 'cefclient_sources_mac': [ - 'tests/cefclient/cefclient_mac.mm', - 'tests/cefclient/client_handler_mac.mm', - 'tests/cefclient/resource_util_mac.mm', - ], - 'cefclient_sources_mac_helper': [ - 'tests/cefclient/binding_test.cpp', - 'tests/cefclient/binding_test.h', - 'tests/cefclient/client_app.cpp', - 'tests/cefclient/client_app.h', - 'tests/cefclient/client_app_delegates.cpp', - 'tests/cefclient/client_handler.cpp', - 'tests/cefclient/client_handler.h', - 'tests/cefclient/client_handler_mac.mm', - 'tests/cefclient/client_renderer.cpp', - 'tests/cefclient/client_renderer.h', - 'tests/cefclient/client_switches.cpp', - 'tests/cefclient/client_switches.h', - 'tests/cefclient/dialog_test.cpp', - 'tests/cefclient/dialog_test.h', - 'tests/cefclient/dom_test.cpp', - 'tests/cefclient/dom_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/process_helper_mac.cpp', - 'tests/cefclient/resource_util.h', - 'tests/cefclient/resource_util_mac.mm', - '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_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/binding.html', - 'tests/cefclient/res/dialogs.html', - 'tests/cefclient/res/domaccess.html', - 'tests/cefclient/res/localstorage.html', - 'tests/cefclient/res/logo.png', - 'tests/cefclient/res/performance.html', - 'tests/cefclient/res/xmlhttprequest.html', - ], - 'cefclient_sources_linux': [ - 'tests/cefclient/cefclient_gtk.cpp', - 'tests/cefclient/client_handler_gtk.cpp', - 'tests/cefclient/resource_util_linux.cpp', - ], - 'cefclient_bundle_resources_linux': [ - 'tests/cefclient/res/binding.html', - 'tests/cefclient/res/dialogs.html', - 'tests/cefclient/res/domaccess.html', - 'tests/cefclient/res/localstorage.html', - 'tests/cefclient/res/logo.png', - 'tests/cefclient/res/performance.html', - 'tests/cefclient/res/xmlhttprequest.html', - ], - }, -} diff --git a/cef/frameworks/ffmpegsumo.so b/cef/frameworks/ffmpegsumo.so deleted file mode 100755 index 1b77e36ea..000000000 Binary files a/cef/frameworks/ffmpegsumo.so and /dev/null differ diff --git a/cef/frameworks/libcef.dylib b/cef/frameworks/libcef.dylib deleted file mode 100755 index edae81a14..000000000 Binary files a/cef/frameworks/libcef.dylib and /dev/null differ diff --git a/cef/include/capi/cef_app_capi.h b/cef/include/capi/cef_app_capi.h deleted file mode 100644 index 77b641468..000000000 --- a/cef/include/capi/cef_app_capi.h +++ /dev/null @@ -1,166 +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 from the application entry point function to -// execute a secondary process. It can be used to run secondary processes from -// the browser client executable (default behavior) or from a separate -// executable specified by the CefSettings.browser_subprocess_path value. If -// called for the browser process (identified by no "type" command-line value) -// it will return immediately with a value of -1. If called for a recognized -// secondary process it will block until the process should exit and then return -// the process exit code. The |application| parameter may be NULL. -/// -CEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args, - struct _cef_app_t* application); - -/// -// This function should be called on the main application thread to initialize -// the CEF browser process. 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_main_args_t* args, - const struct _cef_settings_t* settings, struct _cef_app_t* application); - -/// -// This function should be called on the main application thread to shut down -// the CEF browser process 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(); - -/// -// Implement this structure to provide handler implementations. Methods will be -// called by the process and/or thread indicated. -/// -typedef struct _cef_app_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Provides an opportunity to view and/or modify command-line arguments before - // processing by CEF and Chromium. The |process_type| value will be NULL for - // the browser process. Do not keep a reference to the cef_command_line_t - // object passed to this function. The CefSettings.command_line_args_disabled - // value can be used to start with an NULL command-line object. Any values - // specified in CefSettings that equate to command-line arguments will be set - // before this function is called. Be cautious when using this function to - // modify command-line arguments for non-browser processes as this may result - // in undefined behavior including crashes. - /// - void (CEF_CALLBACK *on_before_command_line_processing)( - struct _cef_app_t* self, const cef_string_t* process_type, - struct _cef_command_line_t* command_line); - - /// - // 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 by the browser and render processes on multiple threads. - /// - struct _cef_resource_bundle_handler_t* ( - CEF_CALLBACK *get_resource_bundle_handler)(struct _cef_app_t* self); - - /// - // Return the handler for functionality specific to the browser process. This - // function is called on multiple threads in the browser process. - /// - struct _cef_browser_process_handler_t* ( - CEF_CALLBACK *get_browser_process_handler)(struct _cef_app_t* self); - - /// - // Return the handler for functionality specific to the render process. This - // function is called on the render process main thread. - /// - struct _cef_render_process_handler_t* ( - CEF_CALLBACK *get_render_process_handler)(struct _cef_app_t* self); -} cef_app_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ diff --git a/cef/include/capi/cef_base_capi.h b/cef/include/capi/cef_base_capi.h deleted file mode 100644 index 0323520c5..000000000 --- a/cef/include/capi/cef_base_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_browser_capi.h b/cef/include/capi/cef_browser_capi.h deleted file mode 100644 index b10c64c89..000000000 --- a/cef/include/capi/cef_browser_capi.h +++ /dev/null @@ -1,392 +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. When used in the browser -// process the functions of this structure may be called on any thread unless -// otherwise indicated in the comments. When used in the render process the -// functions of this structure may only be called on the main thread. -/// -typedef struct _cef_browser_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the browser host object. This function can only be called in the - // browser process. - /// - struct _cef_browser_host_t* (CEF_CALLBACK *get_host)( - 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); - - /// - // Returns true (1) if the browser is currently loading. - /// - int (CEF_CALLBACK *is_loading)(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); - - /// - // Returns the globally unique identifier for this browser. - /// - int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self); - - /// - // Returns true (1) if this object is pointing to the same handle as |that| - // object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_browser_t* self, - struct _cef_browser_t* that); - - /// - // 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 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. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_focused_frame)( - struct _cef_browser_t* self); - - /// - // Returns the frame with the specified identifier, or NULL if not found. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_frame_byident)( - struct _cef_browser_t* self, int64 identifier); - - /// - // Returns the frame with the specified name, or NULL if not found. - /// - struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_browser_t* self, - const cef_string_t* name); - - /// - // Returns the number of frames that currently exist. - /// - size_t (CEF_CALLBACK *get_frame_count)(struct _cef_browser_t* self); - - /// - // Returns the identifiers of all existing frames. - /// - void (CEF_CALLBACK *get_frame_identifiers)(struct _cef_browser_t* self, - size_t* identifiersCount, int64* identifiers); - - /// - // Returns the names of all existing frames. - /// - void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self, - cef_string_list_t names); - - // - // Send a message to the specified |target_process|. Returns true (1) if the - // message was sent successfully. - /// - int (CEF_CALLBACK *send_process_message)(struct _cef_browser_t* self, - enum cef_process_id_t target_process, - struct _cef_process_message_t* message); -} cef_browser_t; - - -/// -// Callback structure for cef_browser_host_t::RunFileDialog. The functions of -// this structure will be called on the browser process UI thread. -/// -typedef struct _cef_run_file_dialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called asynchronously after the file dialog is dismissed. If the selection - // was successful |file_paths| will be a single value or a list of values - // depending on the dialog mode. If the selection was cancelled |file_paths| - // will be NULL. - /// - void (CEF_CALLBACK *cont)(struct _cef_run_file_dialog_callback_t* self, - struct _cef_browser_host_t* browser_host, cef_string_list_t file_paths); -} cef_run_file_dialog_callback_t; - - -/// -// Structure used to represent the browser process aspects of a browser window. -// The functions of this structure can only be called in the browser process. -// They may be called on any thread in that process unless otherwise indicated -// in the comments. -/// -typedef struct _cef_browser_host_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the hosted browser object. - /// - struct _cef_browser_t* (CEF_CALLBACK *get_browser)( - struct _cef_browser_host_t* self); - - /// - // 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_host_t* self); - - /// - // Closes this browser window. - /// - void (CEF_CALLBACK *close_browser)(struct _cef_browser_host_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_host_t* self, int enable); - - /// - // Retrieve the window handle for this browser. - /// - cef_window_handle_t (CEF_CALLBACK *get_window_handle)( - struct _cef_browser_host_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_host_t* self); - - /// - // Returns the client for this browser. - /// - struct _cef_client_t* (CEF_CALLBACK *get_client)( - struct _cef_browser_host_t* self); - - /// - // Returns the DevTools URL for this browser. If |http_scheme| is true (1) the - // returned URL will use the http scheme instead of the chrome-devtools - // scheme. Remote debugging can be enabled by specifying the "remote- - // debugging-port" command-line flag or by setting the - // CefSettings.remote_debugging_port value. If remote debugging is not enabled - // this function will return an NULL string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_dev_tools_url)( - struct _cef_browser_host_t* self, int http_scheme); - - /// - // 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_host_t* self); - - /// - // Change the zoom level to the specified value. Specify 0.0 to reset the zoom - // level. If called on the UI thread the change will be applied immediately. - // Otherwise, the change will be applied asynchronously on the UI thread. - /// - void (CEF_CALLBACK *set_zoom_level)(struct _cef_browser_host_t* self, - double zoomLevel); - - /// - // Call to run a file chooser dialog. Only a single file chooser dialog may be - // pending at any given time. |mode| represents the type of dialog to display. - // |title| to the title to be used for the dialog and may be NULL to show the - // default title ("Open" or "Save" depending on the mode). |default_file_name| - // is the default file name to select in the dialog. |accept_types| is a list - // of valid lower-cased MIME types or file extensions specified in an input - // element and is used to restrict selectable files to such types. |callback| - // will be executed after the dialog is dismissed or immediately if another - // dialog is already pending. The dialog will be initiated asynchronously on - // the UI thread. - /// - void (CEF_CALLBACK *run_file_dialog)(struct _cef_browser_host_t* self, - enum cef_file_dialog_mode_t mode, const cef_string_t* title, - const cef_string_t* default_file_name, cef_string_list_t accept_types, - struct _cef_run_file_dialog_callback_t* callback); - - /// - // Returns true (1) if window rendering is disabled. - /// - int (CEF_CALLBACK *is_window_rendering_disabled)( - struct _cef_browser_host_t* self); - - /// - // Notify the browser that the widget has been resized. The browser will first - // call cef_render_handler_t::GetViewRect to get the new size and then call - // cef_render_handler_t::OnPaint asynchronously with the updated regions. This - // function is only used when window rendering is disabled. - /// - void (CEF_CALLBACK *was_resized)(struct _cef_browser_host_t* self); - - /// - // Invalidate the |dirtyRect| region of the view. The browser will call - // cef_render_handler_t::OnPaint asynchronously with the updated regions. This - // function is only used when window rendering is disabled. - /// - void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self, - const cef_rect_t* dirtyRect, enum cef_paint_element_type_t type); - - /// - // Send a key event to the browser. - /// - void (CEF_CALLBACK *send_key_event)(struct _cef_browser_host_t* self, - const struct _cef_key_event_t* event); - - /// - // 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_host_t* self, - const struct _cef_mouse_event_t* event, - 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_host_t* self, - const struct _cef_mouse_event_t* event, 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. - // In order to scroll inside select popups with window rendering disabled - // cef_render_handler_t::GetScreenPoint should be implemented properly. - /// - void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_host_t* self, - const struct _cef_mouse_event_t* event, int deltaX, int deltaY); - - /// - // Send a focus event to the browser. - /// - void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_host_t* self, - int setFocus); - - /// - // Send a capture lost event to the browser. - /// - void (CEF_CALLBACK *send_capture_lost_event)( - struct _cef_browser_host_t* self); -} cef_browser_host_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 can be called on any browser -// process thread and will not block. -/// -CEF_EXPORT int cef_browser_host_create_browser( - const 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 can only be called on the browser process UI -// thread. -/// -CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync( - const 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_ diff --git a/cef/include/capi/cef_browser_process_handler_capi.h b/cef/include/capi/cef_browser_process_handler_capi.h deleted file mode 100644 index b41d66ef1..000000000 --- a/cef/include/capi/cef_browser_process_handler_capi.h +++ /dev/null @@ -1,102 +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_PROCESS_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure used to implement browser process callbacks. The functions of this -// structure will be called on the browser process main thread unless otherwise -// indicated. -/// -typedef struct _cef_browser_process_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Return the handler for proxy events. If no handler is returned the default - // system handler will be used. This function is called on the browser process - // IO thread. - /// - struct _cef_proxy_handler_t* (CEF_CALLBACK *get_proxy_handler)( - struct _cef_browser_process_handler_t* self); - - /// - // Called on the browser process UI thread immediately after the CEF context - // has been initialized. - /// - void (CEF_CALLBACK *on_context_initialized)( - struct _cef_browser_process_handler_t* self); - - /// - // Called before a child process is launched. Will be called on the browser - // process UI thread when launching a render process and on the browser - // process IO thread when launching a GPU or plugin process. Provides an - // opportunity to modify the child process command line. Do not keep a - // reference to |command_line| outside of this function. - /// - void (CEF_CALLBACK *on_before_child_process_launch)( - struct _cef_browser_process_handler_t* self, - struct _cef_command_line_t* command_line); - - /// - // Called on the browser process IO thread after the main thread has been - // created for a new render process. Provides an opportunity to specify extra - // information that will be passed to - // cef_render_process_handler_t::on_render_thread_created() in the render - // process. Do not keep a reference to |extra_info| outside of this function. - /// - void (CEF_CALLBACK *on_render_process_thread_created)( - struct _cef_browser_process_handler_t* self, - struct _cef_list_value_t* extra_info); -} cef_browser_process_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_callback_capi.h b/cef/include/capi/cef_callback_capi.h deleted file mode 100644 index a6731efd7..000000000 --- a/cef/include/capi/cef_callback_capi.h +++ /dev/null @@ -1,73 +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_CALLBACK_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Generic callback structure used for asynchronous continuation. -/// -typedef struct _cef_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue processing. - /// - void (CEF_CALLBACK *cont)(struct _cef_callback_t* self); - - /// - // Cancel processing. - /// - void (CEF_CALLBACK *cancel)(struct _cef_callback_t* self); -} cef_callback_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ diff --git a/cef/include/capi/cef_client_capi.h b/cef/include/capi/cef_client_capi.h deleted file mode 100644 index cdb513d30..000000000 --- a/cef/include/capi/cef_client_capi.h +++ /dev/null @@ -1,149 +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 context menus. If no handler is provided the default - // implementation will be used. - /// - struct _cef_context_menu_handler_t* (CEF_CALLBACK *get_context_menu_handler)( - struct _cef_client_t* self); - - /// - // Return the handler for dialogs. If no handler is provided the default - // implementation will be used. - /// - struct _cef_dialog_handler_t* (CEF_CALLBACK *get_dialog_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 download events. If no handler is returned downloads - // will not be allowed. - /// - struct _cef_download_handler_t* (CEF_CALLBACK *get_download_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 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 JavaScript dialogs. If no handler is provided the - // default implementation will be used. - /// - struct _cef_jsdialog_handler_t* (CEF_CALLBACK *get_jsdialog_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 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 off-screen rendering events. - /// - struct _cef_render_handler_t* (CEF_CALLBACK *get_render_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); - - /// - // Called when a new message is received from a different process. Return true - // (1) if the message was handled or false (0) otherwise. Do not keep a - // reference to or attempt to access the message outside of this callback. - /// - int (CEF_CALLBACK *on_process_message_received)(struct _cef_client_t* self, - struct _cef_browser_t* browser, enum cef_process_id_t source_process, - struct _cef_process_message_t* message); -} cef_client_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ diff --git a/cef/include/capi/cef_command_line_capi.h b/cef/include/capi/cef_command_line_capi.h deleted file mode 100644 index 0168c16c3..000000000 --- a/cef/include/capi/cef_command_line_capi.h +++ /dev/null @@ -1,213 +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; - - /// - // 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_command_line_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_command_line_t* self); - - /// - // Returns a writable copy of this object. - /// - struct _cef_command_line_t* (CEF_CALLBACK *copy)( - struct _cef_command_line_t* self); - - /// - // 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); - - /// - // Reset the command-line switches and arguments but leave the program - // component unchanged. - /// - void (CEF_CALLBACK *reset)(struct _cef_command_line_t* self); - - /// - // Retrieve the original command line string as a vector of strings. The argv - // array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* } - /// - void (CEF_CALLBACK *get_argv)(struct _cef_command_line_t* self, - cef_string_list_t argv); - - /// - // 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); - - /// - // Insert a command before the current command. Common for debuggers, like - // "valgrind" or "gdb --args". - /// - void (CEF_CALLBACK *prepend_wrapper)(struct _cef_command_line_t* self, - const cef_string_t* wrapper); -} cef_command_line_t; - - -/// -// Create a new cef_command_line_t instance. -/// -CEF_EXPORT cef_command_line_t* cef_command_line_create(); - -/// -// Returns the singleton global cef_command_line_t object. The returned object -// will be read-only. -/// -CEF_EXPORT cef_command_line_t* cef_command_line_get_global(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ diff --git a/cef/include/capi/cef_context_menu_handler_capi.h b/cef/include/capi/cef_context_menu_handler_capi.h deleted file mode 100644 index c9282393e..000000000 --- a/cef/include/capi/cef_context_menu_handler_capi.h +++ /dev/null @@ -1,221 +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_CONTEXT_MENU_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Implement this structure to handle context menu events. The functions of this -// structure will be called on the UI thread. -/// -typedef struct _cef_context_menu_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called before a context menu is displayed. |params| provides information - // about the context menu state. |model| initially contains the default - // context menu. The |model| can be cleared to show no context menu or - // modified to show a custom menu. Do not keep references to |params| or - // |model| outside of this callback. - /// - void (CEF_CALLBACK *on_before_context_menu)( - struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - struct _cef_menu_model_t* model); - - /// - // Called to execute a command selected from the context menu. Return true (1) - // if the command was handled or false (0) for the default implementation. See - // cef_menu_id_t for the command ids that have default implementations. All - // user-defined command ids should be between MENU_ID_USER_FIRST and - // MENU_ID_USER_LAST. |params| will have the same values as what was passed to - // on_before_context_menu(). Do not keep a reference to |params| outside of - // this callback. - /// - int (CEF_CALLBACK *on_context_menu_command)( - struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - int command_id, enum cef_event_flags_t event_flags); - - /// - // Called when the context menu is dismissed irregardless of whether the menu - // was NULL or a command was selected. - /// - void (CEF_CALLBACK *on_context_menu_dismissed)( - struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame); -} cef_context_menu_handler_t; - - -/// -// Provides information about the context menu state. The ethods of this -// structure can only be accessed on browser process the UI thread. -/// -typedef struct _cef_context_menu_params_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the X coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - int (CEF_CALLBACK *get_xcoord)(struct _cef_context_menu_params_t* self); - - /// - // Returns the Y coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - int (CEF_CALLBACK *get_ycoord)(struct _cef_context_menu_params_t* self); - - /// - // Returns flags representing the type of node that the context menu was - // invoked on. - /// - enum cef_context_menu_type_flags_t (CEF_CALLBACK *get_type_flags)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the URL of the link, if any, that encloses the node that the - // context menu was invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_link_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the link URL, if any, to be used ONLY for "copy link address". We - // don't validate this field in the frontend process. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_unfiltered_link_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the source URL, if any, for the element that the context menu was - // invoked on. Example of elements with source URLs are img, audio, and video. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_source_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu was invoked on a blocked image. - /// - int (CEF_CALLBACK *is_image_blocked)(struct _cef_context_menu_params_t* self); - - /// - // Returns the URL of the top level page that the context menu was invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_page_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the URL of the subframe that the context menu was invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_frame_url)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the character encoding of the subframe that the context menu was - // invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_frame_charset)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the type of context node that the context menu was invoked on. - /// - enum cef_context_menu_media_type_t (CEF_CALLBACK *get_media_type)( - struct _cef_context_menu_params_t* self); - - /// - // Returns flags representing the actions supported by the media element, if - // any, that the context menu was invoked on. - /// - enum cef_context_menu_media_state_flags_t ( - CEF_CALLBACK *get_media_state_flags)( - struct _cef_context_menu_params_t* self); - - /// - // Returns the text of the selection, if any, that the context menu was - // invoked on. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_selection_text)( - struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu was invoked on an editable node. - /// - int (CEF_CALLBACK *is_editable)(struct _cef_context_menu_params_t* self); - - /// - // Returns true (1) if the context menu was invoked on an editable node where - // speech-input is enabled. - /// - int (CEF_CALLBACK *is_speech_input_enabled)( - struct _cef_context_menu_params_t* self); - - /// - // Returns flags representing the actions supported by the editable node, if - // any, that the context menu was invoked on. - /// - enum cef_context_menu_edit_state_flags_t (CEF_CALLBACK *get_edit_state_flags)( - struct _cef_context_menu_params_t* self); -} cef_context_menu_params_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_cookie_capi.h b/cef/include/capi/cef_cookie_capi.h deleted file mode 100644 index de795e921..000000000 --- a/cef/include/capi/cef_cookie_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_dialog_handler_capi.h b/cef/include/capi/cef_dialog_handler_capi.h deleted file mode 100644 index bd7a2656c..000000000 --- a/cef/include/capi/cef_dialog_handler_capi.h +++ /dev/null @@ -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_DIALOG_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Callback structure for asynchronous continuation of file dialog requests. -/// -typedef struct _cef_file_dialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the file selection with the specified |file_paths|. This may be a - // single value or a list of values depending on the dialog mode. An NULL - // value is treated the same as calling cancel(). - /// - void (CEF_CALLBACK *cont)(struct _cef_file_dialog_callback_t* self, - cef_string_list_t file_paths); - - /// - // Cancel the file selection. - /// - void (CEF_CALLBACK *cancel)(struct _cef_file_dialog_callback_t* self); -} cef_file_dialog_callback_t; - - -/// -// Implement this structure to handle dialog events. The functions of this -// structure will be called on the browser process UI thread. -/// -typedef struct _cef_dialog_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called to run a file chooser dialog. |mode| represents the type of dialog - // to display. |title| to the title to be used for the dialog and may be NULL - // to show the default title ("Open" or "Save" depending on the mode). - // |default_file_name| is the default file name to select in the dialog. - // |accept_types| is a list of valid lower-cased MIME types or file extensions - // specified in an input element and is used to restrict selectable files to - // such types. To display a custom dialog return true (1) and execute - // |callback| either inline or at a later time. To display the default dialog - // return false (0). - /// - int (CEF_CALLBACK *on_file_dialog)(struct _cef_dialog_handler_t* self, - struct _cef_browser_t* browser, enum cef_file_dialog_mode_t mode, - const cef_string_t* title, const cef_string_t* default_file_name, - cef_string_list_t accept_types, - struct _cef_file_dialog_callback_t* callback); -} cef_dialog_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_display_handler_capi.h b/cef/include/capi/cef_display_handler_capi.h deleted file mode 100644 index 9a329a8aa..000000000 --- a/cef/include/capi/cef_display_handler_capi.h +++ /dev/null @@ -1,111 +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 loading state has changed. - /// - void (CEF_CALLBACK *on_loading_state_change)( - struct _cef_display_handler_t* self, struct _cef_browser_t* browser, - int isLoading, 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 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 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. When window rendering is disabled the application is responsible - // for drawing tooltips and the return value is ignored. - /// - 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); - - /// - // 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_ diff --git a/cef/include/capi/cef_dom_capi.h b/cef/include/capi/cef_dom_capi.h deleted file mode 100644 index 99f0055c1..000000000 --- a/cef/include/capi/cef_dom_capi.h +++ /dev/null @@ -1,446 +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 render process main 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 render process main thread 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 render process main 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 an editable node. - /// - int (CEF_CALLBACK *is_editable)(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 render process main 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 render process main 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_ diff --git a/cef/include/capi/cef_download_handler_capi.h b/cef/include/capi/cef_download_handler_capi.h deleted file mode 100644 index 658136b74..000000000 --- a/cef/include/capi/cef_download_handler_capi.h +++ /dev/null @@ -1,124 +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" - - -/// -// Callback structure used to asynchronously continue a download. -/// -typedef struct _cef_before_download_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Call to continue the download. Set |download_path| to the full file path - // for the download including the file name or leave blank to use the - // suggested name and the default temp directory. Set |show_dialog| to true - // (1) if you do wish to show the default "Save As" dialog. - /// - void (CEF_CALLBACK *cont)(struct _cef_before_download_callback_t* self, - const cef_string_t* download_path, int show_dialog); -} cef_before_download_callback_t; - - -/// -// Callback structure used to asynchronously cancel a download. -/// -typedef struct _cef_download_item_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Call to cancel the download. - /// - void (CEF_CALLBACK *cancel)(struct _cef_download_item_callback_t* self); -} cef_download_item_callback_t; - - -/// -// Structure used to handle file downloads. The functions of this structure will -// called on the browser process UI thread. -/// -typedef struct _cef_download_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called before a download begins. |suggested_name| is the suggested name for - // the download file. By default the download will be canceled. Execute - // |callback| either asynchronously or in this function to continue the - // download if desired. Do not keep a reference to |download_item| outside of - // this function. - /// - void (CEF_CALLBACK *on_before_download)(struct _cef_download_handler_t* self, - struct _cef_browser_t* browser, - struct _cef_download_item_t* download_item, - const cef_string_t* suggested_name, - struct _cef_before_download_callback_t* callback); - - /// - // Called when a download's status or progress information has been updated. - // Execute |callback| either asynchronously or in this function to cancel the - // download if desired. Do not keep a reference to |download_item| outside of - // this function. - /// - void (CEF_CALLBACK *on_download_updated)(struct _cef_download_handler_t* self, - struct _cef_browser_t* browser, - struct _cef_download_item_t* download_item, - struct _cef_download_item_callback_t* callback); -} cef_download_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_download_item_capi.h b/cef/include/capi/cef_download_item_capi.h deleted file mode 100644 index 5639eb53f..000000000 --- a/cef/include/capi/cef_download_item_capi.h +++ /dev/null @@ -1,155 +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_ITEM_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure used to represent a download item. -/// -typedef struct _cef_download_item_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_download_item_t* self); - - /// - // Returns true (1) if the download is in progress. - /// - int (CEF_CALLBACK *is_in_progress)(struct _cef_download_item_t* self); - - /// - // Returns true (1) if the download is complete. - /// - int (CEF_CALLBACK *is_complete)(struct _cef_download_item_t* self); - - /// - // Returns true (1) if the download has been canceled or interrupted. - /// - int (CEF_CALLBACK *is_canceled)(struct _cef_download_item_t* self); - - /// - // Returns a simple speed estimate in bytes/s. - /// - int64 (CEF_CALLBACK *get_current_speed)(struct _cef_download_item_t* self); - - /// - // Returns the rough percent complete or -1 if the receive total size is - // unknown. - /// - int (CEF_CALLBACK *get_percent_complete)(struct _cef_download_item_t* self); - - /// - // Returns the total number of bytes. - /// - int64 (CEF_CALLBACK *get_total_bytes)(struct _cef_download_item_t* self); - - /// - // Returns the number of received bytes. - /// - int64 (CEF_CALLBACK *get_received_bytes)(struct _cef_download_item_t* self); - - /// - // Returns the time that the download started. - /// - cef_time_t (CEF_CALLBACK *get_start_time)(struct _cef_download_item_t* self); - - /// - // Returns the time that the download ended. - /// - cef_time_t (CEF_CALLBACK *get_end_time)(struct _cef_download_item_t* self); - - /// - // Returns the full path to the downloaded or downloading file. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_full_path)( - struct _cef_download_item_t* self); - - /// - // Returns the unique identifier for this download. - /// - int32 (CEF_CALLBACK *get_id)(struct _cef_download_item_t* self); - - /// - // Returns the URL. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_url)( - struct _cef_download_item_t* self); - - /// - // Returns the suggested file name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_suggested_file_name)( - struct _cef_download_item_t* self); - - /// - // Returns the content disposition. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_content_disposition)( - struct _cef_download_item_t* self); - - /// - // Returns the 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_download_item_t* self); -} cef_download_item_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ diff --git a/cef/include/capi/cef_focus_handler_capi.h b/cef/include/capi/cef_focus_handler_capi.h deleted file mode 100644 index b0b2a34b6..000000000 --- a/cef/include/capi/cef_focus_handler_capi.h +++ /dev/null @@ -1,87 +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_focus_source_t source); - - /// - // Called when the browser component has received focus. - /// - void (CEF_CALLBACK *on_got_focus)(struct _cef_focus_handler_t* self, - struct _cef_browser_t* browser); -} cef_focus_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_frame_capi.h b/cef/include/capi/cef_frame_capi.h deleted file mode 100644 index c13a98dfb..000000000 --- a/cef/include/capi/cef_frame_capi.h +++ /dev/null @@ -1,212 +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. When used in the -// browser process the functions of this structure may be called on any thread -// unless otherwise indicated in the comments. When used in the render process -// the functions of this structure may only be called on the main thread. -/// -typedef struct _cef_frame_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // True if this object is currently attached to a valid frame. - /// - int (CEF_CALLBACK *is_valid)(struct _cef_frame_t* self); - - /// - // 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); - - /// - // Save this frame's HTML source to a temporary file and open it in the - // default text viewing application. This function can only be called from the - // browser process. - /// - void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self); - - /// - // Retrieve this frame's HTML source as a string sent to the specified - // visitor. - /// - void (CEF_CALLBACK *get_source)(struct _cef_frame_t* self, - struct _cef_string_visitor_t* visitor); - - /// - // Retrieve this frame's display text as a string sent to the specified - // visitor. - /// - void (CEF_CALLBACK *get_text)(struct _cef_frame_t* self, - struct _cef_string_visitor_t* visitor); - - /// - // 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); - - /// - // 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* code, const cef_string_t* script_url, - int start_line); - - /// - // 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. - /// - 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. - /// - 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); - - /// - // Get the V8 context associated with the frame. This function can only be - // called from the render process. - /// - struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)( - struct _cef_frame_t* self); - - /// - // Visit the DOM document. This function can only be called from the render - // process. - /// - void (CEF_CALLBACK *visit_dom)(struct _cef_frame_t* self, - struct _cef_domvisitor_t* visitor); -} cef_frame_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ diff --git a/cef/include/capi/cef_geolocation_capi.h b/cef/include/capi/cef_geolocation_capi.h deleted file mode 100644 index c4ec6aa6a..000000000 --- a/cef/include/capi/cef_geolocation_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_geolocation_handler_capi.h b/cef/include/capi/cef_geolocation_handler_capi.h deleted file mode 100644 index 8a646b5ac..000000000 --- a/cef/include/capi/cef_geolocation_handler_capi.h +++ /dev/null @@ -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 IO 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_ diff --git a/cef/include/capi/cef_jsdialog_handler_capi.h b/cef/include/capi/cef_jsdialog_handler_capi.h deleted file mode 100644 index 4869f54ea..000000000 --- a/cef/include/capi/cef_jsdialog_handler_capi.h +++ /dev/null @@ -1,126 +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" - - -/// -// Callback structure used for asynchronous continuation of JavaScript dialog -// requests. -/// -typedef struct _cef_jsdialog_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the JS dialog request. Set |success| to true (1) if the OK button - // was pressed. The |user_input| value should be specified for prompt dialogs. - /// - void (CEF_CALLBACK *cont)(struct _cef_jsdialog_callback_t* self, int success, - const cef_string_t* user_input); -} cef_jsdialog_callback_t; - - -/// -// 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 dialog. The |default_prompt_text| value will be - // specified for prompt dialogs only. Set |suppress_message| to true (1) and - // return false (0) to suppress the message (suppressing messages is - // preferable to immediately executing the callback as this is used to detect - // presumably malicious behavior like spamming alert messages in - // onbeforeunload). Set |suppress_message| to false (0) and return false (0) - // to use the default implementation (the default implementation will show one - // modal dialog at a time and suppress any additional dialog requests until - // the displayed dialog is dismissed). Return true (1) if the application will - // use a custom dialog or if the callback has been executed immediately. - // Custom dialogs may be either modal or modeless. If a custom dialog is used - // the application must execute |callback| once the custom dialog is - // dismissed. - /// - int (CEF_CALLBACK *on_jsdialog)(struct _cef_jsdialog_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* origin_url, - const cef_string_t* accept_lang, enum cef_jsdialog_type_t dialog_type, - const cef_string_t* message_text, - const cef_string_t* default_prompt_text, - struct _cef_jsdialog_callback_t* callback, int* suppress_message); - - /// - // Called to run a dialog asking the user if they want to leave a page. Return - // false (0) to use the default dialog implementation. Return true (1) if the - // application will use a custom dialog or if the callback has been executed - // immediately. Custom dialogs may be either modal or modeless. If a custom - // dialog is used the application must execute |callback| once the custom - // dialog is dismissed. - /// - int (CEF_CALLBACK *on_before_unload_dialog)( - struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser, - const cef_string_t* message_text, int is_reload, - struct _cef_jsdialog_callback_t* callback); - - /// - // Called to cancel any pending dialogs and reset any saved dialog state. Will - // be called due to events like page navigation irregardless of whether any - // dialogs are currently pending. - /// - void (CEF_CALLBACK *on_reset_dialog_state)( - struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser); -} cef_jsdialog_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_keyboard_handler_capi.h b/cef/include/capi/cef_keyboard_handler_capi.h deleted file mode 100644 index e01c150bf..000000000 --- a/cef/include/capi/cef_keyboard_handler_capi.h +++ /dev/null @@ -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_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 before a keyboard event is sent to the renderer. |event| contains - // information about the keyboard event. |os_event| is the operating system - // event message, if any. Return true (1) if the event was handled or false - // (0) otherwise. If the event will be handled in on_key_event() as a keyboard - // shortcut set |is_keyboard_shortcut| to true (1) and return false (0). - int (CEF_CALLBACK *on_pre_key_event)(struct _cef_keyboard_handler_t* self, - struct _cef_browser_t* browser, const struct _cef_key_event_t* event, - cef_event_handle_t os_event, int* is_keyboard_shortcut); - - /// - // Called after the renderer and JavaScript in the page has had a chance to - // handle the event. |event| contains information about the keyboard event. - // |os_event| is the operating system event message, if any. Return true (1) - // if the keyboard event was handled or false (0) otherwise. - /// - int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self, - struct _cef_browser_t* browser, const struct _cef_key_event_t* event, - cef_event_handle_t os_event); -} cef_keyboard_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_life_span_handler_capi.h b/cef/include/capi/cef_life_span_handler_capi.h deleted file mode 100644 index 0220e2667..000000000 --- a/cef/include/capi/cef_life_span_handler_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_load_handler_capi.h b/cef/include/capi/cef_load_handler_capi.h deleted file mode 100644 index 5ec9060ba..000000000 --- a/cef/include/capi/cef_load_handler_capi.h +++ /dev/null @@ -1,113 +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, |errorText| is the error text and and |failedUrl| is the URL - // that failed to load. See net\base\net_error_list.h for complete - // descriptions of the error codes. - /// - void (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - enum cef_errorcode_t errorCode, const cef_string_t* errorText, - const cef_string_t* failedUrl); - - /// - // Called when the render process terminates unexpectedly. |status| indicates - // how the process terminated. - /// - void (CEF_CALLBACK *on_render_process_terminated)( - struct _cef_load_handler_t* self, struct _cef_browser_t* browser, - enum cef_termination_status_t status); - - /// - // Called when a plugin has crashed. |plugin_path| is the path of the plugin - // that crashed. - /// - void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_load_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* plugin_path); -} cef_load_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_menu_model_capi.h b/cef/include/capi/cef_menu_model_capi.h deleted file mode 100644 index d0c7af323..000000000 --- a/cef/include/capi/cef_menu_model_capi.h +++ /dev/null @@ -1,388 +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_MODEL_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Supports creation and modification of menus. See cef_menu_id_t for the -// command ids that have default implementations. All user-defined command ids -// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of -// this structure can only be accessed on the browser process the UI thread. -/// -typedef struct _cef_menu_model_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Clears the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *clear)(struct _cef_menu_model_t* self); - - /// - // Returns the number of items in this menu. - /// - int (CEF_CALLBACK *get_count)(struct _cef_menu_model_t* self); - - // - // Add a separator to the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_separator)(struct _cef_menu_model_t* self); - - // - // Add an item to the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_item)(struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label); - - // - // Add a check item to the menu. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_check_item)(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label); - - // - // Add a radio item to the menu. Only a single item with the specified - // |group_id| can be checked at a time. Returns true (1) on success. - /// - int (CEF_CALLBACK *add_radio_item)(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label, int group_id); - - // - // Add a sub-menu to the menu. The new sub-menu is returned. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *add_sub_menu)( - struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label); - - // - // Insert a separator in the menu at the specified |index|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *insert_separator_at)(struct _cef_menu_model_t* self, - int index); - - // - // Insert an item in the menu at the specified |index|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *insert_item_at)(struct _cef_menu_model_t* self, int index, - int command_id, const cef_string_t* label); - - // - // Insert a check item in the menu at the specified |index|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *insert_check_item_at)(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label); - - // - // Insert a radio item in the menu at the specified |index|. Only a single - // item with the specified |group_id| can be checked at a time. Returns true - // (1) on success. - /// - int (CEF_CALLBACK *insert_radio_item_at)(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label, int group_id); - - // - // Insert a sub-menu in the menu at the specified |index|. The new sub-menu is - // returned. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *insert_sub_menu_at)( - struct _cef_menu_model_t* self, int index, int command_id, - const cef_string_t* label); - - /// - // Removes the item with the specified |command_id|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *remove)(struct _cef_menu_model_t* self, int command_id); - - /// - // Removes the item at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *remove_at)(struct _cef_menu_model_t* self, int index); - - /// - // Returns the index associated with the specified |command_id| or -1 if not - // found due to the command id not existing in the menu. - /// - int (CEF_CALLBACK *get_index_of)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns the command id at the specified |index| or -1 if not found due to - // invalid range or the index being a separator. - /// - int (CEF_CALLBACK *get_command_id_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Sets the command id at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_command_id_at)(struct _cef_menu_model_t* self, - int index, int command_id); - - /// - // Returns the label for the specified |command_id| or NULL if not found. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_label)( - struct _cef_menu_model_t* self, int command_id); - - /// - // Returns the label at the specified |index| or NULL if not found due to - // invalid range or the index being a separator. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_label_at)( - struct _cef_menu_model_t* self, int index); - - /// - // Sets the label for the specified |command_id|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_label)(struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label); - - /// - // Set the label at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_label_at)(struct _cef_menu_model_t* self, int index, - const cef_string_t* label); - - /// - // Returns the item type for the specified |command_id|. - /// - enum cef_menu_item_type_t (CEF_CALLBACK *get_type)( - struct _cef_menu_model_t* self, int command_id); - - /// - // Returns the item type at the specified |index|. - /// - enum cef_menu_item_type_t (CEF_CALLBACK *get_type_at)( - struct _cef_menu_model_t* self, int index); - - /// - // Returns the group id for the specified |command_id| or -1 if invalid. - /// - int (CEF_CALLBACK *get_group_id)(struct _cef_menu_model_t* self, - int command_id); - - /// - // Returns the group id at the specified |index| or -1 if invalid. - /// - int (CEF_CALLBACK *get_group_id_at)(struct _cef_menu_model_t* self, - int index); - - /// - // Sets the group id for the specified |command_id|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_group_id)(struct _cef_menu_model_t* self, - int command_id, int group_id); - - /// - // Sets the group id at the specified |index|. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_group_id_at)(struct _cef_menu_model_t* self, int index, - int group_id); - - /// - // Returns the submenu for the specified |command_id| or NULL if invalid. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu)( - struct _cef_menu_model_t* self, int command_id); - - /// - // Returns the submenu at the specified |index| or NULL if invalid. - /// - struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu_at)( - struct _cef_menu_model_t* self, int index); - - // - // Returns true (1) if the specified |command_id| is visible. - /// - int (CEF_CALLBACK *is_visible)(struct _cef_menu_model_t* self, - int command_id); - - // - // Returns true (1) if the specified |index| is visible. - /// - int (CEF_CALLBACK *is_visible_at)(struct _cef_menu_model_t* self, int index); - - // - // Change the visibility of the specified |command_id|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_visible)(struct _cef_menu_model_t* self, - int command_id, int visible); - - // - // Change the visibility at the specified |index|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_visible_at)(struct _cef_menu_model_t* self, int index, - int visible); - - // - // Returns true (1) if the specified |command_id| is enabled. - /// - int (CEF_CALLBACK *is_enabled)(struct _cef_menu_model_t* self, - int command_id); - - // - // Returns true (1) if the specified |index| is enabled. - /// - int (CEF_CALLBACK *is_enabled_at)(struct _cef_menu_model_t* self, int index); - - // - // Change the enabled status of the specified |command_id|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *set_enabled)(struct _cef_menu_model_t* self, - int command_id, int enabled); - - // - // Change the enabled status at the specified |index|. Returns true (1) on - // success. - /// - int (CEF_CALLBACK *set_enabled_at)(struct _cef_menu_model_t* self, int index, - int enabled); - - // - // Returns true (1) if the specified |command_id| is checked. Only applies to - // check and radio items. - /// - int (CEF_CALLBACK *is_checked)(struct _cef_menu_model_t* self, - int command_id); - - // - // Returns true (1) if the specified |index| is checked. Only applies to check - // and radio items. - /// - int (CEF_CALLBACK *is_checked_at)(struct _cef_menu_model_t* self, int index); - - // - // Check the specified |command_id|. Only applies to check and radio items. - // Returns true (1) on success. - /// - int (CEF_CALLBACK *set_checked)(struct _cef_menu_model_t* self, - int command_id, int checked); - - // - // Check the specified |index|. Only applies to check and radio items. Returns - // true (1) on success. - /// - int (CEF_CALLBACK *set_checked_at)(struct _cef_menu_model_t* self, int index, - int checked); - - // - // Returns true (1) if the specified |command_id| has a keyboard accelerator - // assigned. - /// - int (CEF_CALLBACK *has_accelerator)(struct _cef_menu_model_t* self, - int command_id); - - // - // Returns true (1) if the specified |index| has a keyboard accelerator - // assigned. - /// - int (CEF_CALLBACK *has_accelerator_at)(struct _cef_menu_model_t* self, - int index); - - // - // Set the keyboard accelerator for the specified |command_id|. |key_code| can - // be any virtual key or character value. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_accelerator)(struct _cef_menu_model_t* self, - int command_id, int key_code, int shift_pressed, int ctrl_pressed, - int alt_pressed); - - // - // Set the keyboard accelerator at the specified |index|. |key_code| can be - // any virtual key or character value. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_accelerator_at)(struct _cef_menu_model_t* self, - int index, int key_code, int shift_pressed, int ctrl_pressed, - int alt_pressed); - - // - // Remove the keyboard accelerator for the specified |command_id|. Returns - // true (1) on success. - /// - int (CEF_CALLBACK *remove_accelerator)(struct _cef_menu_model_t* self, - int command_id); - - // - // Remove the keyboard accelerator at the specified |index|. Returns true (1) - // on success. - /// - int (CEF_CALLBACK *remove_accelerator_at)(struct _cef_menu_model_t* self, - int index); - - // - // Retrieves the keyboard accelerator for the specified |command_id|. Returns - // true (1) on success. - /// - int (CEF_CALLBACK *get_accelerator)(struct _cef_menu_model_t* self, - int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed, - int* alt_pressed); - - // - // Retrieves the keyboard accelerator for the specified |index|. Returns true - // (1) on success. - /// - int (CEF_CALLBACK *get_accelerator_at)(struct _cef_menu_model_t* self, - int index, int* key_code, int* shift_pressed, int* ctrl_pressed, - int* alt_pressed); -} cef_menu_model_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ diff --git a/cef/include/capi/cef_origin_whitelist_capi.h b/cef/include/capi/cef_origin_whitelist_capi.h deleted file mode 100644 index 8dde4c1c5..000000000 --- a/cef/include/capi/cef_origin_whitelist_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_path_util_capi.h b/cef/include/capi/cef_path_util_capi.h deleted file mode 100644 index 847a283ae..000000000 --- a/cef/include/capi/cef_path_util_capi.h +++ /dev/null @@ -1,58 +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_PATH_UTIL_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Retrieve the path associated with the specified |key|. Returns true (1) on -// success. Can be called on any thread in the browser process. -/// -CEF_EXPORT int cef_get_path(enum cef_path_key_t key, cef_string_t* path); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ diff --git a/cef/include/capi/cef_process_message_capi.h b/cef/include/capi/cef_process_message_capi.h deleted file mode 100644 index cc00a3c77..000000000 --- a/cef/include/capi/cef_process_message_capi.h +++ /dev/null @@ -1,101 +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_PROCESS_MESSAGE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure representing a message. Can be used on any process and thread. -/// -typedef struct _cef_process_message_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_process_message_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_process_message_t* self); - - /// - // Returns a writable copy of this object. - /// - struct _cef_process_message_t* (CEF_CALLBACK *copy)( - struct _cef_process_message_t* self); - - /// - // Returns the message name. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_name)( - struct _cef_process_message_t* self); - - /// - // Returns the list of arguments. - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_argument_list)( - struct _cef_process_message_t* self); -} cef_process_message_t; - - -/// -// Create a new cef_process_message_t object with the specified name. -/// -CEF_EXPORT cef_process_message_t* cef_process_message_create( - const cef_string_t* name); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ diff --git a/cef/include/capi/cef_process_util_capi.h b/cef/include/capi/cef_process_util_capi.h deleted file mode 100644 index 066a461e6..000000000 --- a/cef/include/capi/cef_process_util_capi.h +++ /dev/null @@ -1,64 +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_PROCESS_UTIL_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Launches the process specified via |command_line|. Returns true (1) upon -// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. -// -// Unix-specific notes: - All file descriptors open in the parent process will -// be closed in the -// child process except for stdin, stdout, and stderr. -// - If the first argument on the command line does not contain a slash, -// PATH will be searched. (See man execvp.) -/// -CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ diff --git a/cef/include/capi/cef_proxy_handler_capi.h b/cef/include/capi/cef_proxy_handler_capi.h deleted file mode 100644 index 1ed15c560..000000000 --- a/cef/include/capi/cef_proxy_handler_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_render_handler_capi.h b/cef/include/capi/cef_render_handler_capi.h deleted file mode 100644 index da57b65ec..000000000 --- a/cef/include/capi/cef_render_handler_capi.h +++ /dev/null @@ -1,118 +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 root window rectangle in screen coordinates. Return - // true (1) if the rectangle was provided. - /// - int (CEF_CALLBACK *get_root_screen_rect)(struct _cef_render_handler_t* self, - struct _cef_browser_t* browser, cef_rect_t* rect); - - /// - // 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 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. - /// - 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, - int width, int height); - - /// - // 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_ diff --git a/cef/include/capi/cef_render_process_handler_capi.h b/cef/include/capi/cef_render_process_handler_capi.h deleted file mode 100644 index 13949fe8a..000000000 --- a/cef/include/capi/cef_render_process_handler_capi.h +++ /dev/null @@ -1,197 +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_PROCESS_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure used to implement render process callbacks. The functions of this -// structure will be called on the render process main thread (TID_RENDERER) -// unless otherwise indicated. -/// -typedef struct _cef_render_process_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called after the render process main thread has been created. |extra_info| - // is a read-only value originating from - // cef_browser_process_handler_t::on_render_process_thread_created(). Do not - // keep a reference to |extra_info| outside of this function. - /// - void (CEF_CALLBACK *on_render_thread_created)( - struct _cef_render_process_handler_t* self, - struct _cef_list_value_t* extra_info); - - /// - // Called after WebKit has been initialized. - /// - void (CEF_CALLBACK *on_web_kit_initialized)( - struct _cef_render_process_handler_t* self); - - /// - // Called after a browser has been created. When browsing cross-origin a new - // browser will be created before the old browser with the same identifier is - // destroyed. - /// - void (CEF_CALLBACK *on_browser_created)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser); - - /// - // Called before a browser is destroyed. - /// - void (CEF_CALLBACK *on_browser_destroyed)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser); - - /// - // Called before browser navigation. Return true (1) to cancel the navigation - // or false (0) to allow the navigation to proceed. The |request| object - // cannot be modified in this callback. - /// - int (CEF_CALLBACK *on_before_navigation)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_request_t* request, - enum cef_navigation_type_t navigation_type, int is_redirect); - - /// - // 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. V8 handles can only be accessed - // from the thread on which they are created. A task runner for posting tasks - // on the associated thread can be retrieved via the - // cef_v8context_t::get_task_runner() function. - /// - void (CEF_CALLBACK *on_context_created)( - struct _cef_render_process_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_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_v8context_t* context); - - /// - // Called for global uncaught exceptions in a frame. 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_render_process_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); - - /// - // Called on the WebWorker thread immediately after the V8 context for a new - // WebWorker has been created. To retrieve the JavaScript 'self' object use - // the cef_v8context_t::get_global() function. V8 handles can only be accessed - // from the thread on which they are created. A task runner for posting tasks - // on the associated thread can be retrieved via the - // cef_v8context_t::get_task_runner() function. - /// - void (CEF_CALLBACK *on_worker_context_created)( - struct _cef_render_process_handler_t* self, int worker_id, - const cef_string_t* url, struct _cef_v8context_t* context); - - /// - // Called on the WebWorker thread immediately before the V8 context for a - // WebWorker is released. No references to the context should be kept after - // this function is called. Any tasks posted or pending on the WebWorker - // thread after this function is called may not be executed. - /// - void (CEF_CALLBACK *on_worker_context_released)( - struct _cef_render_process_handler_t* self, int worker_id, - const cef_string_t* url, struct _cef_v8context_t* context); - - /// - // Called on the WebWorker thread for global uncaught exceptions in a - // WebWorker. Execution of this callback is disabled by default. To enable set - // CefSettings.uncaught_exception_stack_size > 0. - /// - void (CEF_CALLBACK *on_worker_uncaught_exception)( - struct _cef_render_process_handler_t* self, int worker_id, - const cef_string_t* url, struct _cef_v8context_t* context, - struct _cef_v8exception_t* exception, - struct _cef_v8stack_trace_t* stackTrace); - - /// - // 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_render_process_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - struct _cef_domnode_t* node); - - /// - // Called when a new message is received from a different process. Return true - // (1) if the message was handled or false (0) otherwise. Do not keep a - // reference to or attempt to access the message outside of this callback. - /// - int (CEF_CALLBACK *on_process_message_received)( - struct _cef_render_process_handler_t* self, - struct _cef_browser_t* browser, enum cef_process_id_t source_process, - struct _cef_process_message_t* message); -} cef_render_process_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_request_capi.h b/cef/include/capi/cef_request_capi.h deleted file mode 100644 index da895f362..000000000 --- a/cef/include/capi/cef_request_capi.h +++ /dev/null @@ -1,276 +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; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_request_t* self); - - /// - // 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_urlrequest_t. See - // cef_urlrequest_flags_t for supported values. - /// - int (CEF_CALLBACK *get_flags)(struct _cef_request_t* self); - - /// - // Set the flags used in combination with cef_urlrequest_t. See - // cef_urlrequest_flags_t for supported values. - /// - void (CEF_CALLBACK *set_flags)(struct _cef_request_t* self, int flags); - - /// - // Set the URL to the first party for cookies used in combination with - // cef_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_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 true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_t* self); - - /// - // 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; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_element_t* self); - - /// - // 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_ diff --git a/cef/include/capi/cef_request_handler_capi.h b/cef/include/capi/cef_request_handler_capi.h deleted file mode 100644 index d2a9477d2..000000000 --- a/cef/include/capi/cef_request_handler_capi.h +++ /dev/null @@ -1,190 +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" - - -/// -// Callback structure used for asynchronous continuation of authentication -// requests. -/// -typedef struct _cef_auth_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the authentication request. - /// - void (CEF_CALLBACK *cont)(struct _cef_auth_callback_t* self, - const cef_string_t* username, const cef_string_t* password); - - /// - // Cancel the authentication request. - /// - void (CEF_CALLBACK *cancel)(struct _cef_auth_callback_t* self); -} cef_auth_callback_t; - - -/// -// Callback structure used for asynchronous continuation of quota requests. -/// -typedef struct _cef_quota_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Continue the quota request. If |allow| is true (1) the request will be - // allowed. Otherwise, the request will be denied. - /// - void (CEF_CALLBACK *cont)(struct _cef_quota_callback_t* self, int allow); - - /// - // Cancel the quota request. - /// - void (CEF_CALLBACK *cancel)(struct _cef_quota_callback_t* self); -} cef_quota_callback_t; - - -/// -// 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 IO thread before a resource request is loaded. The |request| - // object may be modified. To cancel the request return true (1) otherwise - // return false (0). - /// - int (CEF_CALLBACK *on_before_resource_load)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_request_t* request); - - /// - // Called on the IO thread before a resource is loaded. To allow the resource - // to load normally return NULL. To specify a handler for the resource return - // a cef_resource_handler_t object. The |request| object should not be - // modified in this callback. - /// - struct _cef_resource_handler_t* (CEF_CALLBACK *get_resource_handler)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_request_t* request); - - /// - // 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, struct _cef_frame_t* frame, - const cef_string_t* old_url, cef_string_t* new_url); - - /// - // 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| contains the port number. Return true (1) to continue - // the request and call cef_auth_callback_t::cont() when the authentication - // information is available. Return false (0) to cancel the request. - /// - int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy, - const cef_string_t* host, int port, const cef_string_t* realm, - const cef_string_t* scheme, struct _cef_auth_callback_t* callback); - - /// - // Called on the IO thread when JavaScript requests a specific storage quota - // size via the webkitStorageInfo.requestQuota function. |origin_url| is the - // origin of the page making the request. |new_size| is the requested quota - // size in bytes. Return true (1) and call cef_quota_callback_t::cont() either - // in this function or at a later time to grant or deny the request. Return - // false (0) to cancel the request. - /// - int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* origin_url, - int64 new_size, struct _cef_quota_callback_t* callback); - - /// - // 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); - - /// - // Called on the UI thread to handle requests for URLs with an unknown - // protocol component. Set |allow_os_execution| to true (1) to attempt - // execution via the registered OS protocol handler, if any. SECURITY WARNING: - // YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR - // OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION. - /// - void (CEF_CALLBACK *on_protocol_execution)( - struct _cef_request_handler_t* self, struct _cef_browser_t* browser, - const cef_string_t* url, int* allow_os_execution); - - /// - // Called on the browser process IO thread before a plugin is loaded. Return - // true (1) to block loading of the plugin. - /// - int (CEF_CALLBACK *on_before_plugin_load)(struct _cef_request_handler_t* self, - struct _cef_browser_t* browser, const cef_string_t* url, - const cef_string_t* policy_url, struct _cef_web_plugin_info_t* info); -} cef_request_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_resource_bundle_handler_capi.h b/cef/include/capi/cef_resource_bundle_handler_capi.h deleted file mode 100644 index 62a90c04e..000000000 --- a/cef/include/capi/cef_resource_bundle_handler_capi.h +++ /dev/null @@ -1,86 +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). Supported message IDs are listed in cef_pack_strings.h. - /// - 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. Supported resource IDs are listed in - // cef_pack_resources.h. - /// - 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_ diff --git a/cef/include/capi/cef_resource_handler_capi.h b/cef/include/capi/cef_resource_handler_capi.h deleted file mode 100644 index 5f2d8384b..000000000 --- a/cef/include/capi/cef_resource_handler_capi.h +++ /dev/null @@ -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_RESOURCE_HANDLER_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure used to implement a custom request handler structure. The functions -// of this structure will always be called on the IO thread. -/// -typedef struct _cef_resource_handler_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Begin processing the request. To handle the request return true (1) and - // call cef_callback_t::cont() once the response header information is - // available (cef_callback_t::cont() 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_resource_handler_t* self, - struct _cef_request_t* request, struct _cef_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_resource_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 cef_callback_t::cont() when the - // data is available. To indicate response completion return false (0). - /// - int (CEF_CALLBACK *read_response)(struct _cef_resource_handler_t* self, - void* data_out, int bytes_to_read, int* bytes_read, - struct _cef_callback_t* callback); - - /// - // Return true (1) if the specified cookie can be sent with the request or - // false (0) otherwise. If false (0) is returned for any cookie then no - // cookies will be sent with the request. - /// - int (CEF_CALLBACK *can_get_cookie)(struct _cef_resource_handler_t* self, - const struct _cef_cookie_t* cookie); - - /// - // Return true (1) if the specified cookie returned with the response can be - // set or false (0) otherwise. - /// - int (CEF_CALLBACK *can_set_cookie)(struct _cef_resource_handler_t* self, - const struct _cef_cookie_t* cookie); - - /// - // Request processing has been canceled. - /// - void (CEF_CALLBACK *cancel)(struct _cef_resource_handler_t* self); -} cef_resource_handler_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_response_capi.h b/cef/include/capi/cef_response_capi.h deleted file mode 100644 index f583b1343..000000000 --- a/cef/include/capi/cef_response_capi.h +++ /dev/null @@ -1,130 +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; - - /// - // Returns true (1) if this object is read-only. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_response_t* self); - - /// - // 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; - - -/// -// Create a new cef_response_t object. -/// -CEF_EXPORT cef_response_t* cef_response_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ diff --git a/cef/include/capi/cef_scheme_capi.h b/cef/include/capi/cef_scheme_capi.h deleted file mode 100644 index 8eea0201c..000000000 --- a/cef/include/capi/cef_scheme_capi.h +++ /dev/null @@ -1,160 +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: - //
-  //  [scheme]://[username]:[password]@[host]:[port]/[url-path]
-  // 
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_resource_handler_t instances for handling scheme -// requests. 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 resource handler instance to handle the request. |browser| and - // |frame| will be the browser window and frame respectively that originated - // the request or NULL if the request did not originate from a browser window - // (for example, if the request came from cef_urlrequest_t). The |request| - // object passed to this function will not contain cookie data. - /// - struct _cef_resource_handler_t* (CEF_CALLBACK *create)( - struct _cef_scheme_handler_factory_t* self, - struct _cef_browser_t* browser, struct _cef_frame_t* frame, - const cef_string_t* scheme_name, struct _cef_request_t* request); -} cef_scheme_handler_factory_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ diff --git a/cef/include/capi/cef_stream_capi.h b/cef/include/capi/cef_stream_capi.h deleted file mode 100644 index e4b32b597..000000000 --- a/cef/include/capi/cef_stream_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_string_visitor_capi.h b/cef/include/capi/cef_string_visitor_capi.h deleted file mode 100644 index 13407ccd8..000000000 --- a/cef/include/capi/cef_string_visitor_capi.h +++ /dev/null @@ -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_STRING_VISITOR_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Implement this structure to receive string values asynchronously. -/// -typedef struct _cef_string_visitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be executed. - /// - void (CEF_CALLBACK *visit)(struct _cef_string_visitor_t* self, - const cef_string_t* string); -} cef_string_visitor_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ diff --git a/cef/include/capi/cef_task_capi.h b/cef/include/capi/cef_task_capi.h deleted file mode 100644 index e4deec516..000000000 --- a/cef/include/capi/cef_task_capi.h +++ /dev/null @@ -1,160 +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" - - -/// -// Returns true (1) if called on the specified thread. Equivalent to using -// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread(). -/// -CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId); - -/// -// Post a task for execution on the specified thread. Equivalent to using -// cef_task_runner_t::GetForThread(threadId)->PostTask(task). -/// -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. Equivalent to -// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task, -// delay_ms). -/// -CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, - struct _cef_task_t* task, int64 delay_ms); - -/// -// Implement this structure for asynchronous task execution. If the task is -// posted successfully and if the associated message loop is still running then -// the execute() function will be called on the target thread. If the task fails -// to post then the task object may be destroyed on the source thread instead of -// the target thread. For this reason be cautious when performing work in the -// task object destructor. -/// -typedef struct _cef_task_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be executed on the target thread. - /// - void (CEF_CALLBACK *execute)(struct _cef_task_t* self); -} cef_task_t; - - -/// -// Structure that asynchronously executes tasks on the associated thread. It is -// safe to call the functions of this structure on any thread. -// -// CEF maintains multiple internal threads that are used for handling different -// types of tasks in different processes. The cef_thread_id_t definitions in -// cef_types.h list the common CEF threads. Task runners are also available for -// other CEF threads as appropriate (for example, V8 WebWorker threads). -/// -typedef struct _cef_task_runner_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if this object is pointing to the same task runner as - // |that| object. - /// - int (CEF_CALLBACK *is_same)(struct _cef_task_runner_t* self, - struct _cef_task_runner_t* that); - - /// - // Returns true (1) if this task runner belongs to the current thread. - /// - int (CEF_CALLBACK *belongs_to_current_thread)( - struct _cef_task_runner_t* self); - - /// - // Returns true (1) if this task runner is for the specified CEF thread. - /// - int (CEF_CALLBACK *belongs_to_thread)(struct _cef_task_runner_t* self, - cef_thread_id_t threadId); - - /// - // Post a task for execution on the thread associated with this task runner. - // Execution will occur asynchronously. - /// - int (CEF_CALLBACK *post_task)(struct _cef_task_runner_t* self, - struct _cef_task_t* task); - - /// - // Post a task for delayed execution on the thread associated with this task - // runner. Execution will occur asynchronously. Delayed tasks are not - // supported on V8 WebWorker threads and will be executed without the - // specified delay. - /// - int (CEF_CALLBACK *post_delayed_task)(struct _cef_task_runner_t* self, - struct _cef_task_t* task, int64 delay_ms); -} cef_task_runner_t; - - -/// -// Returns the task runner for the current thread. Only CEF threads will have -// task runners. An NULL reference will be returned if this function is called -// on an invalid thread. -/// -CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread(); - -/// -// Returns the task runner for the specified CEF thread. -/// -CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread( - cef_thread_id_t threadId); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ diff --git a/cef/include/capi/cef_trace_capi.h b/cef/include/capi/cef_trace_capi.h deleted file mode 100644 index d3ba7868b..000000000 --- a/cef/include/capi/cef_trace_capi.h +++ /dev/null @@ -1,129 +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_TRACE_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Start tracing events on all processes. Tracing begins immediately locally, -// and asynchronously on child processes as soon as they receive the -// BeginTracing request. -// -// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is -// pending, CefBeginTracing will fail and return false (0). -// -// |categories| is a comma-delimited list of category wildcards. A category can -// have an optional '-' prefix to make it an excluded category. Having both -// included and excluded categories in the same list is not supported. -// -// Example: "test_MyTest*" Example: "test_MyTest*,test_OtherStuff" Example: -// "-excluded_category1,-excluded_category2" -// -// This function must be called on the browser process UI thread. -/// -CEF_EXPORT int cef_begin_tracing(struct _cef_trace_client_t* client, - const cef_string_t* categories); - -/// -// Get the maximum trace buffer percent full state across all processes. -// -// cef_trace_client_t::OnTraceBufferPercentFullReply will be called -// asynchronously after the value is determibed. When any child process reaches -// 100% full tracing will end automatically and -// cef_trace_client_t::OnEndTracingComplete will be called. This function fails -// and returns false (0) if trace is ending or disabled, no cef_trace_client_t -// was passed to CefBeginTracing, or if a previous call to -// CefGetTraceBufferPercentFullAsync is pending. -// -// This function must be called on the browser process UI thread. -/// -CEF_EXPORT int cef_get_trace_buffer_percent_full_async(); - -/// -// Stop tracing events on all processes. -// -// This function will fail and return false (0) if a previous call to -// CefEndTracingAsync is already pending or if CefBeginTracing was not called. -// -// This function must be called on the browser process UI thread. -/// -CEF_EXPORT int cef_end_tracing_async(); - -/// -// Implement this structure to receive trace notifications. The functions of -// this structure will be called on the browser process UI thread. -/// -typedef struct _cef_trace_client_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Called 0 or more times between CefBeginTracing and OnEndTracingComplete - // with a UTF8 JSON |fragment| of the specified |fragment_size|. Do not keep a - // reference to |fragment|. - /// - void (CEF_CALLBACK *on_trace_data_collected)(struct _cef_trace_client_t* self, - const char* fragment, size_t fragment_size); - - /// - // Called in response to CefGetTraceBufferPercentFullAsync. - /// - void (CEF_CALLBACK *on_trace_buffer_percent_full_reply)( - struct _cef_trace_client_t* self, float percent_full); - - /// - // Called after all processes have sent their trace data. - /// - void (CEF_CALLBACK *on_end_tracing_complete)( - struct _cef_trace_client_t* self); -} cef_trace_client_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ diff --git a/cef/include/capi/cef_url_capi.h b/cef/include/capi/cef_url_capi.h deleted file mode 100644 index b0fdcd22b..000000000 --- a/cef/include/capi/cef_url_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/capi/cef_urlrequest_capi.h b/cef/include/capi/cef_urlrequest_capi.h deleted file mode 100644 index 23100feeb..000000000 --- a/cef/include/capi/cef_urlrequest_capi.h +++ /dev/null @@ -1,164 +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_URLREQUEST_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure used to make a URL request. URL requests are not associated with a -// browser instance so no cef_client_t callbacks will be executed. URL requests -// can be created on any valid CEF thread in either the browser or render -// process. Once created the functions of the URL request object must be -// accessed on the same thread that created it. -/// -typedef struct _cef_urlrequest_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the request object used to create this URL request. The returned - // object is read-only and should not be modified. - /// - struct _cef_request_t* (CEF_CALLBACK *get_request)( - struct _cef_urlrequest_t* self); - - /// - // Returns the client. - /// - struct _cef_urlrequest_client_t* (CEF_CALLBACK *get_client)( - struct _cef_urlrequest_t* self); - - /// - // Returns the request status. - /// - enum cef_urlrequest_status_t (CEF_CALLBACK *get_request_status)( - struct _cef_urlrequest_t* self); - - /// - // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 - // otherwise. - /// - enum cef_errorcode_t (CEF_CALLBACK *get_request_error)( - struct _cef_urlrequest_t* self); - - /// - // Returns the response, or NULL if no response information is available. - // Response information will only be available after the upload has completed. - // The returned object is read-only and should not be modified. - /// - struct _cef_response_t* (CEF_CALLBACK *get_response)( - struct _cef_urlrequest_t* self); - - /// - // Cancel the request. - /// - void (CEF_CALLBACK *cancel)(struct _cef_urlrequest_t* self); -} cef_urlrequest_t; - - -/// -// Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request -// functions are supported. The |request| object will be marked as read-only -// after calling this function. -/// -CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create( - struct _cef_request_t* request, struct _cef_urlrequest_client_t* client); - - -/// -// Structure that should be implemented by the cef_urlrequest_t client. The -// functions of this structure will be called on the same thread that created -// the request. -/// -typedef struct _cef_urlrequest_client_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Notifies the client that the request has completed. Use the - // cef_urlrequest_t::GetRequestStatus function to determine if the request was - // successful or not. - /// - void (CEF_CALLBACK *on_request_complete)( - struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request); - - /// - // Notifies the client of upload progress. |current| denotes the number of - // bytes sent so far and |total| is the total size of uploading data (or -1 if - // chunked upload is enabled). This function will only be called if the - // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. - /// - void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request, uint64 current, uint64 total); - - /// - // Notifies the client of download progress. |current| denotes the number of - // bytes received up to the call and |total| is the expected total size of the - // response (or -1 if not determined). - /// - void (CEF_CALLBACK *on_download_progress)( - struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request, - uint64 current, uint64 total); - - /// - // Called when some part of the response is read. |data| contains the current - // bytes received since the last call. This function will not be called if the - // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. - /// - void (CEF_CALLBACK *on_download_data)(struct _cef_urlrequest_client_t* self, - struct _cef_urlrequest_t* request, const void* data, - size_t data_length); -} cef_urlrequest_client_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ diff --git a/cef/include/capi/cef_v8_capi.h b/cef/include/capi/cef_v8_capi.h deleted file mode 100644 index 7ec761d6f..000000000 --- a/cef/include/capi/cef_v8_capi.h +++ /dev/null @@ -1,844 +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 -// only be called on the render process main thread. -// -// Example JavaScript extension code:
-//   // 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;
-//     };
-//   })();
-// 
Example usage in the page:
-//   // 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();
-// 
-/// -CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name, - const cef_string_t* javascript_code, struct _cef_v8handler_t* handler); - -/// -// Structure representing a V8 context handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8context_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns the task runner associated with this context. V8 handles can only - // be accessed from the thread on which they are created. This function can be - // called on any render process thread. - /// - struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)( - struct _cef_v8context_t* self); - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. 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. This function will return an NULL - // reference for WebWorker contexts. - /// - struct _cef_browser_t* (CEF_CALLBACK *get_browser)( - struct _cef_v8context_t* self); - - /// - // Returns the frame for this context. This function will return an NULL - // reference for WebWorker contexts. - /// - 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 be called on the thread associated with the -// V8 function. -/// -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 be called on the thread associated with -// the V8 accessor. -/// -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. The functions of this structure may be -// called on any render process thread. -/// -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 handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8value_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. 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 handle. V8 handles can only be -// accessed from the thread on which they are created. Valid threads for -// creating a V8 handle include the render process main thread (TID_RENDERER) -// and WebWorker threads. A task runner for posting tasks on the associated -// thread can be retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8stack_trace_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. 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 handle. V8 handles can only be -// accessed from the thread on which they are created. Valid threads for -// creating a V8 handle include the render process main thread (TID_RENDERER) -// and WebWorker threads. A task runner for posting tasks on the associated -// thread can be retrieved via the cef_v8context_t::get_task_runner() function. -/// -typedef struct _cef_v8stack_frame_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Returns true (1) if the underlying handle is valid and it can be accessed - // on the current thread. 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_ diff --git a/cef/include/capi/cef_values_capi.h b/cef/include/capi/cef_values_capi.h deleted file mode 100644 index ed59fa4fc..000000000 --- a/cef/include/capi/cef_values_capi.h +++ /dev/null @@ -1,461 +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_VALUES_CAPI_H_ -#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/capi/cef_base_capi.h" - - -/// -// Structure representing a binary value. Can be used on any process and thread. -/// -typedef struct _cef_binary_value_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_binary_value_t* self); - - /// - // Returns true (1) if this object is currently owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_binary_value_t* self); - - /// - // Returns a copy of this object. The data in this object will also be copied. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *copy)( - struct _cef_binary_value_t* self); - - /// - // Returns the data size. - /// - size_t (CEF_CALLBACK *get_size)(struct _cef_binary_value_t* self); - - /// - // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at - // the specified byte |data_offset|. Returns the number of bytes read. - /// - size_t (CEF_CALLBACK *get_data)(struct _cef_binary_value_t* self, - void* buffer, size_t buffer_size, size_t data_offset); -} cef_binary_value_t; - - -/// -// Creates a new object that is not owned by any other object. The specified -// |data| will be copied. -/// -CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data, - size_t data_size); - - -/// -// Structure representing a dictionary value. Can be used on any process and -// thread. -/// -typedef struct _cef_dictionary_value_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_dictionary_value_t* self); - - /// - // Returns true (1) if this object is currently owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_dictionary_value_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_dictionary_value_t* self); - - /// - // Returns a writable copy of this object. If |exclude_NULL_children| is true - // (1) any NULL dictionaries or lists will be excluded from the copy. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *copy)( - struct _cef_dictionary_value_t* self, int exclude_empty_children); - - /// - // Returns the number of values. - /// - size_t (CEF_CALLBACK *get_size)(struct _cef_dictionary_value_t* self); - - /// - // Removes all values. Returns true (1) on success. - /// - int (CEF_CALLBACK *clear)(struct _cef_dictionary_value_t* self); - - /// - // Returns true (1) if the current dictionary has a value for the given key. - /// - int (CEF_CALLBACK *has_key)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Reads all keys for this dictionary into the specified vector. - /// - int (CEF_CALLBACK *get_keys)(struct _cef_dictionary_value_t* self, - cef_string_list_t keys); - - /// - // Removes the value at the specified key. Returns true (1) is the value was - // removed successfully. - /// - int (CEF_CALLBACK *remove)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value type for the specified key. - /// - enum cef_value_type_t (CEF_CALLBACK *get_type)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type bool. - /// - int (CEF_CALLBACK *get_bool)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value at the specified key as type int. - /// - int (CEF_CALLBACK *get_int)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value at the specified key as type double. - /// - double (CEF_CALLBACK *get_double)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Returns the value at the specified key as type string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_string)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type binary. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type dictionary. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Returns the value at the specified key as type list. - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_list)( - struct _cef_dictionary_value_t* self, const cef_string_t* key); - - /// - // Sets the value at the specified key as type null. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_null)(struct _cef_dictionary_value_t* self, - const cef_string_t* key); - - /// - // Sets the value at the specified key as type bool. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_bool)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, int value); - - /// - // Sets the value at the specified key as type int. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_int)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, int value); - - /// - // Sets the value at the specified key as type double. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_double)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, double value); - - /// - // Sets the value at the specified key as type string. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_string)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, const cef_string_t* value); - - /// - // Sets the value at the specified key as type binary. Returns true (1) if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_binary)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_binary_value_t* value); - - /// - // Sets the value at the specified key as type dict. Returns true (1) if the - // value was set successfully. After calling this function the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_dictionary)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_dictionary_value_t* value); - - /// - // Sets the value at the specified key as type list. Returns true (1) if the - // value was set successfully. After calling this function the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_list)(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_list_value_t* value); -} cef_dictionary_value_t; - - -/// -// Creates a new object that is not owned by any other object. -/// -CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create(); - - -/// -// Structure representing a list value. Can be used on any process and thread. -/// -typedef struct _cef_list_value_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_list_value_t* self); - - /// - // Returns true (1) if this object is currently owned by another object. - /// - int (CEF_CALLBACK *is_owned)(struct _cef_list_value_t* self); - - /// - // Returns true (1) if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - int (CEF_CALLBACK *is_read_only)(struct _cef_list_value_t* self); - - /// - // Returns a writable copy of this object. - /// - struct _cef_list_value_t* (CEF_CALLBACK *copy)( - struct _cef_list_value_t* self); - - /// - // Sets the number of values. If the number of values is expanded all new - // value slots will default to type null. Returns true (1) on success. - /// - int (CEF_CALLBACK *set_size)(struct _cef_list_value_t* self, size_t size); - - /// - // Returns the number of values. - /// - size_t (CEF_CALLBACK *get_size)(struct _cef_list_value_t* self); - - /// - // Removes all values. Returns true (1) on success. - /// - int (CEF_CALLBACK *clear)(struct _cef_list_value_t* self); - - /// - // Removes the value at the specified index. - /// - int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value type at the specified index. - /// - enum cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self, - int index); - - /// - // Returns the value at the specified index as type bool. - /// - int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type int. - /// - int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type double. - /// - double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type string. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_string)( - struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type binary. - /// - struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)( - struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type dictionary. - /// - struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)( - struct _cef_list_value_t* self, int index); - - /// - // Returns the value at the specified index as type list. - /// - struct _cef_list_value_t* (CEF_CALLBACK *get_list)( - struct _cef_list_value_t* self, int index); - - /// - // Sets the value at the specified index as type null. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, int index); - - /// - // Sets the value at the specified index as type bool. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, int index, - int value); - - /// - // Sets the value at the specified index as type int. Returns true (1) if the - // value was set successfully. - /// - int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, int index, - int value); - - /// - // Sets the value at the specified index as type double. Returns true (1) if - // the value was set successfully. - /// - int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, int index, - double value); - - /// - // Sets the value at the specified index as type string. Returns true (1) if - // the value was set successfully. - /// - int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, int index, - const cef_string_t* value); - - /// - // Sets the value at the specified index as type binary. Returns true (1) if - // the value was set successfully. After calling this function the |value| - // object will no longer be valid. If |value| is currently owned by another - // object then the value will be copied and the |value| reference will not - // change. Otherwise, ownership will be transferred to this object and the - // |value| reference will be invalidated. - /// - int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, int index, - struct _cef_binary_value_t* value); - - /// - // Sets the value at the specified index as type dict. Returns true (1) if the - // value was set successfully. After calling this function the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self, int index, - struct _cef_dictionary_value_t* value); - - /// - // Sets the value at the specified index as type list. Returns true (1) if the - // value was set successfully. After calling this function the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, int index, - struct _cef_list_value_t* value); -} cef_list_value_t; - - -/// -// Creates a new object that is not owned by any other object. -/// -CEF_EXPORT cef_list_value_t* cef_list_value_create(); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ diff --git a/cef/include/capi/cef_web_plugin_capi.h b/cef/include/capi/cef_web_plugin_capi.h deleted file mode 100644 index 13ac38b39..000000000 --- a/cef/include/capi/cef_web_plugin_capi.h +++ /dev/null @@ -1,194 +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" - - -/// -// Visit web plugin information. Can be called on any thread in the browser -// process. -/// -CEF_EXPORT void cef_visit_web_plugin_info( - struct _cef_web_plugin_info_visitor_t* visitor); - -/// -// Cause the plugin list to refresh the next time it is accessed regardless of -// whether it has already been loaded. Can be called on any thread in the -// browser process. -/// -CEF_EXPORT void cef_refresh_web_plugins(); - -/// -// Add a plugin path (directory + file). This change may not take affect until -// after cef_refresh_web_plugins() is called. Can be called on any thread in the -// browser process. -/// -CEF_EXPORT void cef_add_web_plugin_path(const cef_string_t* path); - -/// -// Add a plugin directory. This change may not take affect until after -// cef_refresh_web_plugins() is called. Can be called on any thread in the -// browser process. -/// -CEF_EXPORT void cef_add_web_plugin_directory(const cef_string_t* dir); - -/// -// Remove a plugin path (directory + file). This change may not take affect -// until after cef_refresh_web_plugins() is called. Can be called on any thread -// in the browser process. -/// -CEF_EXPORT void cef_remove_web_plugin_path(const cef_string_t* path); - -/// -// Unregister an internal plugin. This may be undone the next time -// cef_refresh_web_plugins() is called. Can be called on any thread in the -// browser process. -/// -CEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path); - -/// -// Force a plugin to shutdown. Can be called on any thread in the browser -// process but will be executed on the IO thread. -/// -CEF_EXPORT void cef_force_web_plugin_shutdown(const cef_string_t* path); - -/// -// Register a plugin crash. Can be called on any thread in the browser process -// but will be executed on the IO thread. -/// -CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path); - -/// -// Query if a plugin is unstable. Can be called on any thread in the browser -// process. -/// -CEF_EXPORT void cef_is_web_plugin_unstable(const cef_string_t* path, - struct _cef_web_plugin_unstable_callback_t* callback); - -/// -// 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; - - -/// -// Structure to implement for visiting web plugin information. The functions of -// this structure will be called on the browser process UI thread. -/// -typedef struct _cef_web_plugin_info_visitor_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called once for each plugin. |count| is the 0-based - // index for the current plugin. |total| is the total number of plugins. - // Return false (0) to stop visiting plugins. This function may never be - // called if no plugins are found. - /// - int (CEF_CALLBACK *visit)(struct _cef_web_plugin_info_visitor_t* self, - struct _cef_web_plugin_info_t* info, int count, int total); -} cef_web_plugin_info_visitor_t; - - -/// -// Structure to implement for receiving unstable plugin information. The -// functions of this structure will be called on the browser process IO thread. -/// -typedef struct _cef_web_plugin_unstable_callback_t { - /// - // Base structure. - /// - cef_base_t base; - - /// - // Method that will be called for the requested plugin. |unstable| will be - // true (1) if the plugin has reached the crash count threshold of 3 times in - // 120 seconds. - /// - void (CEF_CALLBACK *is_unstable)( - struct _cef_web_plugin_unstable_callback_t* self, - const cef_string_t* path, int unstable); -} cef_web_plugin_unstable_callback_t; - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_ diff --git a/cef/include/capi/cef_xml_reader_capi.h b/cef/include/capi/cef_xml_reader_capi.h deleted file mode 100644 index 952aa26e3..000000000 --- a/cef/include/capi/cef_xml_reader_capi.h +++ /dev/null @@ -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. is considered - // NULL but 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_ diff --git a/cef/include/capi/cef_zip_reader_capi.h b/cef/include/capi/cef_zip_reader_capi.h deleted file mode 100644 index 36c5be0de..000000000 --- a/cef/include/capi/cef_zip_reader_capi.h +++ /dev/null @@ -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_ diff --git a/cef/include/cef_app.h b/cef/include/cef_app.h deleted file mode 100644 index 9d1aa321d..000000000 --- a/cef/include/cef_app.h +++ /dev/null @@ -1,175 +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_APP_H_ -#define CEF_INCLUDE_CEF_APP_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser_process_handler.h" -#include "include/cef_command_line.h" -#include "include/cef_render_process_handler.h" -#include "include/cef_resource_bundle_handler.h" -#include "include/cef_scheme.h" - -class CefApp; - -/// -// This function should be called from the application entry point function to -// execute a secondary process. It can be used to run secondary processes from -// the browser client executable (default behavior) or from a separate -// executable specified by the CefSettings.browser_subprocess_path value. If -// called for the browser process (identified by no "type" command-line value) -// it will return immediately with a value of -1. If called for a recognized -// secondary process it will block until the process should exit and then return -// the process exit code. The |application| parameter may be empty. -/// -/*--cef(revision_check,optional_param=application)--*/ -int CefExecuteProcess(const CefMainArgs& args, CefRefPtr application); - -/// -// This function should be called on the main application thread to initialize -// the CEF browser process. 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 CefMainArgs& args, const CefSettings& settings, - CefRefPtr application); - -/// -// This function should be called on the main application thread to shut down -// the CEF browser process 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(); - -/// -// Implement this interface to provide handler implementations. Methods will be -// called by the process and/or thread indicated. -/// -/*--cef(source=client,no_debugct_check)--*/ -class CefApp : public virtual CefBase { - public: - /// - // Provides an opportunity to view and/or modify command-line arguments before - // processing by CEF and Chromium. The |process_type| value will be empty for - // the browser process. Do not keep a reference to the CefCommandLine object - // passed to this method. The CefSettings.command_line_args_disabled value - // can be used to start with an empty command-line object. Any values - // specified in CefSettings that equate to command-line arguments will be set - // before this method is called. Be cautious when using this method to modify - // command-line arguments for non-browser processes as this may result in - // undefined behavior including crashes. - /// - /*--cef(optional_param=process_type)--*/ - virtual void OnBeforeCommandLineProcessing( - const CefString& process_type, - CefRefPtr command_line) { - } - - /// - // Provides an opportunity to register custom schemes. Do not keep a reference - // to the |registrar| object. This method is called on the main thread for - // each process and the registered schemes should be the same across all - // processes. - /// - /*--cef()--*/ - virtual void OnRegisterCustomSchemes( - CefRefPtr 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 by the browser and render processes on multiple threads. - /// - /*--cef()--*/ - virtual CefRefPtr GetResourceBundleHandler() { - return NULL; - } - - /// - // Return the handler for functionality specific to the browser process. This - // method is called on multiple threads in the browser process. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowserProcessHandler() { - return NULL; - } - - /// - // Return the handler for functionality specific to the render process. This - // method is called on the render process main thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetRenderProcessHandler() { - return NULL; - } -}; - -#endif // CEF_INCLUDE_CEF_APP_H_ diff --git a/cef/include/cef_application_mac.h b/cef/include/cef_application_mac.h deleted file mode 100644 index 3a5126ef7..000000000 --- a/cef/include/cef_application_mac.h +++ /dev/null @@ -1,137 +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. -#import "base/message_pump_mac.h" - -// Use the existing CrAppControlProtocol definition. -#import "base/mac/scoped_sending_event.h" - -// Use the existing UnderlayableSurface definition. -#import "ui/base/cocoa/underlay_opengl_hosting_window.h" - -// Use the existing empty protocol definitions. -#import "base/mac/cocoa_protocols.h" - -#else // BUILDING_CEF_SHARED - -#import -#import - -// Copy of definition from base/message_pump_mac.h. -@protocol CrAppProtocol -// Must return true if -[NSApplication sendEvent:] is currently on the stack. -- (BOOL)isHandlingSendEvent; -@end - -// Copy of definition from base/mac/scoped_sending_event.h. -@protocol CrAppControlProtocol -- (void)setHandlingSendEvent:(BOOL)handlingSendEvent; -@end - -// Copy of definition from ui/base/cocoa/underlay_opengl_hosting_window.h. -// Common base class for windows that host a OpenGL surface that renders under -// the window. Contains methods relating to hole punching so that the OpenGL -// surface is visible through the window. -@interface UnderlayOpenGLHostingWindow : NSWindow -@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 -@end - -// Controls the state of |isHandlingSendEvent| in the event loop so that it is -// reset properly. -class CefScopedSendingEvent { - public: - CefScopedSendingEvent() - : app_(static_cast*>( - [NSApplication sharedApplication])), - handling_([app_ isHandlingSendEvent]) { - [app_ setHandlingSendEvent:YES]; - } - ~CefScopedSendingEvent() { - [app_ setHandlingSendEvent:handling_]; - } - - private: - NSApplication* app_; - BOOL handling_; -}; - -#endif // defined(OS_MACOSX) && defined(__OBJC__) - -#endif // CEF_INCLUDE_CEF_APPLICATION_MAC_H_ diff --git a/cef/include/cef_base.h b/cef/include/cef_base.h deleted file mode 100644 index bc284f72e..000000000 --- a/cef/include/cef_base.h +++ /dev/null @@ -1,154 +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_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_ diff --git a/cef/include/cef_browser.h b/cef/include/cef_browser.h deleted file mode 100644 index c19e5f502..000000000 --- a/cef/include/cef_browser.h +++ /dev/null @@ -1,412 +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_BROWSER_H_ -#define CEF_INCLUDE_CEF_BROWSER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_frame.h" -#include "include/cef_process_message.h" -#include - -class CefBrowserHost; -class CefClient; - - -/// -// Class used to represent a browser window. When used in the browser process -// the methods of this class may be called on any thread unless otherwise -// indicated in the comments. When used in the render process the methods of -// this class may only be called on the main thread. -/// -/*--cef(source=library)--*/ -class CefBrowser : public virtual CefBase { - public: - /// - // Returns the browser host object. This method can only be called in the - // browser process. - /// - /*--cef()--*/ - virtual CefRefPtr GetHost() =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; - - /// - // Returns true if the browser is currently loading. - /// - /*--cef()--*/ - virtual bool IsLoading() =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; - - /// - // Returns the globally unique identifier for this browser. - /// - /*--cef()--*/ - virtual int GetIdentifier() =0; - - /// - // Returns true if this object is pointing to the same handle as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =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 main (top-level) frame for the browser window. - /// - /*--cef()--*/ - virtual CefRefPtr GetMainFrame() =0; - - /// - // Returns the focused frame for the browser window. - /// - /*--cef()--*/ - virtual CefRefPtr GetFocusedFrame() =0; - - /// - // Returns the frame with the specified identifier, or NULL if not found. - /// - /*--cef(capi_name=get_frame_byident)--*/ - virtual CefRefPtr GetFrame(int64 identifier) =0; - - /// - // Returns the frame with the specified name, or NULL if not found. - /// - /*--cef()--*/ - virtual CefRefPtr GetFrame(const CefString& name) =0; - - /// - // Returns the number of frames that currently exist. - /// - /*--cef()--*/ - virtual size_t GetFrameCount() =0; - - /// - // Returns the identifiers of all existing frames. - /// - /*--cef(count_func=identifiers:GetFrameCount)--*/ - virtual void GetFrameIdentifiers(std::vector& identifiers) =0; - - /// - // Returns the names of all existing frames. - /// - /*--cef()--*/ - virtual void GetFrameNames(std::vector& names) =0; - - // - // Send a message to the specified |target_process|. Returns true if the - // message was sent successfully. - /// - /*--cef()--*/ - virtual bool SendProcessMessage(CefProcessId target_process, - CefRefPtr message) =0; -}; - - -/// -// Callback interface for CefBrowserHost::RunFileDialog. The methods of this -// class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefRunFileDialogCallback : public virtual CefBase { - public: - /// - // Called asynchronously after the file dialog is dismissed. If the selection - // was successful |file_paths| will be a single value or a list of values - // depending on the dialog mode. If the selection was cancelled |file_paths| - // will be empty. - /// - /*--cef(capi_name=cont)--*/ - virtual void OnFileDialogDismissed( - CefRefPtr browser_host, - const std::vector& file_paths) =0; -}; - - -/// -// Class used to represent the browser process aspects of a browser window. The -// methods of this class can only be called in the browser process. They may be -// called on any thread in that process unless otherwise indicated in the -// comments. -/// -/*--cef(source=library)--*/ -class CefBrowserHost : public virtual CefBase { - public: - typedef cef_file_dialog_mode_t FileDialogMode; - 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 can be called on any browser - // process thread and will not block. - /// - /*--cef(optional_param=client,optional_param=url)--*/ - static bool CreateBrowser(const CefWindowInfo& windowInfo, - CefRefPtr client, - const CefString& url, - const CefBrowserSettings& settings); - - /// - // Create a new browser window using the window parameters specified by - // |windowInfo|. This method can only be called on the browser process UI - // thread. - /// - /*--cef(optional_param=client,optional_param=url)--*/ - static CefRefPtr CreateBrowserSync( - const CefWindowInfo& windowInfo, - CefRefPtr client, - const CefString& url, - const CefBrowserSettings& settings); - - /// - // Returns the hosted browser object. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowser() =0; - - /// - // 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; - - /// - // 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 client for this browser. - /// - /*--cef()--*/ - virtual CefRefPtr GetClient() =0; - - /// - // Returns the DevTools URL for this browser. If |http_scheme| is true the - // returned URL will use the http scheme instead of the chrome-devtools - // scheme. Remote debugging can be enabled by specifying the - // "remote-debugging-port" command-line flag or by setting the - // CefSettings.remote_debugging_port value. If remote debugging is not enabled - // this method will return an empty string. - /// - /*--cef()--*/ - virtual CefString GetDevToolsURL(bool http_scheme) =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. If called on the UI thread the change will be applied - // immediately. Otherwise, the change will be applied asynchronously on the - // UI thread. - /// - /*--cef()--*/ - virtual void SetZoomLevel(double zoomLevel) =0; - - /// - // Call to run a file chooser dialog. Only a single file chooser dialog may be - // pending at any given time. |mode| represents the type of dialog to display. - // |title| to the title to be used for the dialog and may be empty to show the - // default title ("Open" or "Save" depending on the mode). |default_file_name| - // is the default file name to select in the dialog. |accept_types| is a list - // of valid lower-cased MIME types or file extensions specified in an input - // element and is used to restrict selectable files to such types. |callback| - // will be executed after the dialog is dismissed or immediately if another - // dialog is already pending. The dialog will be initiated asynchronously on - // the UI thread. - /// - /*--cef(optional_param=title,optional_param=default_file_name, - optional_param=accept_types)--*/ - virtual void RunFileDialog(FileDialogMode mode, - const CefString& title, - const CefString& default_file_name, - const std::vector& accept_types, - CefRefPtr callback) =0; - - /// - // Returns true if window rendering is disabled. - /// - /*--cef()--*/ - virtual bool IsWindowRenderingDisabled() =0; - - /// - // Notify the browser that the widget has been resized. The browser will first - // call CefRenderHandler::GetViewRect to get the new size and then call - // CefRenderHandler::OnPaint asynchronously with the updated regions. This - // method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void WasResized() =0; - - /// - // Invalidate the |dirtyRect| region of the view. The browser will call - // CefRenderHandler::OnPaint asynchronously with the updated regions. This - // method is only used when window rendering is disabled. - /// - /*--cef()--*/ - virtual void Invalidate(const CefRect& dirtyRect, PaintElementType type) =0; - - /// - // Send a key event to the browser. - /// - /*--cef()--*/ - virtual void SendKeyEvent(const CefKeyEvent& event) =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(const CefMouseEvent& event, - 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(const CefMouseEvent& event, - 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. - // In order to scroll inside select popups with window rendering disabled - // CefRenderHandler::GetScreenPoint should be implemented properly. - /// - /*--cef()--*/ - virtual void SendMouseWheelEvent(const CefMouseEvent& event, - 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_ diff --git a/cef/include/cef_browser_process_handler.h b/cef/include/cef_browser_process_handler.h deleted file mode 100644 index 39e0dcbb1..000000000 --- a/cef/include/cef_browser_process_handler.h +++ /dev/null @@ -1,93 +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_BROWSER_PROCESS_HANDLER_H_ -#define CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_command_line.h" -#include "include/cef_proxy_handler.h" -#include "include/cef_values.h" - -/// -// Class used to implement browser process callbacks. The methods of this class -// will be called on the browser process main thread unless otherwise indicated. -/// -/*--cef(source=client)--*/ -class CefBrowserProcessHandler : public virtual CefBase { - public: - /// - // Return the handler for proxy events. If no handler is returned the default - // system handler will be used. This method is called on the browser process - // IO thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetProxyHandler() { - return NULL; - } - - /// - // Called on the browser process UI thread immediately after the CEF context - // has been initialized. - /// - /*--cef()--*/ - virtual void OnContextInitialized() {} - - /// - // Called before a child process is launched. Will be called on the browser - // process UI thread when launching a render process and on the browser - // process IO thread when launching a GPU or plugin process. Provides an - // opportunity to modify the child process command line. Do not keep a - // reference to |command_line| outside of this method. - /// - /*--cef()--*/ - virtual void OnBeforeChildProcessLaunch( - CefRefPtr command_line) {} - - /// - // Called on the browser process IO thread after the main thread has been - // created for a new render process. Provides an opportunity to specify extra - // information that will be passed to - // CefRenderProcessHandler::OnRenderThreadCreated() in the render process. Do - // not keep a reference to |extra_info| outside of this method. - /// - /*--cef()--*/ - virtual void OnRenderProcessThreadCreated( - CefRefPtr extra_info) {} -}; - -#endif // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_ diff --git a/cef/include/cef_callback.h b/cef/include/cef_callback.h deleted file mode 100644 index 34f67a6c6..000000000 --- a/cef/include/cef_callback.h +++ /dev/null @@ -1,62 +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_CALLBACK_H_ -#define CEF_INCLUDE_CEF_CALLBACK_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Generic callback interface used for asynchronous continuation. -/// -/*--cef(source=library)--*/ -class CefCallback : public virtual CefBase { - public: - /// - // Continue processing. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue() =0; - - /// - // Cancel processing. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -#endif // CEF_INCLUDE_CEF_CALLBACK_H_ diff --git a/cef/include/cef_client.h b/cef/include/cef_client.h deleted file mode 100644 index dbba43927..000000000 --- a/cef/include/cef_client.h +++ /dev/null @@ -1,176 +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_CLIENT_H_ -#define CEF_INCLUDE_CEF_CLIENT_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_context_menu_handler.h" -#include "include/cef_dialog_handler.h" -#include "include/cef_display_handler.h" -#include "include/cef_download_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_process_message.h" -#include "include/cef_render_handler.h" -#include "include/cef_request_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 context menus. If no handler is provided the default - // implementation will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetContextMenuHandler() { - return NULL; - } - - /// - // Return the handler for dialogs. If no handler is provided the default - // implementation will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetDialogHandler() { - return NULL; - } - - /// - // Return the handler for browser display state events. - /// - /*--cef()--*/ - virtual CefRefPtr GetDisplayHandler() { - return NULL; - } - - /// - // Return the handler for download events. If no handler is returned downloads - // will not be allowed. - /// - /*--cef()--*/ - virtual CefRefPtr GetDownloadHandler() { - return NULL; - } - - /// - // Return the handler for focus events. - /// - /*--cef()--*/ - virtual CefRefPtr GetFocusHandler() { - return NULL; - } - - /// - // Return the handler for geolocation permissions requests. If no handler is - // provided geolocation access will be denied by default. - /// - /*--cef()--*/ - virtual CefRefPtr GetGeolocationHandler() { - return NULL; - } - - /// - // Return the handler for JavaScript dialogs. If no handler is provided the - // default implementation will be used. - /// - /*--cef()--*/ - virtual CefRefPtr GetJSDialogHandler() { - return NULL; - } - - /// - // Return the handler for keyboard events. - /// - /*--cef()--*/ - virtual CefRefPtr GetKeyboardHandler() { - return NULL; - } - - /// - // Return the handler for browser life span events. - /// - /*--cef()--*/ - virtual CefRefPtr GetLifeSpanHandler() { - return NULL; - } - - /// - // Return the handler for browser load status events. - /// - /*--cef()--*/ - virtual CefRefPtr GetLoadHandler() { - return NULL; - } - - /// - // Return the handler for off-screen rendering events. - /// - /*--cef()--*/ - virtual CefRefPtr GetRenderHandler() { - return NULL; - } - - /// - // Return the handler for browser request events. - /// - /*--cef()--*/ - virtual CefRefPtr GetRequestHandler() { - return NULL; - } - - /// - // Called when a new message is received from a different process. Return true - // if the message was handled or false otherwise. Do not keep a reference to - // or attempt to access the message outside of this callback. - /// - /*--cef()--*/ - virtual bool OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_CLIENT_H_ diff --git a/cef/include/cef_command_line.h b/cef/include/cef_command_line.h deleted file mode 100644 index 358106642..000000000 --- a/cef/include/cef_command_line.h +++ /dev/null @@ -1,208 +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_COMMAND_LINE_H_ -#define CEF_INCLUDE_CEF_COMMAND_LINE_H_ -#pragma once - -#include "include/cef_base.h" -#include -#include - -/// -// 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 ArgumentList; - typedef std::map SwitchMap; - - /// - // Create a new CefCommandLine instance. - /// - /*--cef(revision_check)--*/ - static CefRefPtr CreateCommandLine(); - - /// - // Returns the singleton global CefCommandLine object. The returned object - // will be read-only. - /// - /*--cef(revision_check)--*/ - static CefRefPtr GetGlobalCommandLine(); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // 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; - - /// - // Reset the command-line switches and arguments but leave the program - // component unchanged. - /// - /*--cef()--*/ - virtual void Reset() =0; - - /// - // Retrieve the original command line string as a vector of strings. - // The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* } - /// - /*--cef()--*/ - virtual void GetArgv(std::vector& argv) =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; - - /// - // Insert a command before the current command. - // Common for debuggers, like "valgrind" or "gdb --args". - /// - /*--cef()--*/ - virtual void PrependWrapper(const CefString& wrapper) =0; -}; - -#endif // CEF_INCLUDE_CEF_COMMAND_LINE_H_ diff --git a/cef/include/cef_context_menu_handler.h b/cef/include/cef_context_menu_handler.h deleted file mode 100644 index e3e983ad5..000000000 --- a/cef/include/cef_context_menu_handler.h +++ /dev/null @@ -1,216 +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_CONTEXT_MENU_HANDLER_H_ -#define CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" -#include "include/cef_menu_model.h" - -class CefContextMenuParams; - -/// -// Implement this interface to handle context menu events. The methods of this -// class will be called on the UI thread. -/// -/*--cef(source=client)--*/ -class CefContextMenuHandler : public virtual CefBase { - public: - typedef cef_event_flags_t EventFlags; - - /// - // Called before a context menu is displayed. |params| provides information - // about the context menu state. |model| initially contains the default - // context menu. The |model| can be cleared to show no context menu or - // modified to show a custom menu. Do not keep references to |params| or - // |model| outside of this callback. - /// - /*--cef()--*/ - virtual void OnBeforeContextMenu(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - CefRefPtr model) {} - - /// - // Called to execute a command selected from the context menu. Return true if - // the command was handled or false for the default implementation. See - // cef_menu_id_t for the command ids that have default implementations. All - // user-defined command ids should be between MENU_ID_USER_FIRST and - // MENU_ID_USER_LAST. |params| will have the same values as what was passed to - // OnBeforeContextMenu(). Do not keep a reference to |params| outside of this - // callback. - /// - /*--cef()--*/ - virtual bool OnContextMenuCommand(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - int command_id, - EventFlags event_flags) { return false; } - - /// - // Called when the context menu is dismissed irregardless of whether the menu - // was empty or a command was selected. - /// - /*--cef()--*/ - virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame) {} -}; - - -/// -// Provides information about the context menu state. The ethods of this class -// can only be accessed on browser process the UI thread. -/// -/*--cef(source=library)--*/ -class CefContextMenuParams : public virtual CefBase { - public: - typedef cef_context_menu_type_flags_t TypeFlags; - typedef cef_context_menu_media_type_t MediaType; - typedef cef_context_menu_media_state_flags_t MediaStateFlags; - typedef cef_context_menu_edit_state_flags_t EditStateFlags; - - /// - // Returns the X coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - /*--cef()--*/ - virtual int GetXCoord() =0; - - /// - // Returns the Y coordinate of the mouse where the context menu was invoked. - // Coords are relative to the associated RenderView's origin. - /// - /*--cef()--*/ - virtual int GetYCoord() =0; - - /// - // Returns flags representing the type of node that the context menu was - // invoked on. - /// - /*--cef(default_retval=CM_TYPEFLAG_NONE)--*/ - virtual TypeFlags GetTypeFlags() =0; - - /// - // Returns the URL of the link, if any, that encloses the node that the - // context menu was invoked on. - /// - /*--cef()--*/ - virtual CefString GetLinkUrl() =0; - - /// - // Returns the link URL, if any, to be used ONLY for "copy link address". We - // don't validate this field in the frontend process. - /// - /*--cef()--*/ - virtual CefString GetUnfilteredLinkUrl() =0; - - /// - // Returns the source URL, if any, for the element that the context menu was - // invoked on. Example of elements with source URLs are img, audio, and video. - /// - /*--cef()--*/ - virtual CefString GetSourceUrl() =0; - - /// - // Returns true if the context menu was invoked on a blocked image. - /// - /*--cef()--*/ - virtual bool IsImageBlocked() =0; - - /// - // Returns the URL of the top level page that the context menu was invoked on. - /// - /*--cef()--*/ - virtual CefString GetPageUrl() =0; - - /// - // Returns the URL of the subframe that the context menu was invoked on. - /// - /*--cef()--*/ - virtual CefString GetFrameUrl() =0; - - /// - // Returns the character encoding of the subframe that the context menu was - // invoked on. - /// - /*--cef()--*/ - virtual CefString GetFrameCharset() =0; - - /// - // Returns the type of context node that the context menu was invoked on. - /// - /*--cef(default_retval=CM_MEDIATYPE_NONE)--*/ - virtual MediaType GetMediaType() =0; - - /// - // Returns flags representing the actions supported by the media element, if - // any, that the context menu was invoked on. - /// - /*--cef(default_retval=CM_MEDIAFLAG_NONE)--*/ - virtual MediaStateFlags GetMediaStateFlags() =0; - - /// - // Returns the text of the selection, if any, that the context menu was - // invoked on. - /// - /*--cef()--*/ - virtual CefString GetSelectionText() =0; - - /// - // Returns true if the context menu was invoked on an editable node. - /// - /*--cef()--*/ - virtual bool IsEditable() =0; - - /// - // Returns true if the context menu was invoked on an editable node where - // speech-input is enabled. - /// - /*--cef()--*/ - virtual bool IsSpeechInputEnabled() =0; - - /// - // Returns flags representing the actions supported by the editable node, if - // any, that the context menu was invoked on. - /// - /*--cef(default_retval=CM_EDITFLAG_NONE)--*/ - virtual EditStateFlags GetEditStateFlags() =0; -}; - -#endif // CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_ diff --git a/cef/include/cef_cookie.h b/cef/include/cef_cookie.h deleted file mode 100644 index d24325c39..000000000 --- a/cef/include/cef_cookie.h +++ /dev/null @@ -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 - -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 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 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& 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 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 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_ diff --git a/cef/include/cef_dialog_handler.h b/cef/include/cef_dialog_handler.h deleted file mode 100644 index 83e1048a4..000000000 --- a/cef/include/cef_dialog_handler.h +++ /dev/null @@ -1,98 +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_DIALOG_HANDLER_H_ -#define CEF_INCLUDE_CEF_DIALOG_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Callback interface for asynchronous continuation of file dialog requests. -/// -/*--cef(source=library)--*/ -class CefFileDialogCallback : public virtual CefBase { - public: - /// - // Continue the file selection with the specified |file_paths|. This may be - // a single value or a list of values depending on the dialog mode. An empty - // value is treated the same as calling Cancel(). - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(const std::vector& file_paths) =0; - - /// - // Cancel the file selection. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// Implement this interface to handle dialog events. The methods of this class -// will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefDialogHandler : public virtual CefBase { - public: - typedef cef_file_dialog_mode_t FileDialogMode; - - /// - // Called to run a file chooser dialog. |mode| represents the type of dialog - // to display. |title| to the title to be used for the dialog and may be empty - // to show the default title ("Open" or "Save" depending on the mode). - // |default_file_name| is the default file name to select in the dialog. - // |accept_types| is a list of valid lower-cased MIME types or file extensions - // specified in an input element and is used to restrict selectable files to - // such types. To display a custom dialog return true and execute |callback| - // either inline or at a later time. To display the default dialog return - // false. - /// - /*--cef(optional_param=title,optional_param=default_file_name, - optional_param=accept_types)--*/ - virtual bool OnFileDialog(CefRefPtr browser, - FileDialogMode mode, - const CefString& title, - const CefString& default_file_name, - const std::vector& accept_types, - CefRefPtr callback) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_DIALOG_HANDLER_H_ diff --git a/cef/include/cef_display_handler.h b/cef/include/cef_display_handler.h deleted file mode 100644 index 7c19081c2..000000000 --- a/cef/include/cef_display_handler.h +++ /dev/null @@ -1,108 +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_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: - /// - // Called when the loading state has changed. - /// - /*--cef()--*/ - virtual void OnLoadingStateChange(CefRefPtr browser, - bool isLoading, - bool canGoBack, - bool canGoForward) {} - - /// - // Called when a frame's address has changed. - /// - /*--cef()--*/ - virtual void OnAddressChange(CefRefPtr browser, - CefRefPtr frame, - const CefString& url) {} - - /// - // Called when the page title changes. - /// - /*--cef(optional_param=title)--*/ - virtual void OnTitleChange(CefRefPtr browser, - const CefString& title) {} - - /// - // 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. - // When window rendering is disabled the application is responsible for - // drawing tooltips and the return value is ignored. - /// - /*--cef(optional_param=text)--*/ - virtual bool OnTooltip(CefRefPtr 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 browser, - const CefString& value) {} - - /// - // 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 browser, - const CefString& message, - const CefString& source, - int line) { return false; } -}; - -#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_ diff --git a/cef/include/cef_dom.h b/cef/include/cef_dom.h deleted file mode 100644 index f155e2f31..000000000 --- a/cef/include/cef_dom.h +++ /dev/null @@ -1,435 +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_DOM_H_ -#define CEF_INCLUDE_CEF_DOM_H_ -#pragma once - -#include "include/cef_base.h" -#include - -class CefDOMDocument; -class CefDOMEventListener; -class CefDOMNode; - -/// -// Interface to implement for visiting the DOM. The methods of this class will -// be called on the render process main 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 document) =0; -}; - - -/// -// Class used to represent a DOM document. The methods of this class should only -// be called on the render process main thread 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 GetDocument() =0; - - /// - // Returns the BODY node of an HTML document. - /// - /*--cef()--*/ - virtual CefRefPtr GetBody() =0; - - /// - // Returns the HEAD node of an HTML document. - /// - /*--cef()--*/ - virtual CefRefPtr 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 GetElementById(const CefString& id) =0; - - /// - // Returns the node that currently has keyboard focus. - /// - /*--cef()--*/ - virtual CefRefPtr 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 GetSelectionStartNode() =0; - - /// - // Returns the selection offset within the start node. - /// - /*--cef()--*/ - virtual int GetSelectionStartOffset() =0; - - /// - // Returns the selection end node. - /// - /*--cef()--*/ - virtual CefRefPtr 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 render process main thread. -/// -/*--cef(source=library)--*/ -class CefDOMNode : public virtual CefBase { - public: - typedef std::map 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 an editable node. - /// - /*--cef()--*/ - virtual bool IsEditable() =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 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 GetDocument() =0; - - /// - // Returns the parent node. - /// - /*--cef()--*/ - virtual CefRefPtr GetParent() =0; - - /// - // Returns the previous sibling node. - /// - /*--cef()--*/ - virtual CefRefPtr GetPreviousSibling() =0; - - /// - // Returns the next sibling node. - /// - /*--cef()--*/ - virtual CefRefPtr GetNextSibling() =0; - - /// - // Returns true if this node has child nodes. - /// - /*--cef()--*/ - virtual bool HasChildren() =0; - - /// - // Return the first child node. - /// - /*--cef()--*/ - virtual CefRefPtr GetFirstChild() =0; - - /// - // Returns the last child node. - /// - /*--cef()--*/ - virtual CefRefPtr 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 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 render process main 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 GetDocument() =0; - - /// - // Returns the target of the event. - /// - /*--cef()--*/ - virtual CefRefPtr GetTarget() =0; - - /// - // Returns the current target of the event. - /// - /*--cef()--*/ - virtual CefRefPtr GetCurrentTarget() =0; -}; - - -/// -// Interface to implement for handling DOM events. The methods of this class -// will be called on the render process main 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 event) =0; -}; - -#endif // CEF_INCLUDE_CEF_DOM_H_ diff --git a/cef/include/cef_download_handler.h b/cef/include/cef_download_handler.h deleted file mode 100644 index 495fa8798..000000000 --- a/cef/include/cef_download_handler.h +++ /dev/null @@ -1,111 +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_DOWNLOAD_HANDLER_H_ -#define CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_download_item.h" - - -/// -// Callback interface used to asynchronously continue a download. -/// -/*--cef(source=library)--*/ -class CefBeforeDownloadCallback : public virtual CefBase { - public: - /// - // Call to continue the download. Set |download_path| to the full file path - // for the download including the file name or leave blank to use the - // suggested name and the default temp directory. Set |show_dialog| to true - // if you do wish to show the default "Save As" dialog. - /// - /*--cef(capi_name=cont,optional_param=download_path)--*/ - virtual void Continue(const CefString& download_path, bool show_dialog) =0; -}; - - -/// -// Callback interface used to asynchronously cancel a download. -/// -/*--cef(source=library)--*/ -class CefDownloadItemCallback : public virtual CefBase { - public: - /// - // Call to cancel the download. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// Class used to handle file downloads. The methods of this class will called -// on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefDownloadHandler : public virtual CefBase { - public: - /// - // Called before a download begins. |suggested_name| is the suggested name for - // the download file. By default the download will be canceled. Execute - // |callback| either asynchronously or in this method to continue the download - // if desired. Do not keep a reference to |download_item| outside of this - // method. - /// - /*--cef()--*/ - virtual void OnBeforeDownload( - CefRefPtr browser, - CefRefPtr download_item, - const CefString& suggested_name, - CefRefPtr callback) =0; - - /// - // Called when a download's status or progress information has been updated. - // Execute |callback| either asynchronously or in this method to cancel the - // download if desired. Do not keep a reference to |download_item| outside of - // this method. - /// - /*--cef()--*/ - virtual void OnDownloadUpdated( - CefRefPtr browser, - CefRefPtr download_item, - CefRefPtr callback) {} -}; - -#endif // CEF_INCLUDE_CEF_DOWNLOAD_HANDLER_H_ diff --git a/cef/include/cef_download_item.h b/cef/include/cef_download_item.h deleted file mode 100644 index 55f7fce06..000000000 --- a/cef/include/cef_download_item.h +++ /dev/null @@ -1,148 +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_DOWNLOAD_ITEM_H_ -#define CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Class used to represent a download item. -/// -/*--cef(source=library)--*/ -class CefDownloadItem : public virtual CefBase { - public: - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the download is in progress. - /// - /*--cef()--*/ - virtual bool IsInProgress() =0; - - /// - // Returns true if the download is complete. - /// - /*--cef()--*/ - virtual bool IsComplete() =0; - - /// - // Returns true if the download has been canceled or interrupted. - /// - /*--cef()--*/ - virtual bool IsCanceled() =0; - - /// - // Returns a simple speed estimate in bytes/s. - /// - /*--cef()--*/ - virtual int64 GetCurrentSpeed() =0; - - /// - // Returns the rough percent complete or -1 if the receive total size is - // unknown. - /// - /*--cef()--*/ - virtual int GetPercentComplete() =0; - - /// - // Returns the total number of bytes. - /// - /*--cef()--*/ - virtual int64 GetTotalBytes() =0; - - /// - // Returns the number of received bytes. - /// - /*--cef()--*/ - virtual int64 GetReceivedBytes() =0; - - /// - // Returns the time that the download started. - /// - /*--cef()--*/ - virtual CefTime GetStartTime() =0; - - /// - // Returns the time that the download ended. - /// - /*--cef()--*/ - virtual CefTime GetEndTime() =0; - - /// - // Returns the full path to the downloaded or downloading file. - /// - /*--cef()--*/ - virtual CefString GetFullPath() =0; - - /// - // Returns the unique identifier for this download. - /// - /*--cef()--*/ - virtual int32 GetId() =0; - - /// - // Returns the URL. - /// - /*--cef()--*/ - virtual CefString GetURL() =0; - - /// - // Returns the suggested file name. - /// - /*--cef()--*/ - virtual CefString GetSuggestedFileName() =0; - - /// - // Returns the content disposition. - /// - /*--cef()--*/ - virtual CefString GetContentDisposition() =0; - - /// - // Returns the mime type. - /// - /*--cef()--*/ - virtual CefString GetMimeType() =0; -}; - -#endif // CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_ diff --git a/cef/include/cef_focus_handler.h b/cef/include/cef_focus_handler.h deleted file mode 100644 index 1d91c42ab..000000000 --- a/cef/include/cef_focus_handler.h +++ /dev/null @@ -1,81 +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_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_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 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 browser, - FocusSource source) { return false; } - - /// - // Called when the browser component has received focus. - /// - /*--cef()--*/ - virtual void OnGotFocus(CefRefPtr browser) {} -}; - -#endif // CEF_INCLUDE_CEF_FOCUS_HANDLER_H_ diff --git a/cef/include/cef_frame.h b/cef/include/cef_frame.h deleted file mode 100644 index 872e01a61..000000000 --- a/cef/include/cef_frame.h +++ /dev/null @@ -1,222 +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_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" -#include "include/cef_string_visitor.h" - -class CefBrowser; -class CefV8Context; - -/// -// Class used to represent a frame in the browser window. When used in the -// browser process the methods of this class may be called on any thread unless -// otherwise indicated in the comments. When used in the render process the -// methods of this class may only be called on the main thread. -/// -/*--cef(source=library)--*/ -class CefFrame : public virtual CefBase { - public: - /// - // True if this object is currently attached to a valid frame. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // 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; - - /// - // Save this frame's HTML source to a temporary file and open it in the - // default text viewing application. This method can only be called from the - // browser process. - /// - /*--cef()--*/ - virtual void ViewSource() =0; - - /// - // Retrieve this frame's HTML source as a string sent to the specified - // visitor. - /// - /*--cef()--*/ - virtual void GetSource(CefRefPtr visitor) =0; - - /// - // Retrieve this frame's display text as a string sent to the specified - // visitor. - /// - /*--cef()--*/ - virtual void GetText(CefRefPtr visitor) =0; - - /// - // Load the request represented by the |request| object. - /// - /*--cef()--*/ - virtual void LoadRequest(CefRefPtr 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; - - /// - // 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=script_url)--*/ - virtual void ExecuteJavaScript(const CefString& code, - const CefString& script_url, - int start_line) =0; - - /// - // Returns true if this is the main (top-level) frame. - /// - /*--cef()--*/ - virtual bool IsMain() =0; - - /// - // Returns true if this is the focused frame. - /// - /*--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. - /// - /*--cef()--*/ - virtual CefRefPtr 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 GetBrowser() =0; - - /// - // Get the V8 context associated with the frame. This method can only be - // called from the render process. - /// - /*--cef()--*/ - virtual CefRefPtr GetV8Context() =0; - - /// - // Visit the DOM document. This method can only be called from the render - // process. - /// - /*--cef()--*/ - virtual void VisitDOM(CefRefPtr visitor) =0; -}; - -#endif // CEF_INCLUDE_CEF_FRAME_H_ diff --git a/cef/include/cef_geolocation.h b/cef/include/cef_geolocation.h deleted file mode 100644 index 69c08779c..000000000 --- a/cef/include/cef_geolocation.h +++ /dev/null @@ -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 callback); - -#endif // CEF_INCLUDE_CEF_GEOLOCATION_H_ diff --git a/cef/include/cef_geolocation_handler.h b/cef/include/cef_geolocation_handler.h deleted file mode 100644 index ea92cdd20..000000000 --- a/cef/include/cef_geolocation_handler.h +++ /dev/null @@ -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 IO -// 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 browser, - const CefString& requesting_url, - int request_id, - CefRefPtr 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 browser, - const CefString& requesting_url, - int request_id) { - } -}; - -#endif // CEF_INCLUDE_CEF_GEOLOCATION_HANDLER_H_ diff --git a/cef/include/cef_jsdialog_handler.h b/cef/include/cef_jsdialog_handler.h deleted file mode 100644 index f2a4cf849..000000000 --- a/cef/include/cef_jsdialog_handler.h +++ /dev/null @@ -1,122 +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_JSDIALOG_HANDLER_H_ -#define CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" - -/// -// Callback interface used for asynchronous continuation of JavaScript dialog -// requests. -/// -/*--cef(source=library)--*/ -class CefJSDialogCallback : public virtual CefBase { - public: - /// - // Continue the JS dialog request. Set |success| to true if the OK button was - // pressed. The |user_input| value should be specified for prompt dialogs. - /// - /*--cef(capi_name=cont,optional_param=user_input)--*/ - virtual void Continue(bool success, - const CefString& user_input) =0; -}; - - -/// -// 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: - typedef cef_jsdialog_type_t JSDialogType; - - /// - // Called to run a JavaScript dialog. The |default_prompt_text| value will be - // specified for prompt dialogs only. Set |suppress_message| to true and - // return false to suppress the message (suppressing messages is preferable - // to immediately executing the callback as this is used to detect presumably - // malicious behavior like spamming alert messages in onbeforeunload). Set - // |suppress_message| to false and return false to use the default - // implementation (the default implementation will show one modal dialog at a - // time and suppress any additional dialog requests until the displayed dialog - // is dismissed). Return true if the application will use a custom dialog or - // if the callback has been executed immediately. Custom dialogs may be either - // modal or modeless. If a custom dialog is used the application must execute - // |callback| once the custom dialog is dismissed. - /// - /*--cef(optional_param=accept_lang,optional_param=message_text, - optional_param=default_prompt_text)--*/ - virtual bool OnJSDialog(CefRefPtr browser, - const CefString& origin_url, - const CefString& accept_lang, - JSDialogType dialog_type, - const CefString& message_text, - const CefString& default_prompt_text, - CefRefPtr callback, - bool& suppress_message) { - return false; - } - - /// - // Called to run a dialog asking the user if they want to leave a page. Return - // false to use the default dialog implementation. Return true if the - // application will use a custom dialog or if the callback has been executed - // immediately. Custom dialogs may be either modal or modeless. If a custom - // dialog is used the application must execute |callback| once the custom - // dialog is dismissed. - /// - /*--cef(optional_param=message_text)--*/ - virtual bool OnBeforeUnloadDialog(CefRefPtr browser, - const CefString& message_text, - bool is_reload, - CefRefPtr callback) { - return false; - } - - /// - // Called to cancel any pending dialogs and reset any saved dialog state. Will - // be called due to events like page navigation irregardless of whether any - // dialogs are currently pending. - /// - /*--cef()--*/ - virtual void OnResetDialogState(CefRefPtr browser) {} -}; - -#endif // CEF_INCLUDE_CEF_JSDIALOG_HANDLER_H_ diff --git a/cef/include/cef_keyboard_handler.h b/cef/include/cef_keyboard_handler.h deleted file mode 100644 index 55cb57ef8..000000000 --- a/cef/include/cef_keyboard_handler.h +++ /dev/null @@ -1,74 +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_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: - // Called before a keyboard event is sent to the renderer. |event| contains - // information about the keyboard event. |os_event| is the operating system - // event message, if any. Return true if the event was handled or false - // otherwise. If the event will be handled in OnKeyEvent() as a keyboard - // shortcut set |is_keyboard_shortcut| to true and return false. - /*--cef()--*/ - virtual bool OnPreKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, - CefEventHandle os_event, - bool* is_keyboard_shortcut) { return false; } - - /// - // Called after the renderer and JavaScript in the page has had a chance to - // handle the event. |event| contains information about the keyboard event. - // |os_event| is the operating system event message, if any. Return true if - // the keyboard event was handled or false otherwise. - /// - /*--cef()--*/ - virtual bool OnKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, - CefEventHandle os_event) { return false; } -}; - -#endif // CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_ diff --git a/cef/include/cef_life_span_handler.h b/cef/include/cef_life_span_handler.h deleted file mode 100644 index af1ac83d0..000000000 --- a/cef/include/cef_life_span_handler.h +++ /dev/null @@ -1,105 +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_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 parentBrowser, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - const CefString& url, - CefRefPtr& client, - CefBrowserSettings& settings) { return false; } - - /// - // Called after a new window is created. - /// - /*--cef()--*/ - virtual void OnAfterCreated(CefRefPtr 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 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 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 browser) {} -}; - -#endif // CEF_INCLUDE_CEF_LIFE_SPAN_HANDLER_H_ diff --git a/cef/include/cef_load_handler.h b/cef/include/cef_load_handler.h deleted file mode 100644 index cc5cbf376..000000000 --- a/cef/include/cef_load_handler.h +++ /dev/null @@ -1,110 +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_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_errorcode_t ErrorCode; - typedef cef_termination_status_t TerminationStatus; - - /// - // 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 browser, - CefRefPtr 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 browser, - CefRefPtr frame, - int httpStatusCode) {} - - /// - // Called when the browser fails to load a resource. |errorCode| is the error - // code number, |errorText| is the error text and and |failedUrl| is the URL - // that failed to load. See net\base\net_error_list.h for complete - // descriptions of the error codes. - /// - /*--cef(optional_param=errorText)--*/ - virtual void OnLoadError(CefRefPtr browser, - CefRefPtr frame, - ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl) {} - - /// - // Called when the render process terminates unexpectedly. |status| indicates - // how the process terminated. - /// - /*--cef()--*/ - virtual void OnRenderProcessTerminated(CefRefPtr browser, - TerminationStatus status) {} - - /// - // Called when a plugin has crashed. |plugin_path| is the path of the plugin - // that crashed. - /// - /*--cef()--*/ - virtual void OnPluginCrashed(CefRefPtr browser, - const CefString& plugin_path) {} -}; - -#endif // CEF_INCLUDE_CEF_LOAD_HANDLER_H_ diff --git a/cef/include/cef_menu_model.h b/cef/include/cef_menu_model.h deleted file mode 100644 index 84728c58b..000000000 --- a/cef/include/cef_menu_model.h +++ /dev/null @@ -1,402 +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_MENU_MODEL_H_ -#define CEF_INCLUDE_CEF_MENU_MODEL_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Supports creation and modification of menus. See cef_menu_id_t for the -// command ids that have default implementations. All user-defined command ids -// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The methods of -// this class can only be accessed on the browser process the UI thread. -/// -/*--cef(source=library)--*/ -class CefMenuModel : public virtual CefBase { - public: - typedef cef_menu_item_type_t MenuItemType; - - /// - // Clears the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool Clear() =0; - - /// - // Returns the number of items in this menu. - /// - /*--cef()--*/ - virtual int GetCount() =0; - - // - // Add a separator to the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddSeparator() =0; - - // - // Add an item to the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddItem(int command_id, - const CefString& label) =0; - - // - // Add a check item to the menu. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddCheckItem(int command_id, - const CefString& label) =0; - // - // Add a radio item to the menu. Only a single item with the specified - // |group_id| can be checked at a time. Returns true on success. - /// - /*--cef()--*/ - virtual bool AddRadioItem(int command_id, - const CefString& label, - int group_id) =0; - - // - // Add a sub-menu to the menu. The new sub-menu is returned. - /// - /*--cef()--*/ - virtual CefRefPtr AddSubMenu(int command_id, - const CefString& label) =0; - - // - // Insert a separator in the menu at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool InsertSeparatorAt(int index) =0; - - // - // Insert an item in the menu at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool InsertItemAt(int index, - int command_id, - const CefString& label) =0; - - // - // Insert a check item in the menu at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool InsertCheckItemAt(int index, - int command_id, - const CefString& label) =0; - - // - // Insert a radio item in the menu at the specified |index|. Only a single - // item with the specified |group_id| can be checked at a time. Returns true - // on success. - /// - /*--cef()--*/ - virtual bool InsertRadioItemAt(int index, - int command_id, - const CefString& label, - int group_id) =0; - - // - // Insert a sub-menu in the menu at the specified |index|. The new sub-menu - // is returned. - /// - /*--cef()--*/ - virtual CefRefPtr InsertSubMenuAt(int index, - int command_id, - const CefString& label) =0; - - /// - // Removes the item with the specified |command_id|. Returns true on success. - /// - /*--cef()--*/ - virtual bool Remove(int command_id) =0; - - /// - // Removes the item at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool RemoveAt(int index) =0; - - /// - // Returns the index associated with the specified |command_id| or -1 if not - // found due to the command id not existing in the menu. - /// - /*--cef()--*/ - virtual int GetIndexOf(int command_id) =0; - - /// - // Returns the command id at the specified |index| or -1 if not found due to - // invalid range or the index being a separator. - /// - /*--cef()--*/ - virtual int GetCommandIdAt(int index) =0; - - /// - // Sets the command id at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetCommandIdAt(int index, int command_id) =0; - - /// - // Returns the label for the specified |command_id| or empty if not found. - /// - /*--cef()--*/ - virtual CefString GetLabel(int command_id) =0; - - /// - // Returns the label at the specified |index| or empty if not found due to - // invalid range or the index being a separator. - /// - /*--cef()--*/ - virtual CefString GetLabelAt(int index) =0; - - /// - // Sets the label for the specified |command_id|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetLabel(int command_id, const CefString& label) =0; - - /// - // Set the label at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetLabelAt(int index, const CefString& label) =0; - - /// - // Returns the item type for the specified |command_id|. - /// - /*--cef(default_retval=MENUITEMTYPE_NONE)--*/ - virtual MenuItemType GetType(int command_id) =0; - - /// - // Returns the item type at the specified |index|. - /// - /*--cef(default_retval=MENUITEMTYPE_NONE)--*/ - virtual MenuItemType GetTypeAt(int index) =0; - - /// - // Returns the group id for the specified |command_id| or -1 if invalid. - /// - /*--cef()--*/ - virtual int GetGroupId(int command_id) =0; - - /// - // Returns the group id at the specified |index| or -1 if invalid. - /// - /*--cef()--*/ - virtual int GetGroupIdAt(int index) =0; - - /// - // Sets the group id for the specified |command_id|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetGroupId(int command_id, int group_id) =0; - - /// - // Sets the group id at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetGroupIdAt(int index, int group_id) =0; - - /// - // Returns the submenu for the specified |command_id| or empty if invalid. - /// - /*--cef()--*/ - virtual CefRefPtr GetSubMenu(int command_id) =0; - - /// - // Returns the submenu at the specified |index| or empty if invalid. - /// - /*--cef()--*/ - virtual CefRefPtr GetSubMenuAt(int index) =0; - - // - // Returns true if the specified |command_id| is visible. - /// - /*--cef()--*/ - virtual bool IsVisible(int command_id) =0; - - // - // Returns true if the specified |index| is visible. - /// - /*--cef()--*/ - virtual bool IsVisibleAt(int index) =0; - - // - // Change the visibility of the specified |command_id|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetVisible(int command_id, bool visible) =0; - - // - // Change the visibility at the specified |index|. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetVisibleAt(int index, bool visible) =0; - - // - // Returns true if the specified |command_id| is enabled. - /// - /*--cef()--*/ - virtual bool IsEnabled(int command_id) =0; - - // - // Returns true if the specified |index| is enabled. - /// - /*--cef()--*/ - virtual bool IsEnabledAt(int index) =0; - - // - // Change the enabled status of the specified |command_id|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetEnabled(int command_id, bool enabled) =0; - - // - // Change the enabled status at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool SetEnabledAt(int index, bool enabled) =0; - - // - // Returns true if the specified |command_id| is checked. Only applies to - // check and radio items. - /// - /*--cef()--*/ - virtual bool IsChecked(int command_id) =0; - - // - // Returns true if the specified |index| is checked. Only applies to check - // and radio items. - /// - /*--cef()--*/ - virtual bool IsCheckedAt(int index) =0; - - // - // Check the specified |command_id|. Only applies to check and radio items. - // Returns true on success. - /// - /*--cef()--*/ - virtual bool SetChecked(int command_id, bool checked) =0; - - // - // Check the specified |index|. Only applies to check and radio items. Returns - // true on success. - /// - /*--cef()--*/ - virtual bool SetCheckedAt(int index, bool checked) =0; - - // - // Returns true if the specified |command_id| has a keyboard accelerator - // assigned. - /// - /*--cef()--*/ - virtual bool HasAccelerator(int command_id) =0; - - // - // Returns true if the specified |index| has a keyboard accelerator assigned. - /// - /*--cef()--*/ - virtual bool HasAcceleratorAt(int index) =0; - - // - // Set the keyboard accelerator for the specified |command_id|. |key_code| can - // be any virtual key or character value. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetAccelerator(int command_id, - int key_code, - bool shift_pressed, - bool ctrl_pressed, - bool alt_pressed) =0; - - // - // Set the keyboard accelerator at the specified |index|. |key_code| can be - // any virtual key or character value. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetAcceleratorAt(int index, - int key_code, - bool shift_pressed, - bool ctrl_pressed, - bool alt_pressed) =0; - - // - // Remove the keyboard accelerator for the specified |command_id|. Returns - // true on success. - /// - /*--cef()--*/ - virtual bool RemoveAccelerator(int command_id) =0; - - // - // Remove the keyboard accelerator at the specified |index|. Returns true on - // success. - /// - /*--cef()--*/ - virtual bool RemoveAcceleratorAt(int index) =0; - - // - // Retrieves the keyboard accelerator for the specified |command_id|. Returns - // true on success. - /// - /*--cef()--*/ - virtual bool GetAccelerator(int command_id, - int& key_code, - bool& shift_pressed, - bool& ctrl_pressed, - bool& alt_pressed) =0; - - // - // Retrieves the keyboard accelerator for the specified |index|. Returns true - // on success. - /// - /*--cef()--*/ - virtual bool GetAcceleratorAt(int index, - int& key_code, - bool& shift_pressed, - bool& ctrl_pressed, - bool& alt_pressed) =0; -}; - -#endif // CEF_INCLUDE_CEF_MENU_MODEL_H_ diff --git a/cef/include/cef_origin_whitelist.h b/cef/include/cef_origin_whitelist.h deleted file mode 100644 index 163a93b91..000000000 --- a/cef/include/cef_origin_whitelist.h +++ /dev/null @@ -1,102 +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_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_ diff --git a/cef/include/cef_pack_resources.h b/cef/include/cef_pack_resources.h deleted file mode 100644 index abe055205..000000000 --- a/cef/include/cef_pack_resources.h +++ /dev/null @@ -1,834 +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 is generated by the make_pack_header.py tool. -// - -#ifndef CEF_INCLUDE_CEF_PACK_RESOURCES_H_ -#define CEF_INCLUDE_CEF_PACK_RESOURCES_H_ -#pragma once - -// --------------------------------------------------------------------------- -// From cef_resources.h: - -#define IDR_CEF_DEVTOOLS_DISCOVERY_PAGE 27500 -#define IDR_CEF_CREDITS_HTML 27501 -#define IDR_CEF_CREDITS_JS 27502 -#define IDR_CEF_CREDITS_SWIFTSHADER_JPG 27503 -#define IDR_CEF_LICENSE_TXT 27504 -#define IDR_CEF_VERSION_HTML 27505 -#define IDR_CEF_TRACING_HTML 27506 -#define IDR_CEF_TRACING_JS 27507 - -// --------------------------------------------------------------------------- -// From content_resources.h: - -#define IDR_DOM_AUTOMATION_JS 25000 -#define IDR_GPU_BLACKLIST 25001 -#define IDR_GPU_SANDBOX_PROFILE 25002 -#define IDR_WORKER_SANDBOX_PROFILE 25003 -#define IDR_COMMON_SANDBOX_PROFILE 25004 -#define IDR_PPAPI_SANDBOX_PROFILE 25005 -#define IDR_RENDERER_SANDBOX_PROFILE 25006 -#define IDR_UTILITY_SANDBOX_PROFILE 25007 - -// --------------------------------------------------------------------------- -// From devtools_resources.h: - -#define DEVTOOLS_HTML 22000 -#define DEVTOOLS_JS 22001 -#define ELEMENTSPANEL_JS 22002 -#define RESOURCESPANEL_JS 22003 -#define NETWORKPANEL_JS 22004 -#define SCRIPTSPANEL_JS 22005 -#define TIMELINEPANEL_JS 22006 -#define PROFILESPANEL_JS 22007 -#define AUDITSPANEL_JS 22008 -#define CODEMIRRORTEXTEDITOR_JS 22009 -#define HEAPSNAPSHOTWORKER_JS 22010 -#define SCRIPTFORMATTERWORKER_JS 22011 -#define DEVTOOLS_CSS 22012 -#define DEVTOOLS_EXTENSION_API_JS 22013 -#define AUDITSPANEL_CSS 22014 -#define BREADCRUMBLIST_CSS 22015 -#define CMDEVTOOLS_CSS 22016 -#define CODEMIRROR_CSS 22017 -#define CSSNAMEDFLOWS_CSS 22018 -#define DATAGRID_CSS 22019 -#define ELEMENTSPANEL_CSS 22020 -#define FILTEREDITEMSELECTIONDIALOG_CSS 22021 -#define HEAPPROFILER_CSS 22022 -#define HELPSCREEN_CSS 22023 -#define INDEXEDDBVIEWS_CSS 22024 -#define INSPECTORCOMMON_CSS 22025 -#define NATIVEMEMORYPROFILER_CSS 22026 -#define NAVIGATORVIEW_CSS 22027 -#define NETWORKLOGVIEW_CSS 22028 -#define NETWORKPANEL_CSS 22029 -#define PANELENABLERVIEW_CSS 22030 -#define PROFILESPANEL_CSS 22031 -#define RESOURCEVIEW_CSS 22032 -#define RESOURCESPANEL_CSS 22033 -#define REVISIONHISTORY_CSS 22034 -#define SCRIPTSPANEL_CSS 22035 -#define SPECTRUM_CSS 22036 -#define SPLITVIEW_CSS 22037 -#define TABBEDPANE_CSS 22038 -#define TEXTEDITOR_CSS 22039 -#define TEXTPROMPT_CSS 22040 -#define TIMELINEPANEL_CSS 22041 -#define CANVASPROFILER_CSS 22042 -#define IMAGES_APPLICATIONCACHE_PNG 22043 -#define IMAGES_BACK_PNG 22044 -#define IMAGES_BREAKPOINTBORDER_PNG 22045 -#define IMAGES_BREAKPOINTCONDITIONALBORDER_PNG 22046 -#define IMAGES_BREAKPOINTCONDITIONALCOUNTERBORDER_PNG 22047 -#define IMAGES_BREAKPOINTCOUNTERBORDER_PNG 22048 -#define IMAGES_CHECKER_PNG 22049 -#define IMAGES_CLOSEBUTTONS_PNG 22050 -#define IMAGES_COOKIE_PNG 22051 -#define IMAGES_DATABASE_PNG 22052 -#define IMAGES_DATABASETABLE_PNG 22053 -#define IMAGES_DEBUGGERCONTINUE_PNG 22054 -#define IMAGES_DEBUGGERPAUSE_PNG 22055 -#define IMAGES_DEBUGGERSTEPINTO_PNG 22056 -#define IMAGES_DEBUGGERSTEPOUT_PNG 22057 -#define IMAGES_DEBUGGERSTEPOVER_PNG 22058 -#define IMAGES_DELETEICON_PNG 22059 -#define IMAGES_DISCLOSURETRIANGLESMALLDOWN_PNG 22060 -#define IMAGES_DISCLOSURETRIANGLESMALLDOWNBLACK_PNG 22061 -#define IMAGES_DISCLOSURETRIANGLESMALLDOWNWHITE_PNG 22062 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHT_PNG 22063 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTBLACK_PNG 22064 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWN_PNG 22065 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWNBLACK_PNG 22066 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWNWHITE_PNG 22067 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTWHITE_PNG 22068 -#define IMAGES_DOMAIN_PNG 22069 -#define IMAGES_ERRORICON_PNG 22070 -#define IMAGES_ERRORMEDIUMICON_PNG 22071 -#define IMAGES_ERRORREDDOT_PNG 22072 -#define IMAGES_FILESYSTEM_PNG 22073 -#define IMAGES_FORWARD_PNG 22074 -#define IMAGES_FRAME_PNG 22075 -#define IMAGES_GLOSSYHEADER_PNG 22076 -#define IMAGES_GLOSSYHEADERPRESSED_PNG 22077 -#define IMAGES_GLOSSYHEADERSELECTED_PNG 22078 -#define IMAGES_GLOSSYHEADERSELECTEDPRESSED_PNG 22079 -#define IMAGES_GOARROW_PNG 22080 -#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 22081 -#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 22082 -#define IMAGES_INDEXEDDB_PNG 22083 -#define IMAGES_INDEXEDDBINDEX_PNG 22084 -#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 22085 -#define IMAGES_LOCALSTORAGE_PNG 22086 -#define IMAGES_NAMEDFLOWOVERFLOW_PNG 22087 -#define IMAGES_NAVIGATORSHOWHIDEBUTTON_PNG 22088 -#define IMAGES_PANEADDBUTTONS_PNG 22089 -#define IMAGES_PANEBOTTOMGROW_PNG 22090 -#define IMAGES_PANEBOTTOMGROWACTIVE_PNG 22091 -#define IMAGES_PANEELEMENTSTATEBUTTONS_PNG 22092 -#define IMAGES_PANEFILTERBUTTONS_PNG 22093 -#define IMAGES_PANEGROWHANDLELINE_PNG 22094 -#define IMAGES_PANEREFRESHBUTTONS_PNG 22095 -#define IMAGES_PANESETTINGSBUTTONS_PNG 22096 -#define IMAGES_POPOVERARROWS_PNG 22097 -#define IMAGES_POPOVERBACKGROUND_PNG 22098 -#define IMAGES_PROFILEGROUPICON_PNG 22099 -#define IMAGES_PROFILEICON_PNG 22100 -#define IMAGES_PROFILESMALLICON_PNG 22101 -#define IMAGES_PROFILESSILHOUETTE_PNG 22102 -#define IMAGES_PROGRAMCOUNTERBORDER_PNG 22103 -#define IMAGES_RADIODOT_PNG 22104 -#define IMAGES_REGIONEMPTY_PNG 22105 -#define IMAGES_REGIONFIT_PNG 22106 -#define IMAGES_REGIONOVERSET_PNG 22107 -#define IMAGES_RESOURCECSSICON_PNG 22108 -#define IMAGES_RESOURCEDOCUMENTICON_PNG 22109 -#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 22110 -#define IMAGES_RESOURCEJSICON_PNG 22111 -#define IMAGES_RESOURCEPLAINICON_PNG 22112 -#define IMAGES_RESOURCEPLAINICONSMALL_PNG 22113 -#define IMAGES_RESOURCESSIZEGRAPHICON_PNG 22114 -#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 22115 -#define IMAGES_SCRIPTSSILHOUETTE_PNG 22116 -#define IMAGES_SEARCHNEXT_PNG 22117 -#define IMAGES_SEARCHPREV_PNG 22118 -#define IMAGES_SEARCHSMALLBLUE_PNG 22119 -#define IMAGES_SEARCHSMALLBRIGHTBLUE_PNG 22120 -#define IMAGES_SEARCHSMALLGRAY_PNG 22121 -#define IMAGES_SEARCHSMALLWHITE_PNG 22122 -#define IMAGES_SEGMENT_PNG 22123 -#define IMAGES_SEGMENTEND_PNG 22124 -#define IMAGES_SEGMENTHOVER_PNG 22125 -#define IMAGES_SEGMENTHOVEREND_PNG 22126 -#define IMAGES_SEGMENTSELECTED_PNG 22127 -#define IMAGES_SEGMENTSELECTEDEND_PNG 22128 -#define IMAGES_SESSIONSTORAGE_PNG 22129 -#define IMAGES_SPINNER_GIF 22130 -#define IMAGES_SPINNERACTIVE_GIF 22131 -#define IMAGES_SPINNERACTIVESELECTED_GIF 22132 -#define IMAGES_SPINNERINACTIVE_GIF 22133 -#define IMAGES_SPINNERINACTIVESELECTED_GIF 22134 -#define IMAGES_SPLITVIEWDIMPLE_PNG 22135 -#define IMAGES_SPLITVIEWDIVIDERBACKGROUND_PNG 22136 -#define IMAGES_STATUSBARBUTTONGLYPHS_PNG 22137 -#define IMAGES_STATUSBARBUTTONGLYPHS2X_PNG 22138 -#define IMAGES_STATUSBARRESIZERHORIZONTAL_PNG 22139 -#define IMAGES_STATUSBARRESIZERVERTICAL_PNG 22140 -#define IMAGES_SUCCESSGREENDOT_PNG 22141 -#define IMAGES_THUMBACTIVEHORIZ_PNG 22142 -#define IMAGES_THUMBACTIVEVERT_PNG 22143 -#define IMAGES_THUMBHORIZ_PNG 22144 -#define IMAGES_THUMBHOVERHORIZ_PNG 22145 -#define IMAGES_THUMBHOVERVERT_PNG 22146 -#define IMAGES_THUMBVERT_PNG 22147 -#define IMAGES_TICKMARK_PNG 22148 -#define IMAGES_TIMELINEHOLLOWPILLBLUE_PNG 22149 -#define IMAGES_TIMELINEHOLLOWPILLGRAY_PNG 22150 -#define IMAGES_TIMELINEHOLLOWPILLGREEN_PNG 22151 -#define IMAGES_TIMELINEHOLLOWPILLORANGE_PNG 22152 -#define IMAGES_TIMELINEHOLLOWPILLPURPLE_PNG 22153 -#define IMAGES_TIMELINEHOLLOWPILLRED_PNG 22154 -#define IMAGES_TIMELINEHOLLOWPILLYELLOW_PNG 22155 -#define IMAGES_TIMELINEPILLBLUE_PNG 22156 -#define IMAGES_TIMELINEPILLGRAY_PNG 22157 -#define IMAGES_TIMELINEPILLGREEN_PNG 22158 -#define IMAGES_TIMELINEPILLORANGE_PNG 22159 -#define IMAGES_TIMELINEPILLPURPLE_PNG 22160 -#define IMAGES_TIMELINEPILLRED_PNG 22161 -#define IMAGES_TIMELINEPILLYELLOW_PNG 22162 -#define IMAGES_TOOLBARICONS_PNG 22163 -#define IMAGES_TOOLBARICONSSMALL_PNG 22164 -#define IMAGES_TOOLBARITEMSELECTED_PNG 22165 -#define IMAGES_TRACKHORIZ_PNG 22166 -#define IMAGES_TRACKVERT_PNG 22167 -#define IMAGES_TREEDOWNTRIANGLEBLACK_PNG 22168 -#define IMAGES_TREEDOWNTRIANGLEWHITE_PNG 22169 -#define IMAGES_TREERIGHTTRIANGLEBLACK_PNG 22170 -#define IMAGES_TREERIGHTTRIANGLEWHITE_PNG 22171 -#define IMAGES_TREEUPTRIANGLEBLACK_PNG 22172 -#define IMAGES_TREEUPTRIANGLEWHITE_PNG 22173 -#define IMAGES_USERINPUTICON_PNG 22174 -#define IMAGES_USERINPUTPREVIOUSICON_PNG 22175 -#define IMAGES_USERINPUTRESULTICON_PNG 22176 -#define IMAGES_WARNINGICON_PNG 22177 -#define IMAGES_WARNINGMEDIUMICON_PNG 22178 -#define IMAGES_WARNINGORANGEDOT_PNG 22179 -#define IMAGES_WARNINGSERRORS_PNG 22180 -#define IMAGES_SEGMENTCHROMIUM_PNG 22181 -#define IMAGES_SEGMENTHOVERCHROMIUM_PNG 22182 -#define IMAGES_SEGMENTHOVERENDCHROMIUM_PNG 22183 -#define IMAGES_SEGMENTSELECTEDCHROMIUM_PNG 22184 -#define IMAGES_SEGMENTSELECTEDENDCHROMIUM_PNG 22185 - -// --------------------------------------------------------------------------- -// From net_resources.h: - -#define IDR_DIR_HEADER_HTML 4000 - -// --------------------------------------------------------------------------- -// From ui_resources.h: - -#define IDR_APP_TOP_CENTER 5500 -#define IDR_APP_TOP_LEFT 5501 -#define IDR_APP_TOP_RIGHT 5502 -#define IDR_AURA_SHADOW_ACTIVE_BOTTOM 5503 -#define IDR_AURA_SHADOW_ACTIVE_BOTTOM_LEFT 5504 -#define IDR_AURA_SHADOW_ACTIVE_BOTTOM_RIGHT 5505 -#define IDR_AURA_SHADOW_ACTIVE_LEFT 5506 -#define IDR_AURA_SHADOW_ACTIVE_RIGHT 5507 -#define IDR_AURA_SHADOW_ACTIVE_TOP 5508 -#define IDR_AURA_SHADOW_ACTIVE_TOP_LEFT 5509 -#define IDR_AURA_SHADOW_ACTIVE_TOP_RIGHT 5510 -#define IDR_AURA_SHADOW_INACTIVE_BOTTOM 5511 -#define IDR_AURA_SHADOW_INACTIVE_BOTTOM_LEFT 5512 -#define IDR_AURA_SHADOW_INACTIVE_BOTTOM_RIGHT 5513 -#define IDR_AURA_SHADOW_INACTIVE_LEFT 5514 -#define IDR_AURA_SHADOW_INACTIVE_RIGHT 5515 -#define IDR_AURA_SHADOW_INACTIVE_TOP 5516 -#define IDR_AURA_SHADOW_INACTIVE_TOP_LEFT 5517 -#define IDR_AURA_SHADOW_INACTIVE_TOP_RIGHT 5518 -#define IDR_BROWSER_ACTION_BADGE_CENTER 5519 -#define IDR_BROWSER_ACTION_BADGE_LEFT 5520 -#define IDR_BROWSER_ACTION_BADGE_RIGHT 5521 -#define IDR_BUBBLE_B 5522 -#define IDR_BUBBLE_BL 5523 -#define IDR_BUBBLE_BR 5524 -#define IDR_BUBBLE_B_ARROW 5525 -#define IDR_BUBBLE_L 5526 -#define IDR_BUBBLE_L_ARROW 5527 -#define IDR_BUBBLE_R 5528 -#define IDR_BUBBLE_R_ARROW 5529 -#define IDR_BUBBLE_SHADOW_B 5530 -#define IDR_BUBBLE_SHADOW_BL 5531 -#define IDR_BUBBLE_SHADOW_BR 5532 -#define IDR_BUBBLE_SHADOW_L 5533 -#define IDR_BUBBLE_SHADOW_R 5534 -#define IDR_BUBBLE_SHADOW_T 5535 -#define IDR_BUBBLE_SHADOW_TL 5536 -#define IDR_BUBBLE_SHADOW_TR 5537 -#define IDR_BUBBLE_T 5538 -#define IDR_BUBBLE_TL 5539 -#define IDR_BUBBLE_TR 5540 -#define IDR_BUBBLE_T_ARROW 5541 -#define IDR_CHECKBOX_DISABLED_INDETERMINATE 5542 -#define IDR_CHECKBOX_DISABLED_OFF 5543 -#define IDR_CHECKBOX_DISABLED_ON 5544 -#define IDR_CHECKBOX_INDETERMINATE 5545 -#define IDR_CHECKBOX_OFF 5546 -#define IDR_CHECKBOX_ON 5547 -#define IDR_CHECKMARK 5548 -#define IDR_CLOSE 5549 -#define IDR_CLOSE_BAR 5550 -#define IDR_CLOSE_BAR_H 5551 -#define IDR_CLOSE_BAR_MASK 5552 -#define IDR_CLOSE_BAR_P 5553 -#define IDR_CLOSE_H 5554 -#define IDR_CLOSE_P 5555 -#define IDR_CLOSE_SA 5556 -#define IDR_CLOSE_SA_H 5557 -#define IDR_CLOSE_SA_P 5558 -#define IDR_CONTENT_BOTTOM_CENTER 5559 -#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5560 -#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5561 -#define IDR_CONTENT_LEFT_SIDE 5562 -#define IDR_CONTENT_RIGHT_SIDE 5563 -#define IDR_DEFAULT_FAVICON 5564 -#define IDR_DEFAULT_FAVICON_32 5565 -#define IDR_DEFAULT_FAVICON_64 5566 -#define IDR_FOLDER_CLOSED 5567 -#define IDR_FOLDER_CLOSED_RTL 5568 -#define IDR_FOLDER_OPEN 5569 -#define IDR_FOLDER_OPEN_RTL 5570 -#define IDR_FRAME 5571 -#define IDR_FRAME_APP_PANEL 5572 -#define IDR_FRAME_INACTIVE 5573 -#define IDR_MAXIMIZE 5574 -#define IDR_MAXIMIZE_H 5575 -#define IDR_MAXIMIZE_P 5576 -#define IDR_MENU_ARROW 5577 -#define IDR_MENU_CHECK 5578 -#define IDR_MENU_CHECK_CHECKED 5579 -#define IDR_MENU_RADIO_EMPTY 5580 -#define IDR_MENU_RADIO_SELECTED 5581 -#define IDR_SLIDER_ACTIVE_LEFT 5582 -#define IDR_SLIDER_ACTIVE_RIGHT 5583 -#define IDR_SLIDER_ACTIVE_CENTER 5584 -#define IDR_SLIDER_DISABLED_LEFT 5585 -#define IDR_SLIDER_DISABLED_RIGHT 5586 -#define IDR_SLIDER_DISABLED_CENTER 5587 -#define IDR_SLIDER_PRESSED_LEFT 5588 -#define IDR_SLIDER_PRESSED_RIGHT 5589 -#define IDR_SLIDER_PRESSED_CENTER 5590 -#define IDR_SLIDER_ACTIVE_THUMB 5591 -#define IDR_SLIDER_DISABLED_THUMB 5592 -#define IDR_MENU_DROPARROW 5593 -#define IDR_MINIMIZE 5594 -#define IDR_MINIMIZE_H 5595 -#define IDR_MINIMIZE_P 5596 -#define IDR_OAK 5597 -#define IDR_PANEL_BOTTOM_LEFT_CORNER 5598 -#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5599 -#define IDR_PROGRESS_BAR 5600 -#define IDR_PROGRESS_BORDER_LEFT 5601 -#define IDR_PROGRESS_BORDER_RIGHT 5602 -#define IDR_PROGRESS_VALUE 5603 -#define IDR_RADIO_DISABLED_OFF 5604 -#define IDR_RADIO_DISABLED_ON 5605 -#define IDR_RADIO_OFF 5606 -#define IDR_RADIO_ON 5607 -#define IDR_SCROLL_BASE_HORIZONTAL_CENTER_H 5608 -#define IDR_SCROLL_BASE_HORIZONTAL_LEFT_H 5609 -#define IDR_SCROLL_BASE_HORIZONTAL_RIGHT_H 5610 -#define IDR_SCROLL_BASE_VERTICAL_BOTTOM_H 5611 -#define IDR_SCROLL_BASE_VERTICAL_CENTER_H 5612 -#define IDR_SCROLL_BASE_VERTICAL_TOP_H 5613 -#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER 5614 -#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_H 5615 -#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_P 5616 -#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT 5617 -#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_H 5618 -#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_P 5619 -#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT 5620 -#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_H 5621 -#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_P 5622 -#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM 5623 -#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_H 5624 -#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_P 5625 -#define IDR_SCROLL_THUMB_VERTICAL_CENTER 5626 -#define IDR_SCROLL_THUMB_VERTICAL_CENTER_H 5627 -#define IDR_SCROLL_THUMB_VERTICAL_CENTER_P 5628 -#define IDR_SCROLL_THUMB_VERTICAL_TOP 5629 -#define IDR_SCROLL_THUMB_VERTICAL_TOP_H 5630 -#define IDR_SCROLL_THUMB_VERTICAL_TOP_P 5631 -#define IDR_RESTORE 5632 -#define IDR_RESTORE_H 5633 -#define IDR_RESTORE_P 5634 -#define IDR_TEXTBUTTON_HOVER_BOTTOM 5635 -#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5636 -#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5637 -#define IDR_TEXTBUTTON_HOVER_CENTER 5638 -#define IDR_TEXTBUTTON_HOVER_LEFT 5639 -#define IDR_TEXTBUTTON_HOVER_RIGHT 5640 -#define IDR_TEXTBUTTON_HOVER_TOP 5641 -#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5642 -#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5643 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5644 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5645 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5646 -#define IDR_TEXTBUTTON_PRESSED_CENTER 5647 -#define IDR_TEXTBUTTON_PRESSED_LEFT 5648 -#define IDR_TEXTBUTTON_PRESSED_RIGHT 5649 -#define IDR_TEXTBUTTON_PRESSED_TOP 5650 -#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5651 -#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5652 -#define IDR_THROBBER 5653 -#define IDR_WINDOW_BOTTOM_CENTER 5654 -#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5655 -#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5656 -#define IDR_WINDOW_LEFT_SIDE 5657 -#define IDR_WINDOW_RIGHT_SIDE 5658 -#define IDR_WINDOW_TOP_CENTER 5659 -#define IDR_WINDOW_TOP_LEFT_CORNER 5660 -#define IDR_WINDOW_TOP_RIGHT_CORNER 5661 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM 5662 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_LEFT 5663 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_RIGHT 5664 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_LEFT 5665 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_RIGHT 5666 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP 5667 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_LEFT 5668 -#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_RIGHT 5669 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_BOTTOM 5670 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_LEFT 5671 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_RIGHT 5672 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_TOP 5673 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM 5674 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_LEFT 5675 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_RIGHT 5676 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_LEFT 5677 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_RIGHT 5678 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP 5679 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_LEFT 5680 -#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_RIGHT 5681 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_BOTTOM 5682 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_LEFT 5683 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_RIGHT 5684 -#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_TOP 5685 -#define IDR_MESSAGE_CLOSE 5686 - -// --------------------------------------------------------------------------- -// From webkit_chromium_resources.h: - -#define IDR_AUDIO_SPATIALIZATION_T000_P000 8500 -#define IDR_AUDIO_SPATIALIZATION_T000_P015 8501 -#define IDR_AUDIO_SPATIALIZATION_T000_P030 8502 -#define IDR_AUDIO_SPATIALIZATION_T000_P045 8503 -#define IDR_AUDIO_SPATIALIZATION_T000_P060 8504 -#define IDR_AUDIO_SPATIALIZATION_T000_P075 8505 -#define IDR_AUDIO_SPATIALIZATION_T000_P090 8506 -#define IDR_AUDIO_SPATIALIZATION_T000_P315 8507 -#define IDR_AUDIO_SPATIALIZATION_T000_P330 8508 -#define IDR_AUDIO_SPATIALIZATION_T000_P345 8509 -#define IDR_AUDIO_SPATIALIZATION_T015_P000 8510 -#define IDR_AUDIO_SPATIALIZATION_T015_P015 8511 -#define IDR_AUDIO_SPATIALIZATION_T015_P030 8512 -#define IDR_AUDIO_SPATIALIZATION_T015_P045 8513 -#define IDR_AUDIO_SPATIALIZATION_T015_P060 8514 -#define IDR_AUDIO_SPATIALIZATION_T015_P075 8515 -#define IDR_AUDIO_SPATIALIZATION_T015_P090 8516 -#define IDR_AUDIO_SPATIALIZATION_T015_P315 8517 -#define IDR_AUDIO_SPATIALIZATION_T015_P330 8518 -#define IDR_AUDIO_SPATIALIZATION_T015_P345 8519 -#define IDR_AUDIO_SPATIALIZATION_T030_P000 8520 -#define IDR_AUDIO_SPATIALIZATION_T030_P015 8521 -#define IDR_AUDIO_SPATIALIZATION_T030_P030 8522 -#define IDR_AUDIO_SPATIALIZATION_T030_P045 8523 -#define IDR_AUDIO_SPATIALIZATION_T030_P060 8524 -#define IDR_AUDIO_SPATIALIZATION_T030_P075 8525 -#define IDR_AUDIO_SPATIALIZATION_T030_P090 8526 -#define IDR_AUDIO_SPATIALIZATION_T030_P315 8527 -#define IDR_AUDIO_SPATIALIZATION_T030_P330 8528 -#define IDR_AUDIO_SPATIALIZATION_T030_P345 8529 -#define IDR_AUDIO_SPATIALIZATION_T045_P000 8530 -#define IDR_AUDIO_SPATIALIZATION_T045_P015 8531 -#define IDR_AUDIO_SPATIALIZATION_T045_P030 8532 -#define IDR_AUDIO_SPATIALIZATION_T045_P045 8533 -#define IDR_AUDIO_SPATIALIZATION_T045_P060 8534 -#define IDR_AUDIO_SPATIALIZATION_T045_P075 8535 -#define IDR_AUDIO_SPATIALIZATION_T045_P090 8536 -#define IDR_AUDIO_SPATIALIZATION_T045_P315 8537 -#define IDR_AUDIO_SPATIALIZATION_T045_P330 8538 -#define IDR_AUDIO_SPATIALIZATION_T045_P345 8539 -#define IDR_AUDIO_SPATIALIZATION_T060_P000 8540 -#define IDR_AUDIO_SPATIALIZATION_T060_P015 8541 -#define IDR_AUDIO_SPATIALIZATION_T060_P030 8542 -#define IDR_AUDIO_SPATIALIZATION_T060_P045 8543 -#define IDR_AUDIO_SPATIALIZATION_T060_P060 8544 -#define IDR_AUDIO_SPATIALIZATION_T060_P075 8545 -#define IDR_AUDIO_SPATIALIZATION_T060_P090 8546 -#define IDR_AUDIO_SPATIALIZATION_T060_P315 8547 -#define IDR_AUDIO_SPATIALIZATION_T060_P330 8548 -#define IDR_AUDIO_SPATIALIZATION_T060_P345 8549 -#define IDR_AUDIO_SPATIALIZATION_T075_P000 8550 -#define IDR_AUDIO_SPATIALIZATION_T075_P015 8551 -#define IDR_AUDIO_SPATIALIZATION_T075_P030 8552 -#define IDR_AUDIO_SPATIALIZATION_T075_P045 8553 -#define IDR_AUDIO_SPATIALIZATION_T075_P060 8554 -#define IDR_AUDIO_SPATIALIZATION_T075_P075 8555 -#define IDR_AUDIO_SPATIALIZATION_T075_P090 8556 -#define IDR_AUDIO_SPATIALIZATION_T075_P315 8557 -#define IDR_AUDIO_SPATIALIZATION_T075_P330 8558 -#define IDR_AUDIO_SPATIALIZATION_T075_P345 8559 -#define IDR_AUDIO_SPATIALIZATION_T090_P000 8560 -#define IDR_AUDIO_SPATIALIZATION_T090_P015 8561 -#define IDR_AUDIO_SPATIALIZATION_T090_P030 8562 -#define IDR_AUDIO_SPATIALIZATION_T090_P045 8563 -#define IDR_AUDIO_SPATIALIZATION_T090_P060 8564 -#define IDR_AUDIO_SPATIALIZATION_T090_P075 8565 -#define IDR_AUDIO_SPATIALIZATION_T090_P090 8566 -#define IDR_AUDIO_SPATIALIZATION_T090_P315 8567 -#define IDR_AUDIO_SPATIALIZATION_T090_P330 8568 -#define IDR_AUDIO_SPATIALIZATION_T090_P345 8569 -#define IDR_AUDIO_SPATIALIZATION_T105_P000 8570 -#define IDR_AUDIO_SPATIALIZATION_T105_P015 8571 -#define IDR_AUDIO_SPATIALIZATION_T105_P030 8572 -#define IDR_AUDIO_SPATIALIZATION_T105_P045 8573 -#define IDR_AUDIO_SPATIALIZATION_T105_P060 8574 -#define IDR_AUDIO_SPATIALIZATION_T105_P075 8575 -#define IDR_AUDIO_SPATIALIZATION_T105_P090 8576 -#define IDR_AUDIO_SPATIALIZATION_T105_P315 8577 -#define IDR_AUDIO_SPATIALIZATION_T105_P330 8578 -#define IDR_AUDIO_SPATIALIZATION_T105_P345 8579 -#define IDR_AUDIO_SPATIALIZATION_T120_P000 8580 -#define IDR_AUDIO_SPATIALIZATION_T120_P015 8581 -#define IDR_AUDIO_SPATIALIZATION_T120_P030 8582 -#define IDR_AUDIO_SPATIALIZATION_T120_P045 8583 -#define IDR_AUDIO_SPATIALIZATION_T120_P060 8584 -#define IDR_AUDIO_SPATIALIZATION_T120_P075 8585 -#define IDR_AUDIO_SPATIALIZATION_T120_P090 8586 -#define IDR_AUDIO_SPATIALIZATION_T120_P315 8587 -#define IDR_AUDIO_SPATIALIZATION_T120_P330 8588 -#define IDR_AUDIO_SPATIALIZATION_T120_P345 8589 -#define IDR_AUDIO_SPATIALIZATION_T135_P000 8590 -#define IDR_AUDIO_SPATIALIZATION_T135_P015 8591 -#define IDR_AUDIO_SPATIALIZATION_T135_P030 8592 -#define IDR_AUDIO_SPATIALIZATION_T135_P045 8593 -#define IDR_AUDIO_SPATIALIZATION_T135_P060 8594 -#define IDR_AUDIO_SPATIALIZATION_T135_P075 8595 -#define IDR_AUDIO_SPATIALIZATION_T135_P090 8596 -#define IDR_AUDIO_SPATIALIZATION_T135_P315 8597 -#define IDR_AUDIO_SPATIALIZATION_T135_P330 8598 -#define IDR_AUDIO_SPATIALIZATION_T135_P345 8599 -#define IDR_AUDIO_SPATIALIZATION_T150_P000 8600 -#define IDR_AUDIO_SPATIALIZATION_T150_P015 8601 -#define IDR_AUDIO_SPATIALIZATION_T150_P030 8602 -#define IDR_AUDIO_SPATIALIZATION_T150_P045 8603 -#define IDR_AUDIO_SPATIALIZATION_T150_P060 8604 -#define IDR_AUDIO_SPATIALIZATION_T150_P075 8605 -#define IDR_AUDIO_SPATIALIZATION_T150_P090 8606 -#define IDR_AUDIO_SPATIALIZATION_T150_P315 8607 -#define IDR_AUDIO_SPATIALIZATION_T150_P330 8608 -#define IDR_AUDIO_SPATIALIZATION_T150_P345 8609 -#define IDR_AUDIO_SPATIALIZATION_T165_P000 8610 -#define IDR_AUDIO_SPATIALIZATION_T165_P015 8611 -#define IDR_AUDIO_SPATIALIZATION_T165_P030 8612 -#define IDR_AUDIO_SPATIALIZATION_T165_P045 8613 -#define IDR_AUDIO_SPATIALIZATION_T165_P060 8614 -#define IDR_AUDIO_SPATIALIZATION_T165_P075 8615 -#define IDR_AUDIO_SPATIALIZATION_T165_P090 8616 -#define IDR_AUDIO_SPATIALIZATION_T165_P315 8617 -#define IDR_AUDIO_SPATIALIZATION_T165_P330 8618 -#define IDR_AUDIO_SPATIALIZATION_T165_P345 8619 -#define IDR_AUDIO_SPATIALIZATION_T180_P000 8620 -#define IDR_AUDIO_SPATIALIZATION_T180_P015 8621 -#define IDR_AUDIO_SPATIALIZATION_T180_P030 8622 -#define IDR_AUDIO_SPATIALIZATION_T180_P045 8623 -#define IDR_AUDIO_SPATIALIZATION_T180_P060 8624 -#define IDR_AUDIO_SPATIALIZATION_T180_P075 8625 -#define IDR_AUDIO_SPATIALIZATION_T180_P090 8626 -#define IDR_AUDIO_SPATIALIZATION_T180_P315 8627 -#define IDR_AUDIO_SPATIALIZATION_T180_P330 8628 -#define IDR_AUDIO_SPATIALIZATION_T180_P345 8629 -#define IDR_AUDIO_SPATIALIZATION_T195_P000 8630 -#define IDR_AUDIO_SPATIALIZATION_T195_P015 8631 -#define IDR_AUDIO_SPATIALIZATION_T195_P030 8632 -#define IDR_AUDIO_SPATIALIZATION_T195_P045 8633 -#define IDR_AUDIO_SPATIALIZATION_T195_P060 8634 -#define IDR_AUDIO_SPATIALIZATION_T195_P075 8635 -#define IDR_AUDIO_SPATIALIZATION_T195_P090 8636 -#define IDR_AUDIO_SPATIALIZATION_T195_P315 8637 -#define IDR_AUDIO_SPATIALIZATION_T195_P330 8638 -#define IDR_AUDIO_SPATIALIZATION_T195_P345 8639 -#define IDR_AUDIO_SPATIALIZATION_T210_P000 8640 -#define IDR_AUDIO_SPATIALIZATION_T210_P015 8641 -#define IDR_AUDIO_SPATIALIZATION_T210_P030 8642 -#define IDR_AUDIO_SPATIALIZATION_T210_P045 8643 -#define IDR_AUDIO_SPATIALIZATION_T210_P060 8644 -#define IDR_AUDIO_SPATIALIZATION_T210_P075 8645 -#define IDR_AUDIO_SPATIALIZATION_T210_P090 8646 -#define IDR_AUDIO_SPATIALIZATION_T210_P315 8647 -#define IDR_AUDIO_SPATIALIZATION_T210_P330 8648 -#define IDR_AUDIO_SPATIALIZATION_T210_P345 8649 -#define IDR_AUDIO_SPATIALIZATION_T225_P000 8650 -#define IDR_AUDIO_SPATIALIZATION_T225_P015 8651 -#define IDR_AUDIO_SPATIALIZATION_T225_P030 8652 -#define IDR_AUDIO_SPATIALIZATION_T225_P045 8653 -#define IDR_AUDIO_SPATIALIZATION_T225_P060 8654 -#define IDR_AUDIO_SPATIALIZATION_T225_P075 8655 -#define IDR_AUDIO_SPATIALIZATION_T225_P090 8656 -#define IDR_AUDIO_SPATIALIZATION_T225_P315 8657 -#define IDR_AUDIO_SPATIALIZATION_T225_P330 8658 -#define IDR_AUDIO_SPATIALIZATION_T225_P345 8659 -#define IDR_AUDIO_SPATIALIZATION_T240_P000 8660 -#define IDR_AUDIO_SPATIALIZATION_T240_P015 8661 -#define IDR_AUDIO_SPATIALIZATION_T240_P030 8662 -#define IDR_AUDIO_SPATIALIZATION_T240_P045 8663 -#define IDR_AUDIO_SPATIALIZATION_T240_P060 8664 -#define IDR_AUDIO_SPATIALIZATION_T240_P075 8665 -#define IDR_AUDIO_SPATIALIZATION_T240_P090 8666 -#define IDR_AUDIO_SPATIALIZATION_T240_P315 8667 -#define IDR_AUDIO_SPATIALIZATION_T240_P330 8668 -#define IDR_AUDIO_SPATIALIZATION_T240_P345 8669 -#define IDR_AUDIO_SPATIALIZATION_T255_P000 8670 -#define IDR_AUDIO_SPATIALIZATION_T255_P015 8671 -#define IDR_AUDIO_SPATIALIZATION_T255_P030 8672 -#define IDR_AUDIO_SPATIALIZATION_T255_P045 8673 -#define IDR_AUDIO_SPATIALIZATION_T255_P060 8674 -#define IDR_AUDIO_SPATIALIZATION_T255_P075 8675 -#define IDR_AUDIO_SPATIALIZATION_T255_P090 8676 -#define IDR_AUDIO_SPATIALIZATION_T255_P315 8677 -#define IDR_AUDIO_SPATIALIZATION_T255_P330 8678 -#define IDR_AUDIO_SPATIALIZATION_T255_P345 8679 -#define IDR_AUDIO_SPATIALIZATION_T270_P000 8680 -#define IDR_AUDIO_SPATIALIZATION_T270_P015 8681 -#define IDR_AUDIO_SPATIALIZATION_T270_P030 8682 -#define IDR_AUDIO_SPATIALIZATION_T270_P045 8683 -#define IDR_AUDIO_SPATIALIZATION_T270_P060 8684 -#define IDR_AUDIO_SPATIALIZATION_T270_P075 8685 -#define IDR_AUDIO_SPATIALIZATION_T270_P090 8686 -#define IDR_AUDIO_SPATIALIZATION_T270_P315 8687 -#define IDR_AUDIO_SPATIALIZATION_T270_P330 8688 -#define IDR_AUDIO_SPATIALIZATION_T270_P345 8689 -#define IDR_AUDIO_SPATIALIZATION_T285_P000 8690 -#define IDR_AUDIO_SPATIALIZATION_T285_P015 8691 -#define IDR_AUDIO_SPATIALIZATION_T285_P030 8692 -#define IDR_AUDIO_SPATIALIZATION_T285_P045 8693 -#define IDR_AUDIO_SPATIALIZATION_T285_P060 8694 -#define IDR_AUDIO_SPATIALIZATION_T285_P075 8695 -#define IDR_AUDIO_SPATIALIZATION_T285_P090 8696 -#define IDR_AUDIO_SPATIALIZATION_T285_P315 8697 -#define IDR_AUDIO_SPATIALIZATION_T285_P330 8698 -#define IDR_AUDIO_SPATIALIZATION_T285_P345 8699 -#define IDR_AUDIO_SPATIALIZATION_T300_P000 8700 -#define IDR_AUDIO_SPATIALIZATION_T300_P015 8701 -#define IDR_AUDIO_SPATIALIZATION_T300_P030 8702 -#define IDR_AUDIO_SPATIALIZATION_T300_P045 8703 -#define IDR_AUDIO_SPATIALIZATION_T300_P060 8704 -#define IDR_AUDIO_SPATIALIZATION_T300_P075 8705 -#define IDR_AUDIO_SPATIALIZATION_T300_P090 8706 -#define IDR_AUDIO_SPATIALIZATION_T300_P315 8707 -#define IDR_AUDIO_SPATIALIZATION_T300_P330 8708 -#define IDR_AUDIO_SPATIALIZATION_T300_P345 8709 -#define IDR_AUDIO_SPATIALIZATION_T315_P000 8710 -#define IDR_AUDIO_SPATIALIZATION_T315_P015 8711 -#define IDR_AUDIO_SPATIALIZATION_T315_P030 8712 -#define IDR_AUDIO_SPATIALIZATION_T315_P045 8713 -#define IDR_AUDIO_SPATIALIZATION_T315_P060 8714 -#define IDR_AUDIO_SPATIALIZATION_T315_P075 8715 -#define IDR_AUDIO_SPATIALIZATION_T315_P090 8716 -#define IDR_AUDIO_SPATIALIZATION_T315_P315 8717 -#define IDR_AUDIO_SPATIALIZATION_T315_P330 8718 -#define IDR_AUDIO_SPATIALIZATION_T315_P345 8719 -#define IDR_AUDIO_SPATIALIZATION_T330_P000 8720 -#define IDR_AUDIO_SPATIALIZATION_T330_P015 8721 -#define IDR_AUDIO_SPATIALIZATION_T330_P030 8722 -#define IDR_AUDIO_SPATIALIZATION_T330_P045 8723 -#define IDR_AUDIO_SPATIALIZATION_T330_P060 8724 -#define IDR_AUDIO_SPATIALIZATION_T330_P075 8725 -#define IDR_AUDIO_SPATIALIZATION_T330_P090 8726 -#define IDR_AUDIO_SPATIALIZATION_T330_P315 8727 -#define IDR_AUDIO_SPATIALIZATION_T330_P330 8728 -#define IDR_AUDIO_SPATIALIZATION_T330_P345 8729 -#define IDR_AUDIO_SPATIALIZATION_T345_P000 8730 -#define IDR_AUDIO_SPATIALIZATION_T345_P015 8731 -#define IDR_AUDIO_SPATIALIZATION_T345_P030 8732 -#define IDR_AUDIO_SPATIALIZATION_T345_P045 8733 -#define IDR_AUDIO_SPATIALIZATION_T345_P060 8734 -#define IDR_AUDIO_SPATIALIZATION_T345_P075 8735 -#define IDR_AUDIO_SPATIALIZATION_T345_P090 8736 -#define IDR_AUDIO_SPATIALIZATION_T345_P315 8737 -#define IDR_AUDIO_SPATIALIZATION_T345_P330 8738 -#define IDR_AUDIO_SPATIALIZATION_T345_P345 8739 -#define IDR_ALIAS_CURSOR 8740 -#define IDR_CELL_CURSOR 8741 -#define IDR_CONTEXTMENU_CURSOR 8742 -#define IDR_COPY_CURSOR 8743 -#define IDR_EAST_RESIZE_CURSOR 8744 -#define IDR_EASTWEST_RESIZE_CURSOR 8745 -#define IDR_HELP_CURSOR 8746 -#define IDR_LINK_CURSOR 8747 -#define IDR_MISSING_IMAGE_CURSOR 8748 -#define IDR_MOVE_CURSOR 8749 -#define IDR_NODROP_CURSOR 8750 -#define IDR_NONE_CURSOR 8751 -#define IDR_NORTHEAST_RESIZE_CURSOR 8752 -#define IDR_NORTHEASTSOUTHWEST_RESIZE_CURSOR 8753 -#define IDR_NORTH_RESIZE_CURSOR 8754 -#define IDR_NORTHSOUTH_RESIZE_CURSOR 8755 -#define IDR_NORTHWEST_RESIZE_CURSOR 8756 -#define IDR_NORTHWESTSOUTHEAST_RESIZE_CURSOR 8757 -#define IDR_PROGRESS_CURSOR 8758 -#define IDR_SOUTHEAST_RESIZE_CURSOR 8759 -#define IDR_SOUTH_RESIZE_CURSOR 8760 -#define IDR_SOUTHWEST_RESIZE_CURSOR 8761 -#define IDR_VERTICALTEXT_CURSOR 8762 -#define IDR_WAIT_CURSOR 8763 -#define IDR_WEST_RESIZE_CURSOR 8764 -#define IDR_ZOOMIN_CURSOR 8765 -#define IDR_ZOOMOUT_CURSOR 8766 - -// --------------------------------------------------------------------------- -// From webkit_resources.h: - -#define IDR_BROKENIMAGE 4700 -#define IDR_INPUT_SPEECH 4701 -#define IDR_INPUT_SPEECH_RECORDING 4702 -#define IDR_INPUT_SPEECH_WAITING 4703 -#define IDR_MEDIA_FULLSCREEN_BUTTON 4704 -#define IDR_MEDIA_PAUSE_BUTTON 4705 -#define IDR_MEDIA_PLAY_BUTTON 4706 -#define IDR_MEDIA_PLAY_BUTTON_DISABLED 4707 -#define IDR_MEDIA_SOUND_DISABLED 4708 -#define IDR_MEDIA_SOUND_FULL_BUTTON 4709 -#define IDR_MEDIA_SOUND_NONE_BUTTON 4710 -#define IDR_MEDIA_SLIDER_THUMB 4711 -#define IDR_MEDIA_VOLUME_SLIDER_THUMB 4712 -#define IDR_MEDIAPLAYER_PAUSE_BUTTON 4713 -#define IDR_MEDIAPLAYER_PAUSE_BUTTON_HOVER 4714 -#define IDR_MEDIAPLAYER_PAUSE_BUTTON_DOWN 4715 -#define IDR_MEDIAPLAYER_PLAY_BUTTON 4716 -#define IDR_MEDIAPLAYER_PLAY_BUTTON_HOVER 4717 -#define IDR_MEDIAPLAYER_PLAY_BUTTON_DOWN 4718 -#define IDR_MEDIAPLAYER_PLAY_BUTTON_DISABLED 4719 -#define IDR_MEDIAPLAYER_SOUND_LEVEL3_BUTTON 4720 -#define IDR_MEDIAPLAYER_SOUND_LEVEL3_BUTTON_HOVER 4721 -#define IDR_MEDIAPLAYER_SOUND_LEVEL3_BUTTON_DOWN 4722 -#define IDR_MEDIAPLAYER_SOUND_LEVEL2_BUTTON 4723 -#define IDR_MEDIAPLAYER_SOUND_LEVEL2_BUTTON_HOVER 4724 -#define IDR_MEDIAPLAYER_SOUND_LEVEL2_BUTTON_DOWN 4725 -#define IDR_MEDIAPLAYER_SOUND_LEVEL1_BUTTON 4726 -#define IDR_MEDIAPLAYER_SOUND_LEVEL1_BUTTON_HOVER 4727 -#define IDR_MEDIAPLAYER_SOUND_LEVEL1_BUTTON_DOWN 4728 -#define IDR_MEDIAPLAYER_SOUND_LEVEL0_BUTTON 4729 -#define IDR_MEDIAPLAYER_SOUND_LEVEL0_BUTTON_HOVER 4730 -#define IDR_MEDIAPLAYER_SOUND_LEVEL0_BUTTON_DOWN 4731 -#define IDR_MEDIAPLAYER_SOUND_DISABLED 4732 -#define IDR_MEDIAPLAYER_SLIDER_THUMB 4733 -#define IDR_MEDIAPLAYER_SLIDER_THUMB_HOVER 4734 -#define IDR_MEDIAPLAYER_SLIDER_THUMB_DOWN 4735 -#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB 4736 -#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB_HOVER 4737 -#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB_DOWN 4738 -#define IDR_MEDIAPLAYER_VOLUME_SLIDER_THUMB_DISABLED 4739 -#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON 4740 -#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON_HOVER 4741 -#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON_DOWN 4742 -#define IDR_MEDIAPLAYER_CLOSEDCAPTION_BUTTON_DISABLED 4743 -#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON 4744 -#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON_HOVER 4745 -#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON_DOWN 4746 -#define IDR_MEDIAPLAYER_FULLSCREEN_BUTTON_DISABLED 4747 -#define IDR_MEDIAPLAYER_OVERLAY_PLAY_BUTTON 4748 -#define IDR_OVERHANG_PATTERN 4749 -#define IDR_PAN_SCROLL_ICON 4750 -#define IDR_SEARCH_CANCEL 4751 -#define IDR_SEARCH_CANCEL_PRESSED 4752 -#define IDR_SEARCH_MAGNIFIER 4753 -#define IDR_SEARCH_MAGNIFIER_RESULTS 4754 -#define IDR_TEXTAREA_RESIZER 4755 -#define IDR_AUTOFILL_CC_AMEX 4756 -#define IDR_AUTOFILL_CC_DINERS 4757 -#define IDR_AUTOFILL_CC_DISCOVER 4758 -#define IDR_AUTOFILL_CC_GENERIC 4759 -#define IDR_AUTOFILL_CC_JCB 4760 -#define IDR_AUTOFILL_CC_MASTERCARD 4761 -#define IDR_AUTOFILL_CC_SOLO 4762 -#define IDR_AUTOFILL_CC_VISA 4763 -#define IDR_PDF_BUTTON_FTP 4764 -#define IDR_PDF_BUTTON_FTP_HOVER 4765 -#define IDR_PDF_BUTTON_FTP_PRESSED 4766 -#define IDR_PDF_BUTTON_FTW 4767 -#define IDR_PDF_BUTTON_FTW_HOVER 4768 -#define IDR_PDF_BUTTON_FTW_PRESSED 4769 -#define IDR_PDF_BUTTON_ZOOMIN_END 4770 -#define IDR_PDF_BUTTON_ZOOMIN_END_HOVER 4771 -#define IDR_PDF_BUTTON_ZOOMIN_END_PRESSED 4772 -#define IDR_PDF_BUTTON_ZOOMIN 4773 -#define IDR_PDF_BUTTON_ZOOMIN_HOVER 4774 -#define IDR_PDF_BUTTON_ZOOMIN_PRESSED 4775 -#define IDR_PDF_BUTTON_ZOOMOUT 4776 -#define IDR_PDF_BUTTON_ZOOMOUT_HOVER 4777 -#define IDR_PDF_BUTTON_ZOOMOUT_PRESSED 4778 -#define IDR_PDF_BUTTON_SAVE 4779 -#define IDR_PDF_BUTTON_SAVE_HOVER 4780 -#define IDR_PDF_BUTTON_SAVE_PRESSED 4781 -#define IDR_PDF_BUTTON_PRINT 4782 -#define IDR_PDF_BUTTON_PRINT_HOVER 4783 -#define IDR_PDF_BUTTON_PRINT_PRESSED 4784 -#define IDR_PDF_THUMBNAIL_0 4785 -#define IDR_PDF_THUMBNAIL_1 4786 -#define IDR_PDF_THUMBNAIL_2 4787 -#define IDR_PDF_THUMBNAIL_3 4788 -#define IDR_PDF_THUMBNAIL_4 4789 -#define IDR_PDF_THUMBNAIL_5 4790 -#define IDR_PDF_THUMBNAIL_6 4791 -#define IDR_PDF_THUMBNAIL_7 4792 -#define IDR_PDF_THUMBNAIL_8 4793 -#define IDR_PDF_THUMBNAIL_9 4794 -#define IDR_PDF_THUMBNAIL_NUM_BACKGROUND 4795 -#define IDR_PDF_PROGRESS_BAR_0 4796 -#define IDR_PDF_PROGRESS_BAR_1 4797 -#define IDR_PDF_PROGRESS_BAR_2 4798 -#define IDR_PDF_PROGRESS_BAR_3 4799 -#define IDR_PDF_PROGRESS_BAR_4 4800 -#define IDR_PDF_PROGRESS_BAR_5 4801 -#define IDR_PDF_PROGRESS_BAR_6 4802 -#define IDR_PDF_PROGRESS_BAR_7 4803 -#define IDR_PDF_PROGRESS_BAR_8 4804 -#define IDR_PDF_PROGRESS_BAR_BACKGROUND 4805 -#define IDR_PDF_PAGE_INDICATOR_BACKGROUND 4806 -#define IDR_PDF_PAGE_DROPSHADOW 4807 -#define IDR_PASSWORD_GENERATION_ICON 4808 -#define IDR_PASSWORD_GENERATION_ICON_HOVER 4809 - -#endif // CEF_INCLUDE_CEF_PACK_RESOURCES_H_ diff --git a/cef/include/cef_pack_strings.h b/cef/include/cef_pack_strings.h deleted file mode 100644 index 6c17b910d..000000000 --- a/cef/include/cef_pack_strings.h +++ /dev/null @@ -1,225 +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 is generated by the make_pack_header.py tool. -// - -#ifndef CEF_INCLUDE_CEF_PACK_STRINGS_H_ -#define CEF_INCLUDE_CEF_PACK_STRINGS_H_ -#pragma once - -// --------------------------------------------------------------------------- -// From cef_strings.h: - -#define IDS_MENU_BACK 28000 -#define IDS_MENU_FORWARD 28001 -#define IDS_MENU_RELOAD 28002 -#define IDS_MENU_RELOAD_NOCACHE 28003 -#define IDS_MENU_STOPLOAD 28004 -#define IDS_MENU_UNDO 28005 -#define IDS_MENU_REDO 28006 -#define IDS_MENU_CUT 28007 -#define IDS_MENU_COPY 28008 -#define IDS_MENU_PASTE 28009 -#define IDS_MENU_DELETE 28010 -#define IDS_MENU_SELECT_ALL 28011 -#define IDS_MENU_FIND 28012 -#define IDS_MENU_PRINT 28013 -#define IDS_MENU_VIEW_SOURCE 28014 -#define IDS_APP_AUDIO_FILES 28015 -#define IDS_APP_IMAGE_FILES 28016 -#define IDS_APP_TEXT_FILES 28017 -#define IDS_APP_VIDEO_FILES 28018 - -// --------------------------------------------------------------------------- -// From ui_strings.h: - -#define IDS_APP_MENU_EMPTY_SUBMENU 11000 -#define IDS_APP_UNTITLED_SHORTCUT_FILE_NAME 11001 -#define IDS_APP_SAVEAS_ALL_FILES 11002 -#define IDS_APP_SAVEAS_EXTENSION_FORMAT 11003 -#define IDS_SELECT_FOLDER_BUTTON_TITLE 11004 -#define IDS_SELECT_FOLDER_DIALOG_TITLE 11005 -#define IDS_SAVE_AS_DIALOG_TITLE 11006 -#define IDS_OPEN_FILE_DIALOG_TITLE 11007 -#define IDS_OPEN_FILES_DIALOG_TITLE 11008 -#define IDS_SAVEAS_ALL_FILES 11009 -#define IDS_APP_ACCACTION_PRESS 11010 -#define IDS_APP_ACCNAME_CLOSE 11011 -#define IDS_APP_ACCNAME_MINIMIZE 11012 -#define IDS_APP_ACCNAME_MAXIMIZE 11013 -#define IDS_APP_ACCNAME_RESTORE 11014 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE 11015 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE 11016 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE 11017 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME 11018 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLEND 11019 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP 11020 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN 11021 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT 11022 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT 11023 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLUP 11024 -#define IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN 11025 -#define IDS_APP_UNDO 11026 -#define IDS_APP_CUT 11027 -#define IDS_APP_COPY 11028 -#define IDS_APP_PASTE 11029 -#define IDS_APP_DELETE 11030 -#define IDS_APP_SELECT_ALL 11031 -#define IDS_APP_OK 11032 -#define IDS_APP_CANCEL 11033 -#define IDS_APP_CLOSE 11034 -#define IDS_APP_ESC_KEY 11035 -#define IDS_APP_TAB_KEY 11036 -#define IDS_APP_INSERT_KEY 11037 -#define IDS_APP_HOME_KEY 11038 -#define IDS_APP_DELETE_KEY 11039 -#define IDS_APP_END_KEY 11040 -#define IDS_APP_PAGEUP_KEY 11041 -#define IDS_APP_PAGEDOWN_KEY 11042 -#define IDS_APP_LEFT_ARROW_KEY 11043 -#define IDS_APP_RIGHT_ARROW_KEY 11044 -#define IDS_APP_RIGHT_UP_KEY 11045 -#define IDS_APP_RIGHT_DOWN_KEY 11046 -#define IDS_APP_ENTER_KEY 11047 -#define IDS_APP_F1_KEY 11048 -#define IDS_APP_F11_KEY 11049 -#define IDS_APP_BACKSPACE_KEY 11050 -#define IDS_APP_CONTROL_MODIFIER 11051 -#define IDS_APP_ALT_MODIFIER 11052 -#define IDS_APP_SHIFT_MODIFIER 11053 -#define IDS_APP_COMMAND_MODIFIER 11054 -#define IDS_APP_BYTES 11055 -#define IDS_APP_KIBIBYTES 11056 -#define IDS_APP_MEBIBYTES 11057 -#define IDS_APP_GIBIBYTES 11058 -#define IDS_APP_TEBIBYTES 11059 -#define IDS_APP_PEBIBYTES 11060 -#define IDS_APP_BYTES_PER_SECOND 11061 -#define IDS_APP_KIBIBYTES_PER_SECOND 11062 -#define IDS_APP_MEBIBYTES_PER_SECOND 11063 -#define IDS_APP_GIBIBYTES_PER_SECOND 11064 -#define IDS_APP_TEBIBYTES_PER_SECOND 11065 -#define IDS_APP_PEBIBYTES_PER_SECOND 11066 -#define IDS_MESSAGE_CENTER_EXTENSIONS_DISABLE 11067 -#define IDS_MESSAGE_CENTER_SITE_DISABLE 11068 -#define IDS_MESSAGE_CENTER_SETTINGS 11069 -#define IDS_MESSAGE_CENTER_CLEAR_ALL 11070 -#define IDS_MESSAGE_CENTER_NO_MESSAGES 11071 -#define IDS_MESSAGE_CENTER_QUIET_MODE 11072 -#define IDS_MESSAGE_CENTER_QUIET_MODE_EXIT 11073 -#define IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR 11074 -#define IDS_MESSAGE_CENTER_QUIET_MODE_1DAY 11075 - -// --------------------------------------------------------------------------- -// From webkit_strings.h: - -#define IDS_DETAILS_WITHOUT_SUMMARY_LABEL 18000 -#define IDS_SEARCHABLE_INDEX_INTRO 18001 -#define IDS_FORM_CALENDAR_CLEAR 18002 -#define IDS_FORM_CALENDAR_TODAY 18003 -#define IDS_FORM_DATE_FORMAT_DAY_IN_MONTH 18004 -#define IDS_FORM_DATE_FORMAT_MONTH 18005 -#define IDS_FORM_DATE_FORMAT_YEAR 18006 -#define IDS_FORM_SUBMIT_LABEL 18007 -#define IDS_FORM_INPUT_ALT 18008 -#define IDS_FORM_RESET_LABEL 18009 -#define IDS_FORM_FILE_BUTTON_LABEL 18010 -#define IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL 18011 -#define IDS_FORM_FILE_NO_FILE_LABEL 18012 -#define IDS_FORM_FILE_NO_FILE_DRAG_LABEL 18013 -#define IDS_FORM_FILE_MULTIPLE_UPLOAD 18014 -#define IDS_FORM_OTHER_COLOR_LABEL 18015 -#define IDS_FORM_OTHER_DATE_LABEL 18016 -#define IDS_FORM_OTHER_MONTH_LABEL 18017 -#define IDS_FORM_OTHER_TIME_LABEL 18018 -#define IDS_FORM_OTHER_WEEK_LABEL 18019 -#define IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD 18020 -#define IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD 18021 -#define IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD 18022 -#define IDS_FORM_THIS_MONTH_LABEL 18023 -#define IDS_FORM_THIS_WEEK_LABEL 18024 -#define IDS_FORM_WEEK_NUMBER_LABEL 18025 -#define IDS_RECENT_SEARCHES_NONE 18026 -#define IDS_RECENT_SEARCHES 18027 -#define IDS_RECENT_SEARCHES_CLEAR 18028 -#define IDS_IMAGE_TITLE_FOR_FILENAME 18029 -#define IDS_AX_ROLE_WEB_AREA 18030 -#define IDS_AX_ROLE_LINK 18031 -#define IDS_AX_ROLE_LIST_MARKER 18032 -#define IDS_AX_ROLE_IMAGE_MAP 18033 -#define IDS_AX_ROLE_HEADING 18034 -#define IDS_AX_ROLE_FOOTER 18035 -#define IDS_AX_ROLE_STEPPER 18036 -#define IDS_AX_BUTTON_ACTION_VERB 18037 -#define IDS_AX_RADIO_BUTTON_ACTION_VERB 18038 -#define IDS_AX_TEXT_FIELD_ACTION_VERB 18039 -#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18040 -#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 18041 -#define IDS_AX_LINK_ACTION_VERB 18042 -#define IDS_AX_AM_PM_FIELD_TEXT 18043 -#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 18044 -#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 18045 -#define IDS_AX_HOUR_FIELD_TEXT 18046 -#define IDS_AX_MILLISECOND_FIELD_TEXT 18047 -#define IDS_AX_MINUTE_FIELD_TEXT 18048 -#define IDS_AX_MONTH_FIELD_TEXT 18049 -#define IDS_AX_SECOND_FIELD_TEXT 18050 -#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 18051 -#define IDS_AX_YEAR_FIELD_TEXT 18052 -#define IDS_KEYGEN_HIGH_GRADE_KEY 18053 -#define IDS_KEYGEN_MED_GRADE_KEY 18054 -#define IDS_FORM_INPUT_WEEK_TEMPLATE 18055 -#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 18056 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH 18057 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 18058 -#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 18059 -#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 18060 -#define IDS_FORM_VALIDATION_STEP_MISMATCH 18061 -#define IDS_FORM_VALIDATION_BAD_INPUT_DATETIME 18062 -#define IDS_FORM_VALIDATION_BAD_INPUT_NUMBER 18063 -#define IDS_FORM_VALIDATION_VALUE_MISSING 18064 -#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 18065 -#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 18066 -#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 18067 -#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 18068 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 18069 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 18070 -#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 18071 -#define IDS_FORM_VALIDATION_TOO_LONG 18072 -#define IDS_PDF_NEED_PASSWORD 18073 -#define IDS_PDF_PAGE_LOADING 18074 -#define IDS_PDF_LOADING_PROGRESS 18075 -#define IDS_PDF_PAGE_LOAD_FAILED 18076 -#define IDS_PDF_PROGRESS_LOADING 18077 -#define IDS_PLUGIN_INITIALIZATION_ERROR 18078 - -#endif // CEF_INCLUDE_CEF_PACK_STRINGS_H_ diff --git a/cef/include/cef_path_util.h b/cef/include/cef_path_util.h deleted file mode 100644 index 552f4ba59..000000000 --- a/cef/include/cef_path_util.h +++ /dev/null @@ -1,52 +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_PATH_UTIL_H_ -#define CEF_INCLUDE_CEF_PATH_UTIL_H_ -#pragma once - -#include "include/cef_base.h" - -typedef cef_path_key_t PathKey; - -/// -// Retrieve the path associated with the specified |key|. Returns true on -// success. Can be called on any thread in the browser process. -/// -/*--cef()--*/ -bool CefGetPath(PathKey key, CefString& path); - -#endif // CEF_INCLUDE_CEF_PATH_UTIL_H_ diff --git a/cef/include/cef_process_message.h b/cef/include/cef_process_message.h deleted file mode 100644 index 1e27bd681..000000000 --- a/cef/include/cef_process_message.h +++ /dev/null @@ -1,91 +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_MESSAGE_H_ -#define CEF_INCLUDE_CEF_MESSAGE_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_values.h" - -typedef cef_process_id_t CefProcessId; - -/// -// Class representing a message. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefProcessMessage : public virtual CefBase { - public: - /// - // Create a new CefProcessMessage object with the specified name. - /// - /*--cef()--*/ - static CefRefPtr Create(const CefString& name); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // function returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Returns the message name. - /// - /*--cef()--*/ - virtual CefString GetName() =0; - - /// - // Returns the list of arguments. - /// - /*--cef()--*/ - virtual CefRefPtr GetArgumentList() =0; -}; - -#endif // CEF_INCLUDE_CEF_MESSAGE_H_ diff --git a/cef/include/cef_process_util.h b/cef/include/cef_process_util.h deleted file mode 100644 index 4fce778e7..000000000 --- a/cef/include/cef_process_util.h +++ /dev/null @@ -1,57 +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_PROCESS_UTIL_H_ -#define CEF_INCLUDE_CEF_PROCESS_UTIL_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_command_line.h" - -/// -// Launches the process specified via |command_line|. Returns true upon -// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. -// -// Unix-specific notes: -// - All file descriptors open in the parent process will be closed in the -// child process except for stdin, stdout, and stderr. -// - If the first argument on the command line does not contain a slash, -// PATH will be searched. (See man execvp.) -/// -/*--cef()--*/ -bool CefLaunchProcess(CefRefPtr command_line); - -#endif // CEF_INCLUDE_CEF_PROCESS_UTIL_H_ diff --git a/cef/include/cef_proxy_handler.h b/cef/include/cef_proxy_handler.h deleted file mode 100644 index d40c67d7c..000000000 --- a/cef/include/cef_proxy_handler.h +++ /dev/null @@ -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_ diff --git a/cef/include/cef_render_handler.h b/cef/include/cef_render_handler.h deleted file mode 100644 index 5064950cd..000000000 --- a/cef/include/cef_render_handler.h +++ /dev/null @@ -1,119 +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_RENDER_HANDLER_H_ -#define CEF_INCLUDE_CEF_RENDER_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include - -/// -// 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 RectList; - - /// - // Called to retrieve the root window rectangle in screen coordinates. Return - // true if the rectangle was provided. - /// - /*--cef()--*/ - virtual bool GetRootScreenRect(CefRefPtr browser, - CefRect& rect) { return false; } - - /// - // Called to retrieve the view rectangle which is relative to screen - // coordinates. Return true if the rectangle was provided. - /// - /*--cef()--*/ - virtual bool GetViewRect(CefRefPtr browser, CefRect& rect) =0; - - /// - // 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 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 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 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. - /// - /*--cef()--*/ - virtual void OnPaint(CefRefPtr browser, - PaintElementType type, - const RectList& dirtyRects, - const void* buffer, - int width, int height) =0; - - /// - // Called when the browser window's cursor has changed. - /// - /*--cef()--*/ - virtual void OnCursorChange(CefRefPtr browser, - CefCursorHandle cursor) {} -}; - -#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_ diff --git a/cef/include/cef_render_process_handler.h b/cef/include/cef_render_process_handler.h deleted file mode 100644 index 0f21b1d2c..000000000 --- a/cef/include/cef_render_process_handler.h +++ /dev/null @@ -1,196 +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_RENDER_PROCESS_HANDLER_H_ -#define CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_dom.h" -#include "include/cef_frame.h" -#include "include/cef_process_message.h" -#include "include/cef_v8.h" -#include "include/cef_values.h" - -/// -// Class used to implement render process callbacks. The methods of this class -// will be called on the render process main thread (TID_RENDERER) unless -// otherwise indicated. -/// -/*--cef(source=client)--*/ -class CefRenderProcessHandler : public virtual CefBase { - public: - typedef cef_navigation_type_t NavigationType; - - /// - // Called after the render process main thread has been created. |extra_info| - // is a read-only value originating from - // CefBrowserProcessHandler::OnRenderProcessThreadCreated(). Do not keep a - // reference to |extra_info| outside of this method. - /// - /*--cef()--*/ - virtual void OnRenderThreadCreated(CefRefPtr extra_info) {} - - /// - // Called after WebKit has been initialized. - /// - /*--cef()--*/ - virtual void OnWebKitInitialized() {} - - /// - // Called after a browser has been created. When browsing cross-origin a new - // browser will be created before the old browser with the same identifier is - // destroyed. - /// - /*--cef()--*/ - virtual void OnBrowserCreated(CefRefPtr browser) {} - - /// - // Called before a browser is destroyed. - /// - /*--cef()--*/ - virtual void OnBrowserDestroyed(CefRefPtr browser) {} - - /// - // Called before browser navigation. Return true to cancel the navigation or - // false to allow the navigation to proceed. The |request| object cannot be - // modified in this callback. - /// - /*--cef()--*/ - virtual bool OnBeforeNavigation(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request, - NavigationType navigation_type, - bool is_redirect) { return false; } - - /// - // Called immediately after the V8 context for a frame has been created. To - // retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal() - // method. V8 handles can only be accessed from the thread on which they are - // created. A task runner for posting tasks on the associated thread can be - // retrieved via the CefV8Context::GetTaskRunner() method. - /// - /*--cef()--*/ - virtual void OnContextCreated(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr 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 browser, - CefRefPtr frame, - CefRefPtr context) {} - - /// - // Called for global uncaught exceptions in a frame. Execution of this - // callback is disabled by default. To enable set - // CefSettings.uncaught_exception_stack_size > 0. - /// - /*--cef()--*/ - virtual void OnUncaughtException(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr context, - CefRefPtr exception, - CefRefPtr stackTrace) {} - - /// - // Called on the WebWorker thread immediately after the V8 context for a new - // WebWorker has been created. To retrieve the JavaScript 'self' object use - // the CefV8Context::GetGlobal() method. V8 handles can only be accessed from - // the thread on which they are created. A task runner for posting tasks on - // the associated thread can be retrieved via the - // CefV8Context::GetTaskRunner() method. - /// - /*--cef()--*/ - virtual void OnWorkerContextCreated(int worker_id, - const CefString& url, - CefRefPtr context) {} - - /// - // Called on the WebWorker thread immediately before the V8 context for a - // WebWorker is released. No references to the context should be kept after - // this method is called. Any tasks posted or pending on the WebWorker - // thread after this method is called may not be executed. - /// - /*--cef()--*/ - virtual void OnWorkerContextReleased(int worker_id, - const CefString& url, - CefRefPtr context) {} - - /// - // Called on the WebWorker thread for global uncaught exceptions in a - // WebWorker. Execution of this callback is disabled by default. To enable set - // CefSettings.uncaught_exception_stack_size > 0. - /// - /*--cef()--*/ - virtual void OnWorkerUncaughtException( - int worker_id, - const CefString& url, - CefRefPtr context, - CefRefPtr exception, - CefRefPtr stackTrace) {} - - /// - // 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 browser, - CefRefPtr frame, - CefRefPtr node) {} - - /// - // Called when a new message is received from a different process. Return true - // if the message was handled or false otherwise. Do not keep a reference to - // or attempt to access the message outside of this callback. - /// - /*--cef()--*/ - virtual bool OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_RENDER_PROCESS_HANDLER_H_ diff --git a/cef/include/cef_request.h b/cef/include/cef_request.h deleted file mode 100644 index 7ac4cb027..000000000 --- a/cef/include/cef_request.h +++ /dev/null @@ -1,280 +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_REQUEST_H_ -#define CEF_INCLUDE_CEF_REQUEST_H_ -#pragma once - -#include "include/cef_base.h" -#include -#include - -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,no_debugct_check)--*/ -class CefRequest : public virtual CefBase { - public: - typedef std::multimap HeaderMap; - - /// - // Create a new CefRequest object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // 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 GetPostData() =0; - - /// - // Set the post data. - /// - /*--cef()--*/ - virtual void SetPostData(CefRefPtr 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 postData, - const HeaderMap& headerMap) =0; - - /// - // Get the flags used in combination with CefURLRequest. See - // cef_urlrequest_flags_t for supported values. - /// - /*--cef(default_retval=UR_FLAG_NONE)--*/ - virtual int GetFlags() =0; - - /// - // Set the flags used in combination with CefURLRequest. See - // cef_urlrequest_flags_t for supported values. - /// - /*--cef()--*/ - virtual void SetFlags(int flags) =0; - - /// - // Set the URL to the first party for cookies used in combination with - // CefURLRequest. - /// - /*--cef()--*/ - virtual CefString GetFirstPartyForCookies() =0; - - /// - // Get the URL to the first party for cookies used in combination with - // CefURLRequest. - /// - /*--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,no_debugct_check)--*/ -class CefPostData : public virtual CefBase { - public: - typedef std::vector > ElementVector; - - /// - // Create a new CefPostData object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // 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 element) =0; - - /// - // Add the specified post data element. Returns true if the add succeeds. - /// - /*--cef()--*/ - virtual bool AddElement(CefRefPtr 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,no_debugct_check)--*/ -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 Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // 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_ diff --git a/cef/include/cef_request_handler.h b/cef/include/cef_request_handler.h deleted file mode 100644 index e01f89189..000000000 --- a/cef/include/cef_request_handler.h +++ /dev/null @@ -1,208 +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_frame.h" -#include "include/cef_resource_handler.h" -#include "include/cef_response.h" -#include "include/cef_request.h" -#include "include/cef_web_plugin.h" - -/// -// Callback interface used for asynchronous continuation of authentication -// requests. -/// -/*--cef(source=library)--*/ -class CefAuthCallback : public virtual CefBase { - public: - /// - // Continue the authentication request. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(const CefString& username, - const CefString& password) =0; - - /// - // Cancel the authentication request. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// Callback interface used for asynchronous continuation of quota requests. -/// -/*--cef(source=library)--*/ -class CefQuotaCallback : public virtual CefBase { - public: - /// - // Continue the quota request. If |allow| is true the request will be - // allowed. Otherwise, the request will be denied. - /// - /*--cef(capi_name=cont)--*/ - virtual void Continue(bool allow) =0; - - /// - // Cancel the quota request. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - - -/// -// 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: - /// - // Called on the IO thread before a resource request is loaded. The |request| - // object may be modified. To cancel the request return true otherwise return - // false. - /// - /*--cef()--*/ - virtual bool OnBeforeResourceLoad(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request) { - return false; - } - - /// - // Called on the IO thread before a resource is loaded. To allow the resource - // to load normally return NULL. To specify a handler for the resource return - // a CefResourceHandler object. The |request| object should not be modified in - // this callback. - /// - /*--cef()--*/ - virtual CefRefPtr GetResourceHandler( - CefRefPtr browser, - CefRefPtr frame, - CefRefPtr request) { - return NULL; - } - - /// - // 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 browser, - CefRefPtr frame, - const CefString& old_url, - CefString& new_url) {} - - /// - // 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| contains the port number. Return true to continue the - // request and call CefAuthCallback::Continue() when the authentication - // information is available. Return false to cancel the request. - /// - /*--cef(optional_param=realm)--*/ - virtual bool GetAuthCredentials(CefRefPtr browser, - CefRefPtr frame, - bool isProxy, - const CefString& host, - int port, - const CefString& realm, - const CefString& scheme, - CefRefPtr callback) { - return false; - } - - /// - // Called on the IO thread when JavaScript requests a specific storage quota - // size via the webkitStorageInfo.requestQuota function. |origin_url| is the - // origin of the page making the request. |new_size| is the requested quota - // size in bytes. Return true and call CefQuotaCallback::Continue() either in - // this function or at a later time to grant or deny the request. Return false - // to cancel the request. - /// - /*--cef(optional_param=realm)--*/ - virtual bool OnQuotaRequest(CefRefPtr browser, - const CefString& origin_url, - int64 new_size, - CefRefPtr callback) { - 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 GetCookieManager( - CefRefPtr browser, - const CefString& main_url) { return NULL; } - - /// - // Called on the UI thread to handle requests for URLs with an unknown - // protocol component. Set |allow_os_execution| to true to attempt execution - // via the registered OS protocol handler, if any. - // SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED - // ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION. - /// - /*--cef()--*/ - virtual void OnProtocolExecution(CefRefPtr browser, - const CefString& url, - bool& allow_os_execution) {} - - /// - // Called on the browser process IO thread before a plugin is loaded. Return - // true to block loading of the plugin. - /// - /*--cef(optional_param=url,optional_param=policy_url)--*/ - virtual bool OnBeforePluginLoad(CefRefPtr browser, - const CefString& url, - const CefString& policy_url, - CefRefPtr info) { - return false; - } -}; - -#endif // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_ diff --git a/cef/include/cef_resource_bundle_handler.h b/cef/include/cef_resource_bundle_handler.h deleted file mode 100644 index 2cd39a5eb..000000000 --- a/cef/include/cef_resource_bundle_handler.h +++ /dev/null @@ -1,73 +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. - // Supported message IDs are listed in cef_pack_strings.h. - /// - /*--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. Supported resource IDs are listed in cef_pack_resources.h. - /// - /*--cef()--*/ - virtual bool GetDataResource(int resource_id, - void*& data, - size_t& data_size) =0; -}; - -#endif // CEF_INCLUDE_CEF_RESOURCE_BUNDLE_HANDLER_H_ diff --git a/cef/include/cef_resource_handler.h b/cef/include/cef_resource_handler.h deleted file mode 100644 index 57c8b7fc0..000000000 --- a/cef/include/cef_resource_handler.h +++ /dev/null @@ -1,116 +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_HANDLER_H_ -#define CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_callback.h" -#include "include/cef_cookie.h" -#include "include/cef_request.h" -#include "include/cef_response.h" - -/// -// Class used to implement a custom request handler interface. The methods of -// this class will always be called on the IO thread. -/// -/*--cef(source=client)--*/ -class CefResourceHandler : public virtual CefBase { - public: - /// - // Begin processing the request. To handle the request return true and call - // CefCallback::Continue() once the response header information is available - // (CefCallback::Continue() 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 request, - CefRefPtr 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 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 CefCallback::Continue() 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 callback) =0; - - /// - // Return true if the specified cookie can be sent with the request or false - // otherwise. If false is returned for any cookie then no cookies will be sent - // with the request. - /// - /*--cef()--*/ - virtual bool CanGetCookie(const CefCookie& cookie) { return true; } - - /// - // Return true if the specified cookie returned with the response can be set - // or false otherwise. - /// - /*--cef()--*/ - virtual bool CanSetCookie(const CefCookie& cookie) { return true; } - - /// - // Request processing has been canceled. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -#endif // CEF_INCLUDE_CEF_RESOURCE_HANDLER_H_ diff --git a/cef/include/cef_response.h b/cef/include/cef_response.h deleted file mode 100644 index 32fbef1b0..000000000 --- a/cef/include/cef_response.h +++ /dev/null @@ -1,120 +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_RESPONSE_H_ -#define CEF_INCLUDE_CEF_RESPONSE_H_ -#pragma once - -#include "include/cef_base.h" -#include - -/// -// Class used to represent a web response. The methods of this class may be -// called on any thread. -/// -/*--cef(source=library,no_debugct_check)--*/ -class CefResponse : public virtual CefBase { - public: - typedef std::multimap HeaderMap; - - /// - // Create a new CefResponse object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is read-only. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // 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_ diff --git a/cef/include/cef_runnable.h b/cef/include/cef_runnable.h deleted file mode 100644 index 37ad0efe2..000000000 --- a/cef/include/cef_runnable.h +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright (c) 2013 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 -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 { \ - 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 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() { - if (obj_) - DispatchToMethod(obj_, meth_, params_); - } - - private: - T* obj_; - Method meth_; - Params params_; - CefRunnableMethodTraits traits_; - - IMPLEMENT_REFCOUNTING(CefRunnableMethod); -}; - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method) { - return new CefRunnableMethod(object, method, MakeTuple()); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a) { - return new CefRunnableMethod >(object, - method, - MakeTuple(a)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b) { - return new CefRunnableMethod >(object, method, - MakeTuple(a, b)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b, - const C& c) { - return new CefRunnableMethod >(object, method, - MakeTuple(a, b, - c)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b, - const C& c, const D& d) { - return new CefRunnableMethod >(object, method, - MakeTuple(a, b, - c, - d)); -} - -template -inline CefRefPtr NewCefRunnableMethod(T* object, Method method, - const A& a, const B& b, - const C& c, const D& d, - const E& e) { - return new CefRunnableMethod >(object, - method, - MakeTuple(a, b, c, d, - e)); -} - -template -inline CefRefPtr 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 >(object, - method, - MakeTuple(a, b, c, d, - e, f)); -} - -template -inline CefRefPtr 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 >(object, - method, - MakeTuple(a, b, c, - d, e, f, - g)); -} - -// CefRunnableFunction and NewCefRunnableFunction implementation -------------- - -template -class CefRunnableFunction : public CefTask { - public: - CefRunnableFunction(Function function, const Params& params) - : function_(function), params_(params) { - } - - ~CefRunnableFunction() { - } - - virtual void Execute() { - if (function_) - DispatchToFunction(function_, params_); - } - - private: - Function function_; - Params params_; - - IMPLEMENT_REFCOUNTING(CefRunnableFunction); -}; - -template -inline CefRefPtr NewCefRunnableFunction(Function function) { - return new CefRunnableFunction(function, MakeTuple()); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a) { - return new CefRunnableFunction >(function, MakeTuple(a)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b) { - return new CefRunnableFunction >(function, - MakeTuple(a, b)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b, - const C& c) { - return new CefRunnableFunction >(function, - MakeTuple(a, b, - c)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d) { - return new CefRunnableFunction >(function, - MakeTuple(a, b, - c, - d)); -} - -template -inline CefRefPtr NewCefRunnableFunction(Function function, - const A& a, const B& b, - const C& c, const D& d, - const E& e) { - return new CefRunnableFunction >(function, - MakeTuple(a, b, c, d, e)); -} - -template -inline CefRefPtr 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, - MakeTuple(a, b, c, d, e, f)); -} - -template -inline CefRefPtr 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, MakeTuple(a, b, c, d, e, f, g)); -} - -template -inline CefRefPtr 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, MakeTuple(a, b, c, d, e, f, g, h)); -} - -#endif // CEF_INCLUDE_CEF_RUNNABLE_H_ diff --git a/cef/include/cef_scheme.h b/cef/include/cef_scheme.h deleted file mode 100644 index 58eae5f69..000000000 --- a/cef/include/cef_scheme.h +++ /dev/null @@ -1,159 +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_SCHEME_H_ -#define CEF_INCLUDE_CEF_SCHEME_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_browser.h" -#include "include/cef_frame.h" -#include "include/cef_request.h" -#include "include/cef_response.h" -#include "include/cef_resource_handler.h" - -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 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: - //
-  //  [scheme]://[username]:[password]@[host]:[port]/[url-path]
-  // 
- // 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 CefResourceHandler instances for handling scheme requests. -// 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 resource handler instance to handle the request. |browser| - // and |frame| will be the browser window and frame respectively that - // originated the request or NULL if the request did not originate from a - // browser window (for example, if the request came from CefURLRequest). The - // |request| object passed to this method will not contain cookie data. - /// - /*--cef(optional_param=browser,optional_param=frame)--*/ - virtual CefRefPtr Create( - CefRefPtr browser, - CefRefPtr frame, - const CefString& scheme_name, - CefRefPtr request) =0; -}; - -#endif // CEF_INCLUDE_CEF_SCHEME_H_ diff --git a/cef/include/cef_stream.h b/cef/include/cef_stream.h deleted file mode 100644 index 6ccec8dec..000000000 --- a/cef/include/cef_stream.h +++ /dev/null @@ -1,210 +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_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 CreateForFile(const CefString& fileName); - /// - // Create a new CefStreamReader object from data. - /// - /*--cef()--*/ - static CefRefPtr CreateForData(void* data, size_t size); - /// - // Create a new CefStreamReader object from a custom handler. - /// - /*--cef()--*/ - static CefRefPtr CreateForHandler( - CefRefPtr 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 CreateForFile(const CefString& fileName); - /// - // Create a new CefStreamWriter object for a custom handler. - /// - /*--cef()--*/ - static CefRefPtr CreateForHandler( - CefRefPtr 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_ diff --git a/cef/include/cef_string_visitor.h b/cef/include/cef_string_visitor.h deleted file mode 100644 index 79c9b1cbc..000000000 --- a/cef/include/cef_string_visitor.h +++ /dev/null @@ -1,55 +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_STRING_VISITOR_H_ -#define CEF_INCLUDE_CEF_STRING_VISITOR_H_ - -#include "include/cef_base.h" - -/// -// Implement this interface to receive string values asynchronously. -/// -/*--cef(source=client)--*/ -class CefStringVisitor : public virtual CefBase { - public: - /// - // Method that will be executed. - /// - /*--cef()--*/ - virtual void Visit(const CefString& string) =0; -}; - -#endif // CEF_INCLUDE_CEF_STRING_VISITOR_H_ diff --git a/cef/include/cef_task.h b/cef/include/cef_task.h deleted file mode 100644 index 0ecaa7526..000000000 --- a/cef/include/cef_task.h +++ /dev/null @@ -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. -// -// --------------------------------------------------------------------------- -// -// 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" - -typedef cef_thread_id_t CefThreadId; - -/// -// Implement this interface for asynchronous task execution. If the task is -// posted successfully and if the associated message loop is still running then -// the Execute() method will be called on the target thread. If the task fails -// to post then the task object may be destroyed on the source thread instead of -// the target thread. For this reason be cautious when performing work in the -// task object destructor. -/// -/*--cef(source=client)--*/ -class CefTask : public virtual CefBase { - public: - /// - // Method that will be executed on the target thread. - /// - /*--cef()--*/ - virtual void Execute() =0; -}; - -/// -// Class that asynchronously executes tasks on the associated thread. It is safe -// to call the methods of this class on any thread. -// -// CEF maintains multiple internal threads that are used for handling different -// types of tasks in different processes. The cef_thread_id_t definitions in -// cef_types.h list the common CEF threads. Task runners are also available for -// other CEF threads as appropriate (for example, V8 WebWorker threads). -/// -/*--cef(source=library)--*/ -class CefTaskRunner : public virtual CefBase { - public: - /// - // Returns the task runner for the current thread. Only CEF threads will have - // task runners. An empty reference will be returned if this method is called - // on an invalid thread. - /// - /*--cef()--*/ - static CefRefPtr GetForCurrentThread(); - - /// - // Returns the task runner for the specified CEF thread. - /// - /*--cef()--*/ - static CefRefPtr GetForThread(CefThreadId threadId); - - /// - // Returns true if this object is pointing to the same task runner as |that| - // object. - /// - /*--cef()--*/ - virtual bool IsSame(CefRefPtr that) =0; - - /// - // Returns true if this task runner belongs to the current thread. - /// - /*--cef()--*/ - virtual bool BelongsToCurrentThread() =0; - - /// - // Returns true if this task runner is for the specified CEF thread. - /// - /*--cef()--*/ - virtual bool BelongsToThread(CefThreadId threadId) =0; - - /// - // Post a task for execution on the thread associated with this task runner. - // Execution will occur asynchronously. - /// - /*--cef()--*/ - virtual bool PostTask(CefRefPtr task) =0; - - /// - // Post a task for delayed execution on the thread associated with this task - // runner. Execution will occur asynchronously. Delayed tasks are not - // supported on V8 WebWorker threads and will be executed without the - // specified delay. - /// - /*--cef()--*/ - virtual bool PostDelayedTask(CefRefPtr task, int64 delay_ms) =0; -}; - - -/// -// Returns true if called on the specified thread. Equivalent to using -// CefTaskRunner::GetForThread(threadId)->BelongsToCurrentThread(). -/// -/*--cef()--*/ -bool CefCurrentlyOn(CefThreadId threadId); - -/// -// Post a task for execution on the specified thread. Equivalent to -// using CefTaskRunner::GetForThread(threadId)->PostTask(task). -/// -/*--cef()--*/ -bool CefPostTask(CefThreadId threadId, CefRefPtr task); - -/// -// Post a task for delayed execution on the specified thread. Equivalent to -// using CefTaskRunner::GetForThread(threadId)->PostDelayedTask(task, delay_ms). -/// -/*--cef()--*/ -bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr task, - int64 delay_ms); - - -#endif // CEF_INCLUDE_CEF_TASK_H_ diff --git a/cef/include/cef_trace.h b/cef/include/cef_trace.h deleted file mode 100644 index 08c8e30b9..000000000 --- a/cef/include/cef_trace.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. Portons copyright (c) 2012 -// 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 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. -// - -// See cef_trace_event.h for trace macros and additonal documentation. - -#ifndef CEF_INCLUDE_CEF_TRACE_H_ -#define CEF_INCLUDE_CEF_TRACE_H_ -#pragma once - -#include "include/cef_base.h" - -/// -// Implement this interface to receive trace notifications. The methods of this -// class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefTraceClient : public virtual CefBase { - public: - /// - // Called 0 or more times between CefBeginTracing and OnEndTracingComplete - // with a UTF8 JSON |fragment| of the specified |fragment_size|. Do not keep - // a reference to |fragment|. - /// - /*--cef()--*/ - virtual void OnTraceDataCollected(const char* fragment, - size_t fragment_size) {} - - /// - // Called in response to CefGetTraceBufferPercentFullAsync. - /// - /*--cef()--*/ - virtual void OnTraceBufferPercentFullReply(float percent_full) {} - - /// - // Called after all processes have sent their trace data. - /// - /*--cef()--*/ - virtual void OnEndTracingComplete() {} -}; - - -/// -// Start tracing events on all processes. Tracing begins immediately locally, -// and asynchronously on child processes as soon as they receive the -// BeginTracing request. -// -// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is -// pending, CefBeginTracing will fail and return false. -// -// |categories| is a comma-delimited list of category wildcards. A category can -// have an optional '-' prefix to make it an excluded category. Having both -// included and excluded categories in the same list is not supported. -// -// Example: "test_MyTest*" -// Example: "test_MyTest*,test_OtherStuff" -// Example: "-excluded_category1,-excluded_category2" -// -// This function must be called on the browser process UI thread. -/// -/*--cef(optional_param=client,optional_param=categories)--*/ -bool CefBeginTracing(CefRefPtr client, - const CefString& categories); - -/// -// Get the maximum trace buffer percent full state across all processes. -// -// CefTraceClient::OnTraceBufferPercentFullReply will be called asynchronously -// after the value is determibed. When any child process reaches 100% full -// tracing will end automatically and CefTraceClient::OnEndTracingComplete -// will be called. This function fails and returns false if trace is ending or -// disabled, no CefTraceClient was passed to CefBeginTracing, or if a previous -// call to CefGetTraceBufferPercentFullAsync is pending. -// -// This function must be called on the browser process UI thread. -/// -/*--cef()--*/ -bool CefGetTraceBufferPercentFullAsync(); - -/// -// Stop tracing events on all processes. -// -// This function will fail and return false if a previous call to -// CefEndTracingAsync is already pending or if CefBeginTracing was not called. -// -// This function must be called on the browser process UI thread. -/// -/*--cef()--*/ -bool CefEndTracingAsync(); - -#endif // CEF_INCLUDE_CEF_TRACE_H_ diff --git a/cef/include/cef_trace_event.h b/cef/include/cef_trace_event.h deleted file mode 100644 index 7fee2183f..000000000 --- a/cef/include/cef_trace_event.h +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. Portions copyright (c) 2012 -// 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. - -/// -// Trace events are for tracking application performance and resource usage. -// Macros are provided to track: -// Begin and end of function calls -// Counters -// -// Events are issued against categories. Whereas LOG's categories are statically -// defined, TRACE categories are created implicitly with a string. For example: -// CEF_TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent") -// -// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope: -// CEF_TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly") -// doSomethingCostly() -// CEF_TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly") -// Note: Our tools can't always determine the correct BEGIN/END pairs unless -// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you -// need them to be in separate scopes. -// -// A common use case is to trace entire function scopes. This issues a trace -// BEGIN and END automatically: -// void doSomethingCostly() { -// CEF_TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly"); -// ... -// } -// -// Additional parameters can be associated with an event: -// void doSomethingCostly2(int howMuch) { -// CEF_TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly", -// "howMuch", howMuch); -// ... -// } -// -// The trace system will automatically add to this information the current -// process id, thread id, and a timestamp in microseconds. -// -// To trace an asynchronous procedure such as an IPC send/receive, use -// ASYNC_BEGIN and ASYNC_END: -// [single threaded sender code] -// static int send_count = 0; -// ++send_count; -// CEF_TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count); -// Send(new MyMessage(send_count)); -// [receive code] -// void OnMyMessage(send_count) { -// CEF_TRACE_EVENT_ASYNC_END0("ipc", "message", send_count); -// } -// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs. -// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process. -// Pointers can be used for the ID parameter, and they will be mangled -// internally so that the same pointer on two different processes will not -// match. For example: -// class MyTracedClass { -// public: -// MyTracedClass() { -// CEF_TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this); -// } -// ~MyTracedClass() { -// CEF_TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this); -// } -// } -// -// The trace event also supports counters, which is a way to track a quantity -// as it varies over time. Counters are created with the following macro: -// CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue); -// -// Counters are process-specific. The macro itself can be issued from any -// thread, however. -// -// Sometimes, you want to track two counters at once. You can do this with two -// counter macros: -// CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]); -// CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]); -// Or you can do it with a combined macro: -// CEF_TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter", -// "bytesPinned", g_myCounterValue[0], -// "bytesAllocated", g_myCounterValue[1]); -// This indicates to the tracing UI that these counters should be displayed -// in a single graph, as a summed area chart. -// -// Since counters are in a global namespace, you may want to disembiguate with a -// unique ID, by using the CEF_TRACE_COUNTER_ID* variations. -// -// By default, trace collection is compiled in, but turned off at runtime. -// Collecting trace data is the responsibility of the embedding application. In -// CEF's case, calling BeginTracing will turn on tracing on all active -// processes. -// -// -// Memory scoping note: -// Tracing copies the pointers, not the string content, of the strings passed -// in for category, name, and arg_names. Thus, the following code will cause -// problems: -// char* str = strdup("impprtantName"); -// CEF_TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD! -// free(str); // Trace system now has dangling pointer -// -// To avoid this issue with the |name| and |arg_name| parameters, use the -// CEF_TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime -// overhead. -// Notes: The category must always be in a long-lived char* (i.e. static const). -// The |arg_values|, when used, are always deep copied with the _COPY -// macros. -// -// -// Thread Safety: -// All macros are thread safe and can be used from any process. -/// - -#ifndef CEF_INCLUDE_CEF_TRACE_EVENT_H_ -#define CEF_INCLUDE_CEF_TRACE_EVENT_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Functions for tracing counters and functions; called from macros. -// - |category| string must have application lifetime (static or literal). They -// may not include "(quotes) chars. -// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters -// and represent pairs of name and values of arguments -// - |copy| is used to avoid memory scoping issues with the |name| and -// |arg_name| parameters by copying them -// - |id| is used to disambiguate counters with the same name, or match async -// trace events - -CEF_EXPORT void cef_trace_event(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val); -CEF_EXPORT void cef_trace_event_instant(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_event_begin(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_event_end(const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_counter(const char* category, - const char* name, - const char* value1_name, - uint64 value1_val, - const char* value2_name, - uint64 value2_val, - int copy); -CEF_EXPORT void cef_trace_counter_id(const char* category, - const char* name, - uint64 id, - const char* value1_name, - uint64 value1_val, - const char* value2_name, - uint64 value2_val, - int copy); -CEF_EXPORT void cef_trace_event_async_begin(const char* category, - const char* name, - uint64 id, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); -CEF_EXPORT void cef_trace_event_async_step(const char* category, - const char* name, - uint64 id, - uint64 step, - const char* arg1_name, - uint64 arg1_val, - int copy); -CEF_EXPORT void cef_trace_event_async_end(const char* category, - const char* name, - uint64 id, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val, - int copy); - -#ifdef __cplusplus -} -#endif - -// Records a pair of begin and end events called "name" for the current -// scope, with 0, 1 or 2 associated arguments. If the category is not -// enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_EVENT0(category, name) \ - cef_trace_event(category, name, NULL, 0, NULL, 0) -#define CEF_TRACE_EVENT1(category, name, arg1_name, arg1_val) \ - cef_trace_event(category, name, arg1_name, arg1_val, NULL, 0) -#define CEF_TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val) \ - cef_trace_event(category, name, arg1_name, arg1_val, arg2_name, arg2_val) - -// Records a single event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_EVENT_INSTANT0(category, name) \ - cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false) -#define CEF_TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false) -#define CEF_TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, false) -#define CEF_TRACE_EVENT_COPY_INSTANT0(category, name) \ - cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, true) - -// Records a single BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_EVENT_BEGIN0(category, name) \ - cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false) -#define CEF_TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false) -#define CEF_TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, false) -#define CEF_TRACE_EVENT_COPY_BEGIN0(category, name) \ - cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, true) - -// Records a single END event for "name" immediately. If the category -// is not enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_EVENT_END0(category, name) \ - cef_trace_event_end(category, name, NULL, 0, NULL, 0, false) -#define CEF_TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false) -#define CEF_TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, false) -#define CEF_TRACE_EVENT_COPY_END0(category, name) \ - cef_trace_event_end(category, name, NULL, 0, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \ - arg2_val, true) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_COUNTER1(category, name, value) \ - cef_trace_counter(category, name, NULL, value, NULL, 0, false) -#define CEF_TRACE_COPY_COUNTER1(category, name, value) \ - cef_trace_counter(category, name, NULL, value, NULL, 0, true) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_COUNTER2(category, name, value1_name, value1_val, \ - value2_name, value2_val) \ - cef_trace_counter(category, name, value1_name, value1_val, value2_name, \ - value2_val, false) -#define CEF_TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \ - value2_name, value2_val) \ - cef_trace_counter(category, name, value1_name, value1_val, value2_name, \ - value2_val, true) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the -// bits will be xored with a hash of the process ID so that the same pointer -// on two different processes will not collide. -#define CEF_TRACE_COUNTER_ID1(category, name, id, value) \ - cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false) -#define CEF_TRACE_COPY_COUNTER_ID1(category, name, id, value) \ - cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the -// bits will be xored with a hash of the process ID so that the same pointer -// on two different processes will not collide. -#define CEF_TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \ - value2_name, value2_val) \ - cef_trace_counter_id(category, name, id, value1_name, value1_val, \ - value2_name, value2_val, false) -#define CEF_TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \ - value1_val, value2_name, value2_val) \ - cef_trace_counter_id(category, name, id, value1_name, value1_val, \ - value2_name, value2_val, true) - - -// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. -// ASYNC events are considered to match if their category, name and id values -// all match. |id| must either be a pointer or an integer value up to 64 -// bits. If it's a pointer, the bits will be xored with a hash of the process -// ID sothat the same pointer on two different processes will not collide. -// An asynchronous operation can consist of multiple phases. The first phase is -// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the -// ASYNC_STEP_BEGIN macros. When the operation completes, call ASYNC_END. -// An async operation can span threads and processes, but all events in that -// operation must use the same |name| and |id|. Each event can have its own -// args. -#define CEF_TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \ - cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false) -#define CEF_TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \ - 0, false) -#define CEF_TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, false) -#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \ - cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \ - arg1_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \ - 0, true) -#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, true) - -// Records a single ASYNC_STEP event for |step| immediately. If the category -// is not enabled, then this does nothing. The |name| and |id| must match the -// ASYNC_BEGIN event above. The |step| param identifies this step within the -// async event. This should be called at the beginning of the next phase of an -// asynchronous operation. -#define CEF_TRACE_EVENT_ASYNC_STEP0(category, name, id, step) \ - cef_trace_event_async_step(category, name, id, step, NULL, 0, false) -#define CEF_TRACE_EVENT_ASYNC_STEP1(category, name, id, step, \ - arg1_name, arg1_val) \ - cef_trace_event_async_step(category, name, id, step, arg1_name, arg1_val, \ - false) -#define CEF_TRACE_EVENT_COPY_ASYNC_STEP0(category, name, id, step) \ - cef_trace_event_async_step(category, name, id, step, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_ASYNC_STEP1(category, name, id, step, \ - arg1_name, arg1_val) \ - cef_trace_event_async_step(category, name, id, step, arg1_name, arg1_val, \ - true) - -// Records a single ASYNC_END event for "name" immediately. If the category -// is not enabled, then this does nothing. -#define CEF_TRACE_EVENT_ASYNC_END0(category, name, id) \ - cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false) -#define CEF_TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \ - false) -#define CEF_TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, false) -#define CEF_TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \ - cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true) -#define CEF_TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \ - arg1_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \ - true) -#define CEF_TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val, true) - -#endif // CEF_INCLUDE_CEF_TRACE_EVENT_H_ diff --git a/cef/include/cef_url.h b/cef/include/cef_url.h deleted file mode 100644 index c5cb21aaf..000000000 --- a/cef/include/cef_url.h +++ /dev/null @@ -1,60 +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_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_ diff --git a/cef/include/cef_urlrequest.h b/cef/include/cef_urlrequest.h deleted file mode 100644 index 069d2668c..000000000 --- a/cef/include/cef_urlrequest.h +++ /dev/null @@ -1,159 +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_URLREQUEST_H_ -#define CEF_INCLUDE_CEF_URLREQUEST_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_request.h" -#include "include/cef_response.h" - -class CefURLRequestClient; - -/// -// Class used to make a URL request. URL requests are not associated with a -// browser instance so no CefClient callbacks will be executed. URL requests -// can be created on any valid CEF thread in either the browser or render -// process. Once created the methods of the URL request object must be accessed -// on the same thread that created it. -/// -/*--cef(source=library)--*/ -class CefURLRequest : public virtual CefBase { - public: - typedef cef_urlrequest_status_t Status; - typedef cef_errorcode_t ErrorCode; - - /// - // Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request - // methods are supported. The |request| object will be marked as read-only - // after calling this method. - /// - /*--cef()--*/ - static CefRefPtr Create( - CefRefPtr request, - CefRefPtr client); - - /// - // Returns the request object used to create this URL request. The returned - // object is read-only and should not be modified. - /// - /*--cef()--*/ - virtual CefRefPtr GetRequest() =0; - - /// - // Returns the client. - /// - /*--cef()--*/ - virtual CefRefPtr GetClient() =0; - - /// - // Returns the request status. - /// - /*--cef(default_retval=UR_UNKNOWN)--*/ - virtual Status GetRequestStatus() =0; - - /// - // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 - // otherwise. - /// - /*--cef(default_retval=ERR_NONE)--*/ - virtual ErrorCode GetRequestError() =0; - - /// - // Returns the response, or NULL if no response information is available. - // Response information will only be available after the upload has completed. - // The returned object is read-only and should not be modified. - /// - /*--cef()--*/ - virtual CefRefPtr GetResponse() =0; - - /// - // Cancel the request. - /// - /*--cef()--*/ - virtual void Cancel() =0; -}; - -/// -// Interface that should be implemented by the CefURLRequest client. The -// methods of this class will be called on the same thread that created the -// request. -/// -/*--cef(source=client)--*/ -class CefURLRequestClient : public virtual CefBase { - public: - /// - // Notifies the client that the request has completed. Use the - // CefURLRequest::GetRequestStatus method to determine if the request was - // successful or not. - /// - /*--cef()--*/ - virtual void OnRequestComplete(CefRefPtr request) =0; - - /// - // Notifies the client of upload progress. |current| denotes the number of - // bytes sent so far and |total| is the total size of uploading data (or -1 if - // chunked upload is enabled). This method will only be called if the - // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. - /// - /*--cef()--*/ - virtual void OnUploadProgress(CefRefPtr request, - uint64 current, - uint64 total) =0; - - /// - // Notifies the client of download progress. |current| denotes the number of - // bytes received up to the call and |total| is the expected total size of the - // response (or -1 if not determined). - /// - /*--cef()--*/ - virtual void OnDownloadProgress(CefRefPtr request, - uint64 current, - uint64 total) =0; - - /// - // Called when some part of the response is read. |data| contains the current - // bytes received since the last call. This method will not be called if the - // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. - /// - /*--cef()--*/ - virtual void OnDownloadData(CefRefPtr request, - const void* data, - size_t data_length) =0; -}; - -#endif // CEF_INCLUDE_CEF_URLREQUEST_H_ diff --git a/cef/include/cef_v8.h b/cef/include/cef_v8.h deleted file mode 100644 index 3f05b802e..000000000 --- a/cef/include/cef_v8.h +++ /dev/null @@ -1,879 +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_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 "include/cef_task.h" -#include - -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 -// only be called on the render process main thread. -// -// Example JavaScript extension code: -//
-//   // 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;
-//     };
-//   })();
-// 
-// Example usage in the page: -//
-//   // 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();
-// 
-/// -/*--cef(optional_param=handler)--*/ -bool CefRegisterExtension(const CefString& extension_name, - const CefString& javascript_code, - CefRefPtr handler); - - -/// -// Class representing a V8 context handle. V8 handles can only be accessed from -// the thread on which they are created. Valid threads for creating a V8 handle -// include the render process main thread (TID_RENDERER) and WebWorker threads. -// A task runner for posting tasks on the associated thread can be retrieved via -// the CefV8Context::GetTaskRunner() method. -/// -/*--cef(source=library)--*/ -class CefV8Context : public virtual CefBase { - public: - /// - // Returns the current (top) context object in the V8 context stack. - /// - /*--cef()--*/ - static CefRefPtr GetCurrentContext(); - - /// - // Returns the entered (bottom) context object in the V8 context stack. - /// - /*--cef()--*/ - static CefRefPtr GetEnteredContext(); - - /// - // Returns true if V8 is currently inside a context. - /// - /*--cef()--*/ - static bool InContext(); - - /// - // Returns the task runner associated with this context. V8 handles can only - // be accessed from the thread on which they are created. This method can be - // called on any render process thread. - /// - /*--cef()--*/ - virtual CefRefPtr GetTaskRunner() =0; - - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. Do not call any other methods if this method returns - // false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns the browser for this context. This method will return an empty - // reference for WebWorker contexts. - /// - /*--cef()--*/ - virtual CefRefPtr GetBrowser() =0; - - /// - // Returns the frame for this context. This method will return an empty - // reference for WebWorker contexts. - /// - /*--cef()--*/ - virtual CefRefPtr GetFrame() =0; - - /// - // Returns the global object for this context. The context must be entered - // before calling this method. - /// - /*--cef()--*/ - virtual CefRefPtr 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 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& retval, - CefRefPtr& exception) =0; -}; - - -typedef std::vector > CefV8ValueList; - -/// -// Interface that should be implemented to handle V8 function calls. The methods -// of this class will be called on the thread associated with the V8 function. -/// -/*--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 object, - const CefV8ValueList& arguments, - CefRefPtr& 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 be called on the thread associated with the V8 accessor. -/// -/*--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 object, - CefRefPtr& 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 object, - const CefRefPtr value, - CefString& exception) =0; -}; - -/// -// Class representing a V8 exception. The methods of this class may be called on -// any render process thread. -/// -/*--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 handle. V8 handles can only be accessed from -// the thread on which they are created. Valid threads for creating a V8 handle -// include the render process main thread (TID_RENDERER) and WebWorker threads. -// A task runner for posting tasks on the associated thread can be retrieved via -// the CefV8Context::GetTaskRunner() method. -/// -/*--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 CreateUndefined(); - - /// - // Create a new CefV8Value object of type null. - /// - /*--cef()--*/ - static CefRefPtr CreateNull(); - - /// - // Create a new CefV8Value object of type bool. - /// - /*--cef()--*/ - static CefRefPtr CreateBool(bool value); - - /// - // Create a new CefV8Value object of type int. - /// - /*--cef()--*/ - static CefRefPtr CreateInt(int32 value); - - /// - // Create a new CefV8Value object of type unsigned int. - /// - /*--cef()--*/ - static CefRefPtr CreateUInt(uint32 value); - - /// - // Create a new CefV8Value object of type double. - /// - /*--cef()--*/ - static CefRefPtr 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 CreateDate(const CefTime& date); - - /// - // Create a new CefV8Value object of type string. - /// - /*--cef(optional_param=value)--*/ - static CefRefPtr 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 CreateObject(CefRefPtr 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 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 CreateFunction(const CefString& name, - CefRefPtr handler); - - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. 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 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 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 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 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 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 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& 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 user_data) =0; - - /// - // Returns the user data, if any, assigned to this object. - /// - /*--cef()--*/ - virtual CefRefPtr 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 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 ExecuteFunction( - CefRefPtr 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 ExecuteFunctionWithContext( - CefRefPtr context, - CefRefPtr object, - const CefV8ValueList& arguments) =0; -}; - -/// -// Class representing a V8 stack trace handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the CefV8Context::GetTaskRunner() method. -/// -/*--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 GetCurrent(int frame_limit); - - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. 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 GetFrame(int index) =0; -}; - -/// -// Class representing a V8 stack frame handle. V8 handles can only be accessed -// from the thread on which they are created. Valid threads for creating a V8 -// handle include the render process main thread (TID_RENDERER) and WebWorker -// threads. A task runner for posting tasks on the associated thread can be -// retrieved via the CefV8Context::GetTaskRunner() method. -/// -/*--cef(source=library)--*/ -class CefV8StackFrame : public virtual CefBase { - public: - /// - // Returns true if the underlying handle is valid and it can be accessed on - // the current thread. 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_ diff --git a/cef/include/cef_values.h b/cef/include/cef_values.h deleted file mode 100644 index 9a640ab77..000000000 --- a/cef/include/cef_values.h +++ /dev/null @@ -1,471 +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_VALUES_H_ -#define CEF_INCLUDE_CEF_VALUES_H_ -#pragma once - -#include -#include "include/cef_base.h" - -class CefDictionaryValue; -class CefListValue; - -typedef cef_value_type_t CefValueType; - -/// -// Class representing a binary value. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefBinaryValue : public virtual CefBase { - public: - /// - // Creates a new object that is not owned by any other object. The specified - // |data| will be copied. - /// - /*--cef()--*/ - static CefRefPtr Create(const void* data, - size_t data_size); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // method returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if this object is currently owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns a copy of this object. The data in this object will also be copied. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Returns the data size. - /// - /*--cef()--*/ - virtual size_t GetSize() =0; - - /// - // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at - // the specified byte |data_offset|. Returns the number of bytes read. - /// - /*--cef()--*/ - virtual size_t GetData(void* buffer, - size_t buffer_size, - size_t data_offset) =0; -}; - - -/// -// Class representing a dictionary value. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefDictionaryValue : public virtual CefBase { - public: - typedef std::vector KeyList; - - /// - // Creates a new object that is not owned by any other object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // method returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if this object is currently owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. If |exclude_empty_children| is true - // any empty dictionaries or lists will be excluded from the copy. - /// - /*--cef()--*/ - virtual CefRefPtr Copy(bool exclude_empty_children) =0; - - /// - // Returns the number of values. - /// - /*--cef()--*/ - virtual size_t GetSize() =0; - - /// - // Removes all values. Returns true on success. - /// - /*--cef()--*/ - virtual bool Clear() =0; - - /// - // Returns true if the current dictionary has a value for the given key. - /// - /*--cef()--*/ - virtual bool HasKey(const CefString& key) =0; - - /// - // Reads all keys for this dictionary into the specified vector. - /// - /*--cef()--*/ - virtual bool GetKeys(KeyList& keys) =0; - - /// - // Removes the value at the specified key. Returns true is the value was - // removed successfully. - /// - /*--cef()--*/ - virtual bool Remove(const CefString& key) =0; - - /// - // Returns the value type for the specified key. - /// - /*--cef(default_retval=VTYPE_INVALID)--*/ - virtual CefValueType GetType(const CefString& key) =0; - - /// - // Returns the value at the specified key as type bool. - /// - /*--cef()--*/ - virtual bool GetBool(const CefString& key) =0; - - /// - // Returns the value at the specified key as type int. - /// - /*--cef()--*/ - virtual int GetInt(const CefString& key) =0; - - /// - // Returns the value at the specified key as type double. - /// - /*--cef()--*/ - virtual double GetDouble(const CefString& key) =0; - - /// - // Returns the value at the specified key as type string. - /// - /*--cef()--*/ - virtual CefString GetString(const CefString& key) =0; - - /// - // Returns the value at the specified key as type binary. - /// - /*--cef()--*/ - virtual CefRefPtr GetBinary(const CefString& key) =0; - - /// - // Returns the value at the specified key as type dictionary. - /// - /*--cef()--*/ - virtual CefRefPtr GetDictionary(const CefString& key) =0; - - /// - // Returns the value at the specified key as type list. - /// - /*--cef()--*/ - virtual CefRefPtr GetList(const CefString& key) =0; - - /// - // Sets the value at the specified key as type null. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetNull(const CefString& key) =0; - - /// - // Sets the value at the specified key as type bool. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetBool(const CefString& key, bool value) =0; - - /// - // Sets the value at the specified key as type int. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetInt(const CefString& key, int value) =0; - - /// - // Sets the value at the specified key as type double. Returns true if the - // value was set successfully. - /// - /*--cef()--*/ - virtual bool SetDouble(const CefString& key, double value) =0; - - /// - // Sets the value at the specified key as type string. Returns true if the - // value was set successfully. - /// - /*--cef(optional_param=value)--*/ - virtual bool SetString(const CefString& key, const CefString& value) =0; - - /// - // Sets the value at the specified key as type binary. Returns true if the - // value was set successfully. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef()--*/ - virtual bool SetBinary(const CefString& key, - CefRefPtr value) =0; - - /// - // Sets the value at the specified key as type dict. Returns true if the - // value was set successfully. After calling this method the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef()--*/ - virtual bool SetDictionary(const CefString& key, - CefRefPtr value) =0; - - /// - // Sets the value at the specified key as type list. Returns true if the - // value was set successfully. After calling this method the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef()--*/ - virtual bool SetList(const CefString& key, - CefRefPtr value) =0; -}; - - -/// -// Class representing a list value. Can be used on any process and thread. -/// -/*--cef(source=library)--*/ -class CefListValue : public virtual CefBase { - public: - /// - // Creates a new object that is not owned by any other object. - /// - /*--cef()--*/ - static CefRefPtr Create(); - - /// - // Returns true if this object is valid. Do not call any other methods if this - // method returns false. - /// - /*--cef()--*/ - virtual bool IsValid() =0; - - /// - // Returns true if this object is currently owned by another object. - /// - /*--cef()--*/ - virtual bool IsOwned() =0; - - /// - // Returns true if the values of this object are read-only. Some APIs may - // expose read-only objects. - /// - /*--cef()--*/ - virtual bool IsReadOnly() =0; - - /// - // Returns a writable copy of this object. - /// - /*--cef()--*/ - virtual CefRefPtr Copy() =0; - - /// - // Sets the number of values. If the number of values is expanded all - // new value slots will default to type null. Returns true on success. - /// - /*--cef()--*/ - virtual bool SetSize(size_t size) =0; - - /// - // Returns the number of values. - /// - /*--cef()--*/ - virtual size_t GetSize() =0; - - /// - // Removes all values. Returns true on success. - /// - /*--cef()--*/ - virtual bool Clear() =0; - - /// - // Removes the value at the specified index. - /// - /*--cef(index_param=index)--*/ - virtual bool Remove(int index) =0; - - /// - // Returns the value type at the specified index. - /// - /*--cef(default_retval=VTYPE_INVALID,index_param=index)--*/ - virtual CefValueType GetType(int index) =0; - - /// - // Returns the value at the specified index as type bool. - /// - /*--cef(index_param=index)--*/ - virtual bool GetBool(int index) =0; - - /// - // Returns the value at the specified index as type int. - /// - /*--cef(index_param=index)--*/ - virtual int GetInt(int index) =0; - - /// - // Returns the value at the specified index as type double. - /// - /*--cef(index_param=index)--*/ - virtual double GetDouble(int index) =0; - - /// - // Returns the value at the specified index as type string. - /// - /*--cef(index_param=index)--*/ - virtual CefString GetString(int index) =0; - - /// - // Returns the value at the specified index as type binary. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetBinary(int index) =0; - - /// - // Returns the value at the specified index as type dictionary. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetDictionary(int index) =0; - - /// - // Returns the value at the specified index as type list. - /// - /*--cef(index_param=index)--*/ - virtual CefRefPtr GetList(int index) =0; - - /// - // Sets the value at the specified index as type null. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetNull(int index) =0; - - /// - // Sets the value at the specified index as type bool. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetBool(int index, bool value) =0; - - /// - // Sets the value at the specified index as type int. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetInt(int index, int value) =0; - - /// - // Sets the value at the specified index as type double. Returns true if the - // value was set successfully. - /// - /*--cef(index_param=index)--*/ - virtual bool SetDouble(int index, double value) =0; - - /// - // Sets the value at the specified index as type string. Returns true if the - // value was set successfully. - /// - /*--cef(optional_param=value,index_param=index)--*/ - virtual bool SetString(int index, const CefString& value) =0; - - /// - // Sets the value at the specified index as type binary. Returns true if the - // value was set successfully. After calling this method the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef(index_param=index)--*/ - virtual bool SetBinary(int index, CefRefPtr value) =0; - - /// - // Sets the value at the specified index as type dict. Returns true if the - // value was set successfully. After calling this method the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef(index_param=index)--*/ - virtual bool SetDictionary(int index, CefRefPtr value) =0; - - /// - // Sets the value at the specified index as type list. Returns true if the - // value was set successfully. After calling this method the |value| object - // will no longer be valid. If |value| is currently owned by another object - // then the value will be copied and the |value| reference will not change. - // Otherwise, ownership will be transferred to this object and the |value| - // reference will be invalidated. - /// - /*--cef(index_param=index)--*/ - virtual bool SetList(int index, CefRefPtr value) =0; -}; - -#endif // CEF_INCLUDE_CEF_VALUES_H_ diff --git a/cef/include/cef_version.h b/cef/include/cef_version.h deleted file mode 100644 index d747de2f3..000000000 --- a/cef/include/cef_version.h +++ /dev/null @@ -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 is generated by the make_version_header.py tool. -// - -#ifndef CEF_INCLUDE_CEF_VERSION_H_ -#define CEF_INCLUDE_CEF_VERSION_H_ - -#define CEF_VERSION_MAJOR 3 -#define CEF_REVISION 1065 -#define COPYRIGHT_YEAR 2013 - -#define CHROME_VERSION_MAJOR 25 -#define CHROME_VERSION_MINOR 0 -#define CHROME_VERSION_BUILD 1364 -#define CHROME_VERSION_PATCH 45 - -#define DO_MAKE_STRING(p) #p -#define MAKE_STRING(p) DO_MAKE_STRING(p) - -#ifndef APSTUDIO_HIDDEN_SYMBOLS - -#ifdef __cplusplus -extern "C" { -#endif - -#include "internal/cef_export.h" - -/// -// Returns the CEF build revision of the libcef library. -/// -CEF_EXPORT int cef_build_revision(); - -#ifdef __cplusplus -} -#endif - -#endif // APSTUDIO_HIDDEN_SYMBOLS - -#endif // CEF_INCLUDE_CEF_VERSION_H_ diff --git a/cef/include/cef_web_plugin.h b/cef/include/cef_web_plugin.h deleted file mode 100644 index 0ff2b8ea1..000000000 --- a/cef/include/cef_web_plugin.h +++ /dev/null @@ -1,178 +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" -#include "include/cef_browser.h" - -/// -// 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; -}; - -/// -// Interface to implement for visiting web plugin information. The methods of -// this class will be called on the browser process UI thread. -/// -/*--cef(source=client)--*/ -class CefWebPluginInfoVisitor : public virtual CefBase { - public: - /// - // Method that will be called once for each plugin. |count| is the 0-based - // index for the current plugin. |total| is the total number of plugins. - // Return false to stop visiting plugins. This method may never be called if - // no plugins are found. - /// - /*--cef()--*/ - virtual bool Visit(CefRefPtr info, int count, int total) =0; -}; - -/// -// Visit web plugin information. Can be called on any thread in the browser -// process. -/// -/*--cef()--*/ -void CefVisitWebPluginInfo(CefRefPtr visitor); - -/// -// Cause the plugin list to refresh the next time it is accessed regardless -// of whether it has already been loaded. Can be called on any thread in the -// browser process. -/// -/*--cef()--*/ -void CefRefreshWebPlugins(); - -/// -// Add a plugin path (directory + file). This change may not take affect until -// after CefRefreshWebPlugins() is called. Can be called on any thread in the -// browser process. -/// -/*--cef()--*/ -void CefAddWebPluginPath(const CefString& path); - -/// -// Add a plugin directory. This change may not take affect until after -// CefRefreshWebPlugins() is called. Can be called on any thread in the browser -// process. -/// -/*--cef()--*/ -void CefAddWebPluginDirectory(const CefString& dir); - -/// -// Remove a plugin path (directory + file). This change may not take affect -// until after CefRefreshWebPlugins() is called. Can be called on any thread in -// the browser process. -/// -/*--cef()--*/ -void CefRemoveWebPluginPath(const CefString& path); - -/// -// Unregister an internal plugin. This may be undone the next time -// CefRefreshWebPlugins() is called. Can be called on any thread in the browser -// process. -/// -/*--cef()--*/ -void CefUnregisterInternalWebPlugin(const CefString& path); - -/// -// Force a plugin to shutdown. Can be called on any thread in the browser -// process but will be executed on the IO thread. -/// -/*--cef()--*/ -void CefForceWebPluginShutdown(const CefString& path); - -/// -// Register a plugin crash. Can be called on any thread in the browser process -// but will be executed on the IO thread. -/// -/*--cef()--*/ -void CefRegisterWebPluginCrash(const CefString& path); - -/// -// Interface to implement for receiving unstable plugin information. The methods -// of this class will be called on the browser process IO thread. -/// -/*--cef(source=client)--*/ -class CefWebPluginUnstableCallback : public virtual CefBase { - public: - /// - // Method that will be called for the requested plugin. |unstable| will be - // true if the plugin has reached the crash count threshold of 3 times in 120 - // seconds. - /// - /*--cef()--*/ - virtual void IsUnstable(const CefString& path, - bool unstable) =0; -}; - -/// -// Query if a plugin is unstable. Can be called on any thread in the browser -// process. -/// -/*--cef()--*/ -void CefIsWebPluginUnstable(const CefString& path, - CefRefPtr callback); - - -#endif // CEF_INCLUDE_CEF_WEB_PLUGIN_H_ diff --git a/cef/include/cef_xml_reader.h b/cef/include/cef_xml_reader.h deleted file mode 100644 index 86be8bac7..000000000 --- a/cef/include/cef_xml_reader.h +++ /dev/null @@ -1,268 +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_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 Create(CefRefPtr 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. is considered - // empty but 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_ diff --git a/cef/include/cef_zip_reader.h b/cef/include/cef_zip_reader.h deleted file mode 100644 index 1fe02b916..000000000 --- a/cef/include/cef_zip_reader.h +++ /dev/null @@ -1,141 +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_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 Create(CefRefPtr 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_ diff --git a/cef/include/internal/cef_build.h b/cef/include/internal/cef_build.h deleted file mode 100644 index 4b8c54546..000000000 --- a/cef/include/internal/cef_build.h +++ /dev/null @@ -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_ diff --git a/cef/include/internal/cef_export.h b/cef/include/internal/cef_export.h deleted file mode 100644 index d333a5db8..000000000 --- a/cef/include/internal/cef_export.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2009 The Chromium Embedded Framework Authors. 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_EXPORT_H_ -#define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ -#pragma once - -#include "include/internal/cef_build.h" - -#if defined(COMPILER_MSVC) - -#ifdef BUILDING_CEF_SHARED -#define CEF_EXPORT __declspec(dllexport) -#elif USING_CEF_SHARED -#define CEF_EXPORT __declspec(dllimport) -#else -#define CEF_EXPORT -#endif -#define CEF_CALLBACK __stdcall - -#elif defined(COMPILER_GCC) - -#define CEF_EXPORT __attribute__ ((visibility("default"))) -#define CEF_CALLBACK - -#endif // COMPILER_GCC - -#endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ diff --git a/cef/include/internal/cef_linux.h b/cef/include/internal/cef_linux.h deleted file mode 100644 index c7974bec2..000000000 --- a/cef/include/internal/cef_linux.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2010 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_LINUX_H_ -#define CEF_INCLUDE_INTERNAL_CEF_LINUX_H_ -#pragma once - -#if defined(OS_LINUX) -#include -#include "include/internal/cef_types_linux.h" -#include "include/internal/cef_types_wrappers.h" - -// Atomic increment and decrement. -inline long CefAtomicIncrement(long volatile *pDest) { // NOLINT(runtime/int) - return __sync_add_and_fetch(pDest, 1); -} -inline long CefAtomicDecrement(long volatile *pDest) { // NOLINT(runtime/int) - return __sync_sub_and_fetch(pDest, 1); -} - -// Critical section wrapper. -class CefCriticalSection { - public: - CefCriticalSection() { - pthread_mutexattr_init(&attr_); - pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&lock_, &attr_); - } - virtual ~CefCriticalSection() { - pthread_mutex_destroy(&lock_); - pthread_mutexattr_destroy(&attr_); - } - void Lock() { - pthread_mutex_lock(&lock_); - } - void Unlock() { - pthread_mutex_unlock(&lock_); - } - - pthread_mutex_t lock_; - pthread_mutexattr_t attr_; -}; - -// Handle types. -#define CefCursorHandle cef_cursor_handle_t -#define CefEventHandle cef_event_handle_t -#define CefWindowHandle cef_window_handle_t - -struct CefMainArgsTraits { - typedef cef_main_args_t struct_type; - - static inline void init(struct_type* s) {} - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->argc = src->argc; - target->argv = src->argv; - } -}; - -// Class representing CefExecuteProcess arguments. -class CefMainArgs : public CefStructBase { - public: - typedef CefStructBase parent; - - CefMainArgs() : parent() {} - explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {} - explicit CefMainArgs(const CefMainArgs& r) : parent(r) {} - CefMainArgs(int argc_arg, char** argv_arg) : parent() { - argc = argc_arg; - argv = argv_arg; - } -}; - -struct CefWindowInfoTraits { - typedef cef_window_info_t struct_type; - - static inline void init(struct_type* s) {} - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->widget = src->widget; - target->parent_widget = src->parent_widget; - } -}; - -// Class representing window information. -class CefWindowInfo : public CefStructBase { - public: - typedef CefStructBase parent; - - CefWindowInfo() : parent() {} - explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} - explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} - - void SetAsChild(CefWindowHandle ParentWidget) { - parent_widget = ParentWidget; - } -}; - -#endif // OS_LINUX - -#endif // CEF_INCLUDE_INTERNAL_CEF_LINUX_H_ diff --git a/cef/include/internal/cef_mac.h b/cef/include/internal/cef_mac.h deleted file mode 100644 index ddedbce50..000000000 --- a/cef/include/internal/cef_mac.h +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2010 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_MAC_H_ -#define CEF_INCLUDE_INTERNAL_CEF_MAC_H_ -#pragma once - -#if defined(OS_MACOSX) -#include -#include "include/internal/cef_types_mac.h" -#include "include/internal/cef_types_wrappers.h" - -// Atomic increment and decrement. -inline long CefAtomicIncrement(long volatile *pDest) { // NOLINT(runtime/int) - return __sync_add_and_fetch(pDest, 1); -} -inline long CefAtomicDecrement(long volatile *pDest) { // NOLINT(runtime/int) - return __sync_sub_and_fetch(pDest, 1); -} - -// Critical section wrapper. -class CefCriticalSection { - public: - CefCriticalSection() { - pthread_mutexattr_init(&attr_); - pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&lock_, &attr_); - } - virtual ~CefCriticalSection() { - pthread_mutex_destroy(&lock_); - pthread_mutexattr_destroy(&attr_); - } - void Lock() { - pthread_mutex_lock(&lock_); - } - void Unlock() { - pthread_mutex_unlock(&lock_); - } - - pthread_mutex_t lock_; - pthread_mutexattr_t attr_; -}; - -// Handle types. -#define CefCursorHandle cef_cursor_handle_t -#define CefEventHandle cef_event_handle_t -#define CefWindowHandle cef_window_handle_t - -struct CefMainArgsTraits { - typedef cef_main_args_t struct_type; - - static inline void init(struct_type* s) {} - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->argc = src->argc; - target->argv = src->argv; - } -}; - -// Class representing CefExecuteProcess arguments. -class CefMainArgs : public CefStructBase { - public: - typedef CefStructBase parent; - - CefMainArgs() : parent() {} - explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {} - explicit CefMainArgs(const CefMainArgs& r) : parent(r) {} - CefMainArgs(int argc, char** argv) : parent() { - this->argc = argc; - this->argv = argv; - } -}; - -struct CefWindowInfoTraits { - typedef cef_window_info_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->window_name); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->view = src->view; - target->parent_view = src->parent_view; - cef_string_set(src->window_name.str, src->window_name.length, - &target->window_name, copy); - target->x = src->x; - target->y = src->y; - target->width = src->width; - target->height = src->height; - target->hidden = src->hidden; - } -}; - -// Class representing window information. -class CefWindowInfo : public CefStructBase { - public: - typedef CefStructBase parent; - - CefWindowInfo() : parent() {} - explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} - explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} - - void SetAsChild(CefWindowHandle ParentView, int x, int y, int width, - int height) { - parent_view = ParentView; - this->x = x; - this->y = y; - this->width = width; - this->height = height; - hidden = false; - } -}; - -#endif // OS_MACOSX - -#endif // CEF_INCLUDE_INTERNAL_CEF_MAC_H_ diff --git a/cef/include/internal/cef_ptr.h b/cef/include/internal/cef_ptr.h deleted file mode 100644 index fcbe69e5c..000000000 --- a/cef/include/internal/cef_ptr.h +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) 2008 Marshall A. Greenblatt. Portions Copyright (c) -// 2006-2008 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. - - -#ifndef CEF_INCLUDE_INTERNAL_CEF_PTR_H_ -#define CEF_INCLUDE_INTERNAL_CEF_PTR_H_ -#pragma once - -#include - -/// -// Smart pointer implementation borrowed from base/ref_counted.h -//

-// A smart pointer class for reference counted objects. Use this class instead -// of calling AddRef and Release manually on a reference counted object to -// avoid common memory leaks caused by forgetting to Release an object -// reference. Sample usage: -//

-//   class MyFoo : public CefBase {
-//    ...
-//   };
-//
-//   void some_function() {
-//     // The MyFoo object that |foo| represents starts with a single
-//     // reference.
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//     foo->Method(param);
-//     // |foo| is released when this function returns
-//   }
-//
-//   void some_other_function() {
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//     ...
-//     foo = NULL;  // explicitly releases |foo|
-//     ...
-//     if (foo)
-//       foo->Method(param);
-//   }
-// 
-// The above examples show how CefRefPtr<T> acts like a pointer to T. -// Given two CefRefPtr<T> classes, it is also possible to exchange -// references between the two objects, like so: -//
-//   {
-//     CefRefPtr<MyFoo> a = new MyFoo();
-//     CefRefPtr<MyFoo> b;
-//
-//     b.swap(a);
-//     // now, |b| references the MyFoo object, and |a| references NULL.
-//   }
-// 
-// To make both |a| and |b| in the above example reference the same MyFoo -// object, simply use the assignment operator: -//
-//   {
-//     CefRefPtr<MyFoo> a = new MyFoo();
-//     CefRefPtr<MyFoo> b;
-//
-//     b = a;
-//     // now, |a| and |b| each own a reference to the same MyFoo object.
-//     // the reference count of the underlying MyFoo object will be 2.
-//   }
-// 
-// Reference counted objects can also be passed as function parameters and -// used as function return values: -//
-//   void some_func_with_param(CefRefPtr<MyFoo> param) {
-//     // A reference is added to the MyFoo object that |param| represents
-//     // during the scope of some_func_with_param() and released when
-//     // some_func_with_param() goes out of scope.
-//   }
-//
-//   CefRefPtr<MyFoo> some_func_with_retval() {
-//     // The MyFoo object that |foox| represents starts with a single
-//     // reference.
-//     CefRefPtr<MyFoo> foox = new MyFoo();
-//
-//     // Creating the return value adds an additional reference.
-//     return foox;
-//
-//     // When some_func_with_retval() goes out of scope the original |foox|
-//     // reference is released.
-//   }
-//
-//   void and_another_function() {
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//
-//     // pass |foo| as a parameter.
-//     some_function(foo);
-//
-//     CefRefPtr<MyFoo> foo2 = some_func_with_retval();
-//     // Now, since we kept a reference to the some_func_with_retval() return
-//     // value, |foo2| is the only class pointing to the MyFoo object created
-//     in some_func_with_retval(), and it has a reference count of 1.
-//
-//     some_func_with_retval();
-//     // Now, since we didn't keep a reference to the some_func_with_retval()
-//     // return value, the MyFoo object created in some_func_with_retval()
-//     // will automatically be released.
-//   }
-// 
-// And in standard containers: -//
-//   {
-//      // Create a vector that holds MyFoo objects.
-//      std::vector<CefRefPtr<MyFoo> > MyFooVec;
-//
-//     // The MyFoo object that |foo| represents starts with a single
-//     // reference.
-//     CefRefPtr<MyFoo> foo = new MyFoo();
-//
-//     // When the MyFoo object is added to |MyFooVec| the reference count
-//     // is increased to 2.
-//     MyFooVec.push_back(foo);
-//   }
-// 
-//

-/// -template -class CefRefPtr { - public: - CefRefPtr() : ptr_(NULL) { - } - - CefRefPtr(T* p) : ptr_(p) { // NOLINT(runtime/explicit) - if (ptr_) - ptr_->AddRef(); - } - - CefRefPtr(const CefRefPtr& r) : ptr_(r.ptr_) { - if (ptr_) - ptr_->AddRef(); - } - - ~CefRefPtr() { - if (ptr_) - ptr_->Release(); - } - - T* get() const { return ptr_; } - operator T*() const { return ptr_; } - T* operator->() const { return ptr_; } - - CefRefPtr& operator=(T* p) { - // AddRef first so that self assignment should work - if (p) - p->AddRef(); - if (ptr_ ) - ptr_ ->Release(); - ptr_ = p; - return *this; - } - - CefRefPtr& operator=(const CefRefPtr& r) { - return *this = r.ptr_; - } - - void swap(T** pp) { - T* p = ptr_; - ptr_ = *pp; - *pp = p; - } - - void swap(CefRefPtr& r) { - swap(&r.ptr_); // NOLINT(build/include_what_you_use) - } - - private: - T* ptr_; -}; - -#endif // CEF_INCLUDE_INTERNAL_CEF_PTR_H_ diff --git a/cef/include/internal/cef_string.h b/cef/include/internal/cef_string.h deleted file mode 100644 index a7876fe56..000000000 --- a/cef/include/internal/cef_string.h +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2010 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_STRING_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_H_ -#pragma once - -// The CEF interface is built with one string type as the default. Comment out -// all but one of the CEF_STRING_TYPE_* defines below to specify the default. -// If you change the default you MUST recompile all of CEF. - -// Build with the UTF8 string type as default. -// #define CEF_STRING_TYPE_UTF8 1 - -// Build with the UTF16 string type as default. -#define CEF_STRING_TYPE_UTF16 1 - -// Build with the wide string type as default. -// #define CEF_STRING_TYPE_WIDE 1 - - -#include "include/internal/cef_string_types.h" - -#ifdef __cplusplus -#include "include/internal/cef_string_wrappers.h" -#if defined(CEF_STRING_TYPE_UTF16) -typedef CefStringUTF16 CefString; -#elif defined(CEF_STRING_TYPE_UTF8) -typedef CefStringUTF8 CefString; -#elif defined(CEF_STRING_TYPE_WIDE) -typedef CefStringWide CefString; -#endif -#endif // __cplusplus - -#if defined(CEF_STRING_TYPE_UTF8) -typedef char cef_char_t; -typedef cef_string_utf8_t cef_string_t; -typedef cef_string_userfree_utf8_t cef_string_userfree_t; -#define cef_string_set cef_string_utf8_set -#define cef_string_copy cef_string_utf8_copy -#define cef_string_clear cef_string_utf8_clear -#define cef_string_userfree_alloc cef_string_userfree_utf8_alloc -#define cef_string_userfree_free cef_string_userfree_utf8_free -#define cef_string_from_ascii cef_string_utf8_copy -#define cef_string_to_utf8 cef_string_utf8_copy -#define cef_string_from_utf8 cef_string_utf8_copy -#define cef_string_to_utf16 cef_string_utf8_to_utf16 -#define cef_string_from_utf16 cef_string_utf16_to_utf8 -#define cef_string_to_wide cef_string_utf8_to_wide -#define cef_string_from_wide cef_string_wide_to_utf8 -#elif defined(CEF_STRING_TYPE_UTF16) -typedef char16 cef_char_t; -typedef cef_string_userfree_utf16_t cef_string_userfree_t; -typedef cef_string_utf16_t cef_string_t; -#define cef_string_set cef_string_utf16_set -#define cef_string_copy cef_string_utf16_copy -#define cef_string_clear cef_string_utf16_clear -#define cef_string_userfree_alloc cef_string_userfree_utf16_alloc -#define cef_string_userfree_free cef_string_userfree_utf16_free -#define cef_string_from_ascii cef_string_ascii_to_utf16 -#define cef_string_to_utf8 cef_string_utf16_to_utf8 -#define cef_string_from_utf8 cef_string_utf8_to_utf16 -#define cef_string_to_utf16 cef_string_utf16_copy -#define cef_string_from_utf16 cef_string_utf16_copy -#define cef_string_to_wide cef_string_utf16_to_wide -#define cef_string_from_wide cef_string_wide_to_utf16 -#elif defined(CEF_STRING_TYPE_WIDE) -typedef wchar_t cef_char_t; -typedef cef_string_wide_t cef_string_t; -typedef cef_string_userfree_wide_t cef_string_userfree_t; -#define cef_string_set cef_string_wide_set -#define cef_string_copy cef_string_wide_copy -#define cef_string_clear cef_string_wide_clear -#define cef_string_userfree_alloc cef_string_userfree_wide_alloc -#define cef_string_userfree_free cef_string_userfree_wide_free -#define cef_string_from_ascii cef_string_ascii_to_wide -#define cef_string_to_utf8 cef_string_wide_to_utf8 -#define cef_string_from_utf8 cef_string_utf8_to_wide -#define cef_string_to_utf16 cef_string_wide_to_utf16 -#define cef_string_from_utf16 cef_string_utf16_to_wide -#define cef_string_to_wide cef_string_wide_copy -#define cef_string_from_wide cef_string_wide_copy -#else -#error Please choose a string type. -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_H_ diff --git a/cef/include/internal/cef_string_list.h b/cef/include/internal/cef_string_list.h deleted file mode 100644 index 52a0abf2f..000000000 --- a/cef/include/internal/cef_string_list.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2009 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_STRING_LIST_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// CEF string maps are a set of key/value string pairs. -/// -typedef void* cef_string_list_t; - -/// -// Allocate a new string map. -/// -CEF_EXPORT cef_string_list_t cef_string_list_alloc(); - -/// -// Return the number of elements in the string list. -/// -CEF_EXPORT int cef_string_list_size(cef_string_list_t list); - -/// -// Retrieve the value at the specified zero-based string list index. Returns -// true (1) if the value was successfully retrieved. -/// -CEF_EXPORT int cef_string_list_value(cef_string_list_t list, - int index, cef_string_t* value); - -/// -// Append a new value at the end of the string list. -/// -CEF_EXPORT void cef_string_list_append(cef_string_list_t list, - const cef_string_t* value); - -/// -// Clear the string list. -/// -CEF_EXPORT void cef_string_list_clear(cef_string_list_t list); - -/// -// Free the string list. -/// -CEF_EXPORT void cef_string_list_free(cef_string_list_t list); - -/// -// Creates a copy of an existing string list. -/// -CEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ diff --git a/cef/include/internal/cef_string_map.h b/cef/include/internal/cef_string_map.h deleted file mode 100644 index 93eea2a55..000000000 --- a/cef/include/internal/cef_string_map.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2009 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_STRING_MAP_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// CEF string maps are a set of key/value string pairs. -/// -typedef void* cef_string_map_t; - -/// -// Allocate a new string map. -/// -CEF_EXPORT cef_string_map_t cef_string_map_alloc(); - -/// -// Return the number of elements in the string map. -/// -CEF_EXPORT int cef_string_map_size(cef_string_map_t map); - -/// -// Return the value assigned to the specified key. -/// -CEF_EXPORT int cef_string_map_find(cef_string_map_t map, - const cef_string_t* key, - cef_string_t* value); - -/// -// Return the key at the specified zero-based string map index. -/// -CEF_EXPORT int cef_string_map_key(cef_string_map_t map, int index, - cef_string_t* key); - -/// -// Return the value at the specified zero-based string map index. -/// -CEF_EXPORT int cef_string_map_value(cef_string_map_t map, int index, - cef_string_t* value); - -/// -// Append a new key/value pair at the end of the string map. -/// -CEF_EXPORT int cef_string_map_append(cef_string_map_t map, - const cef_string_t* key, - const cef_string_t* value); - -/// -// Clear the string map. -/// -CEF_EXPORT void cef_string_map_clear(cef_string_map_t map); - -/// -// Free the string map. -/// -CEF_EXPORT void cef_string_map_free(cef_string_map_t map); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_ diff --git a/cef/include/internal/cef_string_multimap.h b/cef/include/internal/cef_string_multimap.h deleted file mode 100644 index cd3904244..000000000 --- a/cef/include/internal/cef_string_multimap.h +++ /dev/null @@ -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. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_ -#pragma once - -#include "include/internal/cef_export.h" -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// CEF string multimaps are a set of key/value string pairs. -// More than one value can be assigned to a single key. -/// -typedef void* cef_string_multimap_t; - -/// -// Allocate a new string multimap. -/// -CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc(); - -/// -// Return the number of elements in the string multimap. -/// -CEF_EXPORT int cef_string_multimap_size(cef_string_multimap_t map); - -/// -// Return the number of values with the specified key. -/// -CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map, - const cef_string_t* key); - -/// -// Return the value_index-th value with the specified key. -/// -CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map, - const cef_string_t* key, - int value_index, - cef_string_t* value); - -/// -// Return the key at the specified zero-based string multimap index. -/// -CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, int index, - cef_string_t* key); - -/// -// Return the value at the specified zero-based string multimap index. -/// -CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, int index, - cef_string_t* value); - -/// -// Append a new key/value pair at the end of the string multimap. -/// -CEF_EXPORT int cef_string_multimap_append(cef_string_multimap_t map, - const cef_string_t* key, - const cef_string_t* value); - -/// -// Clear the string multimap. -/// -CEF_EXPORT void cef_string_multimap_clear(cef_string_multimap_t map); - -/// -// Free the string multimap. -/// -CEF_EXPORT void cef_string_multimap_free(cef_string_multimap_t map); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_ diff --git a/cef/include/internal/cef_string_types.h b/cef/include/internal/cef_string_types.h deleted file mode 100644 index 7ab6671cb..000000000 --- a/cef/include/internal/cef_string_types.h +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) 2010 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_STRING_TYPES_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_ -#pragma once - -// CEF provides functions for converting between UTF-8, -16 and -32 strings. -// CEF string types are safe for reading from multiple threads but not for -// modification. It is the user's responsibility to provide synchronization if -// modifying CEF strings from multiple threads. - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/internal/cef_build.h" -#include "include/internal/cef_export.h" -#include - -// CEF character type definitions. wchar_t is 2 bytes on Windows and 4 bytes on -// most other platforms. - -#if defined(OS_WIN) -typedef wchar_t char16; -#else // !OS_WIN -typedef unsigned short char16; // NOLINT (runtime/int) -#ifndef WCHAR_T_IS_UTF32 -#define WCHAR_T_IS_UTF32 -#endif // WCHAR_T_IS_UTF32 -#endif // !OS_WIN - - -// CEF string type definitions. Whomever allocates |str| is responsible for -// providing an appropriate |dtor| implementation that will free the string in -// the same memory space. When reusing an existing string structure make sure -// to call |dtor| for the old value before assigning new |str| and |dtor| -// values. Static strings will have a NULL |dtor| value. Using the below -// functions if you want this managed for you. - -typedef struct _cef_string_wide_t { - wchar_t* str; - size_t length; - void (*dtor)(wchar_t* str); -} cef_string_wide_t; - -typedef struct _cef_string_utf8_t { - char* str; - size_t length; - void (*dtor)(char* str); -} cef_string_utf8_t; - -typedef struct _cef_string_utf16_t { - char16* str; - size_t length; - void (*dtor)(char16* str); -} cef_string_utf16_t; - - -/// -// These functions set string values. If |copy| is true (1) the value will be -// copied instead of referenced. It is up to the user to properly manage -// the lifespan of references. -/// - -CEF_EXPORT int cef_string_wide_set(const wchar_t* src, size_t src_len, - cef_string_wide_t* output, int copy); -CEF_EXPORT int cef_string_utf8_set(const char* src, size_t src_len, - cef_string_utf8_t* output, int copy); -CEF_EXPORT int cef_string_utf16_set(const char16* src, size_t src_len, - cef_string_utf16_t* output, int copy); - - -/// -// Convenience macros for copying values. -/// - -#define cef_string_wide_copy(src, src_len, output) \ - cef_string_wide_set(src, src_len, output, true) -#define cef_string_utf8_copy(src, src_len, output) \ - cef_string_utf8_set(src, src_len, output, true) -#define cef_string_utf16_copy(src, src_len, output) \ - cef_string_utf16_set(src, src_len, output, true) - - -/// -// These functions clear string values. The structure itself is not freed. -/// - -CEF_EXPORT void cef_string_wide_clear(cef_string_wide_t* str); -CEF_EXPORT void cef_string_utf8_clear(cef_string_utf8_t* str); -CEF_EXPORT void cef_string_utf16_clear(cef_string_utf16_t* str); - - -/// -// These functions compare two string values with the same results as strcmp(). -/// - -CEF_EXPORT int cef_string_wide_cmp(const cef_string_wide_t* str1, - const cef_string_wide_t* str2); -CEF_EXPORT int cef_string_utf8_cmp(const cef_string_utf8_t* str1, - const cef_string_utf8_t* str2); -CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1, - const cef_string_utf16_t* str2); - - -/// -// These functions convert between UTF-8, -16, and -32 strings. They are -// potentially slow so unnecessary conversions should be avoided. The best -// possible result will always be written to |output| with the boolean return -// value indicating whether the conversion is 100% valid. -/// - -CEF_EXPORT int cef_string_wide_to_utf8(const wchar_t* src, size_t src_len, - cef_string_utf8_t* output); -CEF_EXPORT int cef_string_utf8_to_wide(const char* src, size_t src_len, - cef_string_wide_t* output); - -CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src, size_t src_len, - cef_string_utf16_t* output); -CEF_EXPORT int cef_string_utf16_to_wide(const char16* src, size_t src_len, - cef_string_wide_t* output); - -CEF_EXPORT int cef_string_utf8_to_utf16(const char* src, size_t src_len, - cef_string_utf16_t* output); -CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src, size_t src_len, - cef_string_utf8_t* output); - - -/// -// These functions convert an ASCII string, typically a hardcoded constant, to a -// Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know -// the string is ASCII. -/// - -CEF_EXPORT int cef_string_ascii_to_wide(const char* src, size_t src_len, - cef_string_wide_t* output); -CEF_EXPORT int cef_string_ascii_to_utf16(const char* src, size_t src_len, - cef_string_utf16_t* output); - - - -/// -// It is sometimes necessary for the system to allocate string structures with -// the expectation that the user will free them. The userfree types act as a -// hint that the user is responsible for freeing the structure. -/// - -typedef cef_string_wide_t* cef_string_userfree_wide_t; -typedef cef_string_utf8_t* cef_string_userfree_utf8_t; -typedef cef_string_utf16_t* cef_string_userfree_utf16_t; - - -/// -// These functions allocate a new string structure. They must be freed by -// calling the associated free function. -/// - -CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc(); -CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc(); -CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc(); - - -/// -// These functions free the string structure allocated by the associated -// alloc function. Any string contents will first be cleared. -/// - -CEF_EXPORT void cef_string_userfree_wide_free(cef_string_userfree_wide_t str); -CEF_EXPORT void cef_string_userfree_utf8_free(cef_string_userfree_utf8_t str); -CEF_EXPORT void cef_string_userfree_utf16_free(cef_string_userfree_utf16_t str); - - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_TYPES_H_ diff --git a/cef/include/internal/cef_string_wrappers.h b/cef/include/internal/cef_string_wrappers.h deleted file mode 100644 index 135fed6b1..000000000 --- a/cef/include/internal/cef_string_wrappers.h +++ /dev/null @@ -1,724 +0,0 @@ -// Copyright (c) 2010 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_STRING_WRAPPERS_H_ -#define CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_ -#pragma once - -#include -#include -#include "include/internal/cef_string_types.h" - -#ifdef BUILDING_CEF_SHARED -#include "base/string16.h" -#endif - - -/// -// Traits implementation for wide character strings. -/// -struct CefStringTraitsWide { - typedef wchar_t char_type; - typedef cef_string_wide_t struct_type; - typedef cef_string_userfree_wide_t userfree_struct_type; - - static inline void clear(struct_type *s) { cef_string_wide_clear(s); } - static inline int set(const char_type* src, size_t src_size, - struct_type* output, int copy) { - return cef_string_wide_set(src, src_size, output, copy); - } - static inline int compare(const struct_type* s1, const struct_type* s2) { - return cef_string_wide_cmp(s1, s2); - } - static inline userfree_struct_type userfree_alloc() { - return cef_string_userfree_wide_alloc(); - } - static inline void userfree_free(userfree_struct_type ufs) { - return cef_string_userfree_wide_free(ufs); - } - - // Conversion methods. - static inline bool from_ascii(const char* str, size_t len, struct_type *s) { - return cef_string_ascii_to_wide(str, len, s) ? true : false; - } - static inline std::string to_string(const struct_type *s) { - cef_string_utf8_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_wide_to_utf8(s->str, s->length, &cstr); - std::string str; - if (cstr.length > 0) - str = std::string(cstr.str, cstr.length); - cef_string_utf8_clear(&cstr); - return str; - } - static inline bool from_string(const std::string& str, struct_type *s) { - return cef_string_utf8_to_wide(str.c_str(), str.length(), s) ? true : false; - } - static inline std::wstring to_wstring(const struct_type *s) { - return std::wstring(s->str, s->length); - } - static inline bool from_wstring(const std::wstring& str, struct_type *s) { - return cef_string_wide_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#if defined(BUILDING_CEF_SHARED) -#if defined(WCHAR_T_IS_UTF32) - static inline string16 to_string16(const struct_type *s) { - cef_string_utf16_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_wide_to_utf16(s->str, s->length, &cstr); - string16 str; - if (cstr.length > 0) - str = string16(cstr.str, cstr.length); - cef_string_utf16_clear(&cstr); - return str; - } - static inline bool from_string16(const string16& str, struct_type *s) { - return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ? - true : false; - } -#else // WCHAR_T_IS_UTF32 - static inline string16 to_string16(const struct_type *s) { - return string16(s->str, s->length); - } - static inline bool from_string16(const string16& str, struct_type *s) { - return cef_string_wide_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#endif // WCHAR_T_IS_UTF32 -#endif // BUILDING_CEF_SHARED -}; - -/// -// Traits implementation for utf8 character strings. -/// -struct CefStringTraitsUTF8 { - typedef char char_type; - typedef cef_string_utf8_t struct_type; - typedef cef_string_userfree_utf8_t userfree_struct_type; - - static inline void clear(struct_type *s) { cef_string_utf8_clear(s); } - static inline int set(const char_type* src, size_t src_size, - struct_type* output, int copy) { - return cef_string_utf8_set(src, src_size, output, copy); - } - static inline int compare(const struct_type* s1, const struct_type* s2) { - return cef_string_utf8_cmp(s1, s2); - } - static inline userfree_struct_type userfree_alloc() { - return cef_string_userfree_utf8_alloc(); - } - static inline void userfree_free(userfree_struct_type ufs) { - return cef_string_userfree_utf8_free(ufs); - } - - // Conversion methods. - static inline bool from_ascii(const char* str, size_t len, struct_type* s) { - return cef_string_utf8_copy(str, len, s) ? true : false; - } - static inline std::string to_string(const struct_type* s) { - return std::string(s->str, s->length); - } - static inline bool from_string(const std::string& str, struct_type* s) { - return cef_string_utf8_copy(str.c_str(), str.length(), s) ? true : false; - } - static inline std::wstring to_wstring(const struct_type* s) { - cef_string_wide_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf8_to_wide(s->str, s->length, &cstr); - std::wstring str; - if (cstr.length > 0) - str = std::wstring(cstr.str, cstr.length); - cef_string_wide_clear(&cstr); - return str; - } - static inline bool from_wstring(const std::wstring& str, struct_type* s) { - return cef_string_wide_to_utf8(str.c_str(), str.length(), s) ? true : false; - } -#if defined(BUILDING_CEF_SHARED) - static inline string16 to_string16(const struct_type* s) { - cef_string_utf16_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf8_to_utf16(s->str, s->length, &cstr); - string16 str; - if (cstr.length > 0) - str = string16(cstr.str, cstr.length); - cef_string_utf16_clear(&cstr); - return str; - } - static inline bool from_string16(const string16& str, struct_type* s) { - return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ? - true : false; - } -#endif // BUILDING_CEF_SHARED -}; - -/// -// Traits implementation for utf16 character strings. -/// -struct CefStringTraitsUTF16 { - typedef char16 char_type; - typedef cef_string_utf16_t struct_type; - typedef cef_string_userfree_utf16_t userfree_struct_type; - - static inline void clear(struct_type *s) { cef_string_utf16_clear(s); } - static inline int set(const char_type* src, size_t src_size, - struct_type* output, int copy) { - return cef_string_utf16_set(src, src_size, output, copy); - } - static inline int compare(const struct_type* s1, const struct_type* s2) { - return cef_string_utf16_cmp(s1, s2); - } - static inline userfree_struct_type userfree_alloc() { - return cef_string_userfree_utf16_alloc(); - } - static inline void userfree_free(userfree_struct_type ufs) { - return cef_string_userfree_utf16_free(ufs); - } - - // Conversion methods. - static inline bool from_ascii(const char* str, size_t len, struct_type* s) { - return cef_string_ascii_to_utf16(str, len, s) ? true : false; - } - static inline std::string to_string(const struct_type* s) { - cef_string_utf8_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf16_to_utf8(s->str, s->length, &cstr); - std::string str; - if (cstr.length > 0) - str = std::string(cstr.str, cstr.length); - cef_string_utf8_clear(&cstr); - return str; - } - static inline bool from_string(const std::string& str, struct_type* s) { - return cef_string_utf8_to_utf16(str.c_str(), str.length(), s) ? - true : false; - } -#if defined(WCHAR_T_IS_UTF32) - static inline std::wstring to_wstring(const struct_type* s) { - cef_string_wide_t cstr; - memset(&cstr, 0, sizeof(cstr)); - cef_string_utf16_to_wide(s->str, s->length, &cstr); - std::wstring str; - if (cstr.length > 0) - str = std::wstring(cstr.str, cstr.length); - cef_string_wide_clear(&cstr); - return str; - } - static inline bool from_wstring(const std::wstring& str, struct_type* s) { - return cef_string_wide_to_utf16(str.c_str(), str.length(), s) ? - true : false; - } -#else // WCHAR_T_IS_UTF32 - static inline std::wstring to_wstring(const struct_type* s) { - return std::wstring(s->str, s->length); - } - static inline bool from_wstring(const std::wstring& str, struct_type* s) { - return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#endif // WCHAR_T_IS_UTF32 -#if defined(BUILDING_CEF_SHARED) - static inline string16 to_string16(const struct_type* s) { - return string16(s->str, s->length); - } - static inline bool from_string16(const string16& str, struct_type* s) { - return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? - true : false; - } -#endif // BUILDING_CEF_SHARED -}; - -/// -// CEF string classes can convert between all supported string types. For -// example, the CefStringWide class uses wchar_t as the underlying character -// type and provides two approaches for converting data to/from a UTF8 string -// (std::string). -//

-// 1. Implicit conversion using the assignment operator overload. -//

-//   CefStringWide aCefString;
-//   std::string aUTF8String;
-//   aCefString = aUTF8String; // Assign std::string to CefStringWide
-//   aUTF8String = aCefString; // Assign CefStringWide to std::string
-// 
-// 2. Explicit conversion using the FromString/ToString methods. -//
-//   CefStringWide aCefString;
-//   std::string aUTF8String;
-//   aCefString.FromString(aUTF8String); // Assign std::string to CefStringWide
-//   aUTF8String = aCefString.ToString(); // Assign CefStringWide to std::string
-// 
-// Conversion will only occur if the assigned value is a different string type. -// Assigning a std::string to a CefStringUTF8, for example, will copy the data -// without performing a conversion. -//

-// CEF string classes are safe for reading from multiple threads but not for -// modification. It is the user's responsibility to provide synchronization if -// modifying CEF strings from multiple threads. -/// -template -class CefStringBase { - public: - typedef typename traits::char_type char_type; - typedef typename traits::struct_type struct_type; - typedef typename traits::userfree_struct_type userfree_struct_type; - - /// - // Default constructor. - /// - CefStringBase() : string_(NULL), owner_(false) {} - - /// - // Create a new string from an existing string. Data will always be copied. - /// - CefStringBase(const CefStringBase& str) - : string_(NULL), owner_(false) { - FromString(str.c_str(), str.length(), true); - } - - /// - // Create a new string from an existing std::string. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - CefStringBase(const std::string& src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - FromString(src); - } - CefStringBase(const char* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (src) - FromString(std::string(src)); - } - - /// - // Create a new string from an existing std::wstring. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - CefStringBase(const std::wstring& src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - FromWString(src); - } - CefStringBase(const wchar_t* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (src) - FromWString(std::wstring(src)); - } - -#if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32)) - /// - // Create a new string from an existing string16. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - CefStringBase(const string16& src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - FromString16(src); - } - CefStringBase(const char16* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (src) - FromString16(string16(src)); - } -#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32 - - /// - // Create a new string from an existing character array. If |copy| is true - // this class will copy the data. Otherwise, this class will reference the - // existing data. Referenced data must exist for the lifetime of this class - // and will not be freed by this class. - /// - CefStringBase(const char_type* src, size_t src_len, bool copy) - : string_(NULL), owner_(false) { - if (src && src_len > 0) - FromString(src, src_len, copy); - } - - /// - // Create a new string referencing an existing string structure without taking - // ownership. Referenced structures must exist for the lifetime of this class - // and will not be freed by this class. - /// - CefStringBase(const struct_type* src) // NOLINT(runtime/explicit) - : string_(NULL), owner_(false) { - if (!src) - return; - // Reference the existing structure without taking ownership. - Attach(const_cast(src), false); - } - - virtual ~CefStringBase() { ClearAndFree(); } - - - // The following methods are named for compatibility with the standard library - // string template types. - - /// - // Return a read-only pointer to the string data. - /// - const char_type* c_str() const { return (string_ ? string_->str : NULL); } - - /// - // Return the length of the string data. - /// - size_t length() const { return (string_ ? string_->length : 0); } - - /// - // Return the length of the string data. - /// - inline size_t size() const { return length(); } - - /// - // Returns true if the string is empty. - /// - bool empty() const { return (string_ == NULL || string_->length == 0); } - - /// - // Compare this string to the specified string. - /// - int compare(const CefStringBase& str) const { - if (empty() && str.empty()) - return 0; - if (empty()) - return -1; - if (str.empty()) - return 1; - return traits::compare(string_, str.GetStruct()); - } - - /// - // Clear the string data. - /// - void clear() { - if (string_) - traits::clear(string_); - } - - /// - // Swap this string's contents with the specified string. - /// - void swap(CefStringBase& str) { - struct_type* tmp_string = string_; - bool tmp_owner = owner_; - string_ = str.string_; - owner_ = str.owner_; - str.string_ = tmp_string; - str.owner_ = tmp_owner; - } - - - // The following methods are unique to CEF string template types. - - /// - // Returns true if this class owns the underlying string structure. - /// - bool IsOwner() const { return owner_; } - - /// - // Returns a read-only pointer to the underlying string structure. May return - // NULL if no structure is currently allocated. - /// - const struct_type* GetStruct() const { return string_; } - - /// - // Returns a writable pointer to the underlying string structure. Will never - // return NULL. - /// - struct_type* GetWritableStruct() { - AllocIfNeeded(); - return string_; - } - - /// - // Clear the state of this class. The underlying string structure and data - // will be freed if this class owns the structure. - /// - void ClearAndFree() { - if (!string_) - return; - if (owner_) { - clear(); - delete string_; - } - string_ = NULL; - owner_ = false; - } - - /// - // Attach to the specified string structure. If |owner| is true this class - // will take ownership of the structure. - /// - void Attach(struct_type* str, bool owner) { - // Free the previous structure and data, if any. - ClearAndFree(); - - string_ = str; - owner_ = owner; - } - - /// - // Take ownership of the specified userfree structure's string data. The - // userfree structure itself will be freed. Only use this method with userfree - // structures. - /// - void AttachToUserFree(userfree_struct_type str) { - // Free the previous structure and data, if any. - ClearAndFree(); - - if (!str) - return; - - AllocIfNeeded(); - owner_ = true; - memcpy(string_, str, sizeof(struct_type)); - - // Free the |str| structure but not the data. - memset(str, 0, sizeof(struct_type)); - traits::userfree_free(str); - } - - /// - // Detach from the underlying string structure. To avoid memory leaks only use - // this method if you already hold a pointer to the underlying string - // structure. - /// - void Detach() { - string_ = NULL; - owner_ = false; - } - - /// - // Create a userfree structure and give it ownership of this class' string - // data. This class will be disassociated from the data. May return NULL if - // this string class currently contains no data. - /// - userfree_struct_type DetachToUserFree() { - if (empty()) - return NULL; - - userfree_struct_type str = traits::userfree_alloc(); - memcpy(str, string_, sizeof(struct_type)); - - // Free this class' structure but not the data. - memset(string_, 0, sizeof(struct_type)); - ClearAndFree(); - - return str; - } - - /// - // Set this string's data to the specified character array. If |copy| is true - // this class will copy the data. Otherwise, this class will reference the - // existing data. Referenced data must exist for the lifetime of this class - // and will not be freed by this class. - /// - bool FromString(const char_type* src, size_t src_len, bool copy) { - if (src == NULL || src_len == 0) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::set(src, src_len, string_, copy) ? true : false; - } - - /// - // Set this string's data from an existing ASCII string. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromASCII(const char* str) { - size_t len = str ? strlen(str) : 0; - if (len == 0) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_ascii(str, len, string_); - } - - /// - // Return this string's data as a std::string. Translation will occur if - // necessary based on the underlying string type. - /// - std::string ToString() const { - if (empty()) - return std::string(); - return traits::to_string(string_); - } - - /// - // Set this string's data from an existing std::string. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromString(const std::string& str) { - if (str.empty()) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_string(str, string_); - } - - /// - // Return this string's data as a std::wstring. Translation will occur if - // necessary based on the underlying string type. - /// - std::wstring ToWString() const { - if (empty()) - return std::wstring(); - return traits::to_wstring(string_); - } - - /// - // Set this string's data from an existing std::wstring. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromWString(const std::wstring& str) { - if (str.empty()) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_wstring(str, string_); - } -#if defined(BUILDING_CEF_SHARED) - /// - // Return this string's data as a string16. Translation will occur if - // necessary based on the underlying string type. - /// - string16 ToString16() const { - if (empty()) - return string16(); - return traits::to_string16(string_); - } - - /// - // Set this string's data from an existing string16. Data will be always - // copied. Translation will occur if necessary based on the underlying string - // type. - /// - bool FromString16(const string16& str) { - if (str.empty()) { - clear(); - return true; - } - AllocIfNeeded(); - return traits::from_string16(str, string_); - } -#endif // BUILDING_CEF_SHARED - - /// - // Comparison operator overloads. - /// - bool operator<(const CefStringBase& str) const { - return (compare(str) < 0); - } - bool operator<=(const CefStringBase& str) const { - return (compare(str) <= 0); - } - bool operator>(const CefStringBase& str) const { - return (compare(str) > 0); - } - bool operator>=(const CefStringBase& str) const { - return (compare(str) >= 0); - } - bool operator==(const CefStringBase& str) const { - return (compare(str) == 0); - } - bool operator!=(const CefStringBase& str) const { - return (compare(str) != 0); - } - - /// - // Assignment operator overloads. - /// - CefStringBase& operator=(const CefStringBase& str) { - FromString(str.c_str(), str.length(), true); - return *this; - } - operator std::string() const { - return ToString(); - } - CefStringBase& operator=(const std::string& str) { - FromString(str); - return *this; - } - CefStringBase& operator=(const char* str) { - FromString(std::string(str)); - return *this; - } - operator std::wstring() const { - return ToWString(); - } - CefStringBase& operator=(const std::wstring& str) { - FromWString(str); - return *this; - } - CefStringBase& operator=(const wchar_t* str) { - FromWString(std::wstring(str)); - return *this; - } -#if (defined(BUILDING_CEF_SHARED) && defined(WCHAR_T_IS_UTF32)) - operator string16() const { - return ToString16(); - } - CefStringBase& operator=(const string16& str) { - FromString16(str); - return *this; - } - CefStringBase& operator=(const char16* str) { - FromString16(string16(str)); - return *this; - } -#endif // BUILDING_CEF_SHARED && WCHAR_T_IS_UTF32 - - private: - // Allocate the string structure if it doesn't already exist. - void AllocIfNeeded() { - if (string_ == NULL) { - string_ = new struct_type; - memset(string_, 0, sizeof(struct_type)); - owner_ = true; - } - } - - struct_type* string_; - bool owner_; -}; - - -typedef CefStringBase CefStringWide; -typedef CefStringBase CefStringUTF8; -typedef CefStringBase CefStringUTF16; - -#endif // CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_ diff --git a/cef/include/internal/cef_time.h b/cef/include/internal/cef_time.h deleted file mode 100644 index 64e601fe0..000000000 --- a/cef/include/internal/cef_time.h +++ /dev/null @@ -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. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TIME_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TIME_H_ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "include/internal/cef_export.h" -#include - -/// -// Time information. Values should always be in UTC. -/// -typedef struct _cef_time_t { - int year; // Four digit year "2007" - int month; // 1-based month (values 1 = January, etc.) - int day_of_week; // 0-based day of week (0 = Sunday, etc.) - int day_of_month; // 1-based day of month (1-31) - int hour; // Hour within the current day (0-23) - int minute; // Minute within the current hour (0-59) - int second; // Second within the current minute (0-59 plus leap - // seconds which may take it up to 60). - int millisecond; // Milliseconds within the current second (0-999) -} cef_time_t; - -/// -// Converts cef_time_t to/from time_t. Returns true (1) on success and false (0) -// on failure. -/// -CEF_EXPORT int cef_time_to_timet(const cef_time_t* cef_time, time_t* time); -CEF_EXPORT int cef_time_from_timet(time_t time, cef_time_t* cef_time); - -/// -// Converts cef_time_t to/from a double which is the number of seconds since -// epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 -// means "not initialized". Returns true (1) on success and false (0) on -// failure. -/// -CEF_EXPORT int cef_time_to_doublet(const cef_time_t* cef_time, double* time); -CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time); - -/// -// Retrieve the current system time. -// -CEF_EXPORT int cef_time_now(cef_time_t* cef_time); - -/// -// Retrieve the delta in milliseconds between two time values. -// -CEF_EXPORT int cef_time_delta(const cef_time_t* cef_time1, - const cef_time_t* cef_time2, - long long* delta); - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_TIME_H_ diff --git a/cef/include/internal/cef_tuple.h b/cef/include/internal/cef_tuple.h deleted file mode 100644 index c2cdf7058..000000000 --- a/cef/include/internal/cef_tuple.h +++ /dev/null @@ -1,1088 +0,0 @@ -// 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 identical to base/tuple.h - -// A Tuple is a generic templatized container, similar in concept to std::pair. -// There are classes Tuple0 to Tuple6, cooresponding to the number of elements -// it contains. The convenient MakeTuple() function takes 0 to 6 arguments, -// and will construct and return the appropriate Tuple object. The functions -// DispatchToMethod and DispatchToFunction take a function pointer or instance -// and method pointer, and unpack a tuple into arguments to the call. -// -// Tuple elements are copied by value, and stored in the tuple. See the unit -// tests for more details of how/when the values are copied. -// -// Example usage: -// // These two methods of creating a Tuple are identical. -// Tuple2 tuple_a(1, "wee"); -// Tuple2 tuple_b = MakeTuple(1, "wee"); -// -// void SomeFunc(int a, const char* b) { } -// DispatchToFunction(&SomeFunc, tuple_a); // SomeFunc(1, "wee") -// DispatchToFunction( -// &SomeFunc, MakeTuple(10, "foo")); // SomeFunc(10, "foo") -// -// struct { void SomeMeth(int a, int b, int c) { } } foo; -// DispatchToMethod(&foo, &Foo::SomeMeth, MakeTuple(1, 2, 3)); -// // foo->SomeMeth(1, 2, 3); - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_ -#pragma once - -// If base/tuple.h is included first then exclude this file. This is to -// facilitate the use of both base/bind.h and cef_runnable.h in unit tests. -#ifndef BASE_TUPLE_H__ - -#if defined(OS_CHROMEOS) -// To troubleshoot crosbug.com/7327. -#include "base/logging.h" -#endif -// Traits ---------------------------------------------------------------------- -// -// A simple traits class for tuple arguments. -// -// ValueType: the bare, nonref version of a type (same as the type for nonrefs). -// RefType: the ref version of a type (same as the type for refs). -// ParamType: what type to pass to functions (refs should not be constified). - -template -struct TupleTraits { - typedef P ValueType; - typedef P& RefType; - typedef const P& ParamType; -}; - -template -struct TupleTraits { - typedef P ValueType; - typedef P& RefType; - typedef P& ParamType; -}; - -template -struct TupleTypes { }; - -// Tuple ----------------------------------------------------------------------- -// -// This set of classes is useful for bundling 0 or more heterogeneous data types -// into a single variable. The advantage of this is that it greatly simplifies -// function objects that need to take an arbitrary number of parameters; see -// RunnableMethod and IPC::MessageWithTuple. -// -// Tuple0 is supplied to act as a 'void' type. It can be used, for example, -// when dispatching to a function that accepts no arguments (see the -// Dispatchers below). -// Tuple1 is rarely useful. One such use is when A is non-const ref that you -// want filled by the dispatchee, and the tuple is merely a container for that -// output (a "tier"). See MakeRefTuple and its usages. - -struct Tuple0 { - typedef Tuple0 ValueTuple; - typedef Tuple0 RefTuple; - typedef Tuple0 ParamTuple; -}; - -template -struct Tuple1 { - public: - typedef A TypeA; - - Tuple1() {} - explicit Tuple1(typename TupleTraits::ParamType a) : a(a) {} - - A a; -}; - -template -struct Tuple2 { - public: - typedef A TypeA; - typedef B TypeB; - - Tuple2() {} - Tuple2(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b) - : a(a), b(b) { - } - - A a; - B b; -}; - -template -struct Tuple3 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - - Tuple3() {} - Tuple3(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c) - : a(a), b(b), c(c) { - } - - A a; - B b; - C c; -}; - -template -struct Tuple4 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - - Tuple4() {} - Tuple4(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d) - : a(a), b(b), c(c), d(d) { - } - - A a; - B b; - C c; - D d; -}; - -template -struct Tuple5 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - - Tuple5() {} - Tuple5(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e) - : a(a), b(b), c(c), d(d), e(e) { - } - - A a; - B b; - C c; - D d; - E e; -}; - -template -struct Tuple6 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - typedef F TypeF; - - Tuple6() {} - Tuple6(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e, - typename TupleTraits::ParamType f) - : a(a), b(b), c(c), d(d), e(e), f(f) { - } - - A a; - B b; - C c; - D d; - E e; - F f; -}; - -template -struct Tuple7 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - typedef F TypeF; - typedef G TypeG; - - Tuple7() {} - Tuple7(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e, - typename TupleTraits::ParamType f, - typename TupleTraits::ParamType g) - : a(a), b(b), c(c), d(d), e(e), f(f), g(g) { - } - - A a; - B b; - C c; - D d; - E e; - F f; - G g; -}; - -template -struct Tuple8 { - public: - typedef A TypeA; - typedef B TypeB; - typedef C TypeC; - typedef D TypeD; - typedef E TypeE; - typedef F TypeF; - typedef G TypeG; - typedef H TypeH; - - Tuple8() {} - Tuple8(typename TupleTraits::ParamType a, - typename TupleTraits::ParamType b, - typename TupleTraits::ParamType c, - typename TupleTraits::ParamType d, - typename TupleTraits::ParamType e, - typename TupleTraits::ParamType f, - typename TupleTraits::ParamType g, - typename TupleTraits::ParamType h) - : a(a), b(b), c(c), d(d), e(e), f(f), g(g), h(h) { - } - - A a; - B b; - C c; - D d; - E e; - F f; - G g; - H h; -}; - -// Tuple types ---------------------------------------------------------------- -// -// Allows for selection of ValueTuple/RefTuple/ParamTuple without needing the -// definitions of class types the tuple takes as parameters. - -template <> -struct TupleTypes< Tuple0 > { - typedef Tuple0 ValueTuple; - typedef Tuple0 RefTuple; - typedef Tuple0 ParamTuple; -}; - -template -struct TupleTypes< Tuple1 > { - typedef Tuple1::ValueType> ValueTuple; - typedef Tuple1::RefType> RefTuple; - typedef Tuple1::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple2 > { - typedef Tuple2::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple2::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple2::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple3 > { - typedef Tuple3::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple3::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple3::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple4 > { - typedef Tuple4::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple4::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple4::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple5 > { - typedef Tuple5::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple5::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple5::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple6 > { - typedef Tuple6::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple6::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple6::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple7 > { - typedef Tuple7::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple7::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple7::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -template -struct TupleTypes< Tuple8 > { - typedef Tuple8::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType, - typename TupleTraits::ValueType> ValueTuple; -typedef Tuple8::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType, - typename TupleTraits::RefType> RefTuple; - typedef Tuple8::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType, - typename TupleTraits::ParamType> ParamTuple; -}; - -// Tuple creators ------------------------------------------------------------- -// -// Helper functions for constructing tuples while inferring the template -// argument types. - -inline Tuple0 MakeTuple() { - return Tuple0(); -} - -template -inline Tuple1 MakeTuple(const A& a) { - return Tuple1(a); -} - -template -inline Tuple2 MakeTuple(const A& a, const B& b) { - return Tuple2(a, b); -} - -template -inline Tuple3 MakeTuple(const A& a, const B& b, const C& c) { - return Tuple3(a, b, c); -} - -template -inline Tuple4 MakeTuple(const A& a, const B& b, const C& c, - const D& d) { - return Tuple4(a, b, c, d); -} - -template -inline Tuple5 MakeTuple(const A& a, const B& b, const C& c, - const D& d, const E& e) { - return Tuple5(a, b, c, d, e); -} - -template -inline Tuple6 MakeTuple(const A& a, const B& b, const C& c, - const D& d, const E& e, const F& f) { - return Tuple6(a, b, c, d, e, f); -} - -template -inline Tuple7 MakeTuple(const A& a, const B& b, const C& c, - const D& d, const E& e, const F& f, - const G& g) { - return Tuple7(a, b, c, d, e, f, g); -} - -template -inline Tuple8 MakeTuple(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 Tuple8(a, b, c, d, e, f, g, h); -} - -// The following set of helpers make what Boost refers to as "Tiers" - a tuple -// of references. - -template -inline Tuple1 MakeRefTuple(A& a) { - return Tuple1(a); -} - -template -inline Tuple2 MakeRefTuple(A& a, B& b) { - return Tuple2(a, b); -} - -template -inline Tuple3 MakeRefTuple(A& a, B& b, C& c) { - return Tuple3(a, b, c); -} - -template -inline Tuple4 MakeRefTuple(A& a, B& b, C& c, D& d) { - return Tuple4(a, b, c, d); -} - -template -inline Tuple5 MakeRefTuple(A& a, B& b, C& c, D& d, E& e) { - return Tuple5(a, b, c, d, e); -} - -template -inline Tuple6 MakeRefTuple(A& a, B& b, C& c, D& d, E& e, - F& f) { - return Tuple6(a, b, c, d, e, f); -} - -template -inline Tuple7 MakeRefTuple(A& a, B& b, C& c, D& d, - E& e, F& f, G& g) { - return Tuple7(a, b, c, d, e, f, g); -} - -template -inline Tuple8 MakeRefTuple(A& a, B& b, C& c, - D& d, E& e, F& f, - G& g, H& h) { - return Tuple8(a, b, c, d, e, f, g, h); -} - -// Dispatchers ---------------------------------------------------------------- -// -// Helper functions that call the given method on an object, with the unpacked -// tuple arguments. Notice that they all have the same number of arguments, -// so you need only write: -// DispatchToMethod(object, &Object::method, args); -// This is very useful for templated dispatchers, since they don't need to know -// what type |args| is. - -// Non-Static Dispatchers with no out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, const Tuple0& arg) { - (obj->*method)(); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) { - (obj->*method)(arg); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1& arg) { -#if defined(OS_CHROMEOS) - // To troubleshoot crosbug.com/7327. - CHECK(obj); - CHECK(&arg); - CHECK(method); -#endif - (obj->*method)(arg.a); -} - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple2& arg) { - (obj->*method)(arg.a, arg.b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& arg) { - (obj->*method)(arg.a, arg.b, arg.c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& arg) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& arg) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& arg) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple7& arg) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g); -} - -// Static Dispatchers with no out params. - -template -inline void DispatchToFunction(Function function, const Tuple0& arg) { - (*function)(); -} - -template -inline void DispatchToFunction(Function function, const A& arg) { - (*function)(arg); -} - -template -inline void DispatchToFunction(Function function, const Tuple1& arg) { - (*function)(arg.a); -} - -template -inline void DispatchToFunction(Function function, const Tuple2& arg) { - (*function)(arg.a, arg.b); -} - -template -inline void DispatchToFunction(Function function, const Tuple3& arg) { - (*function)(arg.a, arg.b, arg.c); -} - -template -inline void DispatchToFunction(Function function, - const Tuple4& arg) { - (*function)(arg.a, arg.b, arg.c, arg.d); -} - -template -inline void DispatchToFunction(Function function, - const Tuple5& arg) { - (*function)(arg.a, arg.b, arg.c, arg.d, arg.e); -} - -template -inline void DispatchToFunction(Function function, - const Tuple6& arg) { - (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f); -} - -template -inline void DispatchToFunction(Function function, - const Tuple7& arg) { - (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g); -} - -template -inline void DispatchToFunction(Function function, - const Tuple8& arg) { - (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g, arg.h); -} - -// Dispatchers with 0 out param (as a Tuple0). - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple0& arg, Tuple0*) { - (obj->*method)(); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) { - (obj->*method)(arg); -} - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple1& arg, Tuple0*) { - (obj->*method)(arg.a); -} - -template -inline void DispatchToMethod(ObjT* obj, - Method method, - const Tuple2& arg, Tuple0*) { - (obj->*method)(arg.a, arg.b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& arg, Tuple0*) { - (obj->*method)(arg.a, arg.b, arg.c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& arg, Tuple0*) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& arg, Tuple0*) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& arg, Tuple0*) { - (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f); -} - -// Dispatchers with 1 out param. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple1* out) { - (obj->*method)(&out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple1* out) { - (obj->*method)(in, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple1* out) { - (obj->*method)(in.a, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple1* out) { - (obj->*method)(in.a, in.b, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple1* out) { - (obj->*method)(in.a, in.b, in.c, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple1* out) { - (obj->*method)(in.a, in.b, in.c, in.d, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple1* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple1* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a); -} - -// Dispatchers with 2 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple2* out) { - (obj->*method)(&out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple2* out) { - (obj->*method)(in, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple2* out) { - (obj->*method)(in.a, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple2* out) { - (obj->*method)(in.a, in.b, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple2* out) { - (obj->*method)(in.a, in.b, in.c, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple2* out) { - (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple2* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple2* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b); -} - -// Dispatchers with 3 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple3* out) { - (obj->*method)(&out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple3* out) { - (obj->*method)(in, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple3* out) { - (obj->*method)(in.a, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple3* out) { - (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple3* out) { - (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple3* out) { - (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple3* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b, &out->c); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple3* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b, &out->c); -} - -// Dispatchers with 4 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple4* out) { - (obj->*method)(&out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple4* out) { - (obj->*method)(in, &out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple4* out) { - (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple4* out) { - (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple4* out) { - (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple4* out) { - (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple4* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, - &out->a, &out->b, &out->c, &out->d); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple4* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, - &out->a, &out->b, &out->c, &out->d); -} - -// Dispatchers with 5 out params. - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple0& in, - Tuple5* out) { - (obj->*method)(&out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const InA& in, - Tuple5* out) { - (obj->*method)(in, &out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple1& in, - Tuple5* out) { - (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple2& in, - Tuple5* out) { - (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple3& in, - Tuple5* out) { - (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple4& in, - Tuple5* out) { - (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d, - &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple5& in, - Tuple5* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, - &out->a, &out->b, &out->c, &out->d, &out->e); -} - -template -inline void DispatchToMethod(ObjT* obj, Method method, - const Tuple6& in, - Tuple5* out) { - (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, - &out->a, &out->b, &out->c, &out->d, &out->e); -} - -#endif // BASE_TUPLE_H__ - -#endif // CEF_INCLUDE_INTERNAL_CEF_TUPLE_H_ diff --git a/cef/include/internal/cef_types.h b/cef/include/internal/cef_types.h deleted file mode 100644 index d6772fb5b..000000000 --- a/cef/include/internal/cef_types.h +++ /dev/null @@ -1,1456 +0,0 @@ -// Copyright (c) 2010 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_TYPES_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ -#pragma once - -#include "include/internal/cef_build.h" -#include "include/internal/cef_string.h" -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_time.h" - -// Bring in platform-specific definitions. -#if defined(OS_WIN) -#include "include/internal/cef_types_win.h" -#elif defined(OS_MACOSX) -#include "include/internal/cef_types_mac.h" -#elif defined(OS_LINUX) -#include "include/internal/cef_types_linux.h" -#endif - -#include // For size_t - -// The NSPR system headers define 64-bit as |long| when possible, except on -// Mac OS X. In order to not have typedef mismatches, we do the same on LP64. -// -// On Mac OS X, |long long| is used for 64-bit types for compatibility with -// format macros even in the LP64 model. -#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) -typedef long int64; // NOLINT(runtime/int) -typedef unsigned long uint64; // NOLINT(runtime/int) -#else -typedef long long int64; // NOLINT(runtime/int) -typedef unsigned long long uint64; // NOLINT(runtime/int) -#endif - -// TODO: Remove these type guards. These are to avoid conflicts with -// obsolete/protypes.h in the Gecko SDK. -#ifndef _INT32 -#define _INT32 -typedef int int32; -#endif - -// TODO: Remove these type guards. These are to avoid conflicts with -// obsolete/protypes.h in the Gecko SDK. -#ifndef _UINT32 -#define _UINT32 -typedef unsigned int uint32; -#endif - -// UTF-16 character type -#ifndef char16 -#if defined(WIN32) -typedef wchar_t char16; -#else -typedef unsigned short char16; -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// Log severity levels. -/// -enum cef_log_severity_t { - /// - // Default logging (currently INFO logging). - /// - LOGSEVERITY_DEFAULT, - - /// - // Verbose logging. - /// - LOGSEVERITY_VERBOSE, - - /// - // INFO logging. - /// - LOGSEVERITY_INFO, - - /// - // WARNING logging. - /// - LOGSEVERITY_WARNING, - - /// - // ERROR logging. - /// - LOGSEVERITY_ERROR, - - /// - // ERROR_REPORT logging. - /// - LOGSEVERITY_ERROR_REPORT, - - /// - // Completely disable logging. - /// - LOGSEVERITY_DISABLE = 99 -}; - -/// -// Initialization settings. Specify NULL or 0 to get the recommended default -// values. Many of these and other settings can also configured using command- -// line flags. -/// -typedef struct _cef_settings_t { - /// - // Size of this structure. - /// - size_t size; - - /// - // Set to true (1) to use a single process for the browser and renderer. This - // run mode is not officially supported by Chromium and is less stable than - // the multi-process default. - /// - bool single_process; - - /// - // The path to a separate executable that will be launched for sub-processes. - // By default the browser process executable is used. See the comments on - // CefExecuteProcess() for details. - /// - cef_string_t browser_subprocess_path; - - /// - // Set to true (1) to have the browser process message loop run in a separate - // thread. If false (0) than the CefDoMessageLoopWork() function must be - // called from your application message loop. - /// - bool multi_threaded_message_loop; - - /// - // Set to true (1) to disable configuration of browser process features using - // standard CEF and Chromium command-line arguments. Configuration can still - // be specified using CEF data structures or via the - // CefApp::OnBeforeCommandLineProcessing() method. - /// - bool command_line_args_disabled; - - /// - // The location where cache data will be stored on disk. If empty an in-memory - // cache will be used. HTML5 databases such as localStorage will only persist - // across sessions if a cache path is specified. - /// - cef_string_t cache_path; - - /// - // Value that will be returned as the User-Agent HTTP header. If empty the - // default User-Agent string will be used. - /// - cef_string_t user_agent; - - /// - // Value that will be inserted as the product portion of the default - // User-Agent string. If empty the Chromium product version will be used. If - // |userAgent| is specified this value will be ignored. - /// - cef_string_t product_version; - - /// - // The locale string that will be passed to WebKit. If empty the default - // locale of "en-US" will be used. This value is ignored on Linux where locale - // is determined using environment variable parsing with the precedence order: - // LANGUAGE, LC_ALL, LC_MESSAGES and LANG. - /// - cef_string_t locale; - - /// - // The directory and file name to use for the debug log. If empty, the - // default name of "debug.log" will be used and the file will be written - // to the application directory. - /// - cef_string_t log_file; - - /// - // The log severity. Only messages of this severity level or higher will be - // logged. - /// - cef_log_severity_t log_severity; - - /// - // Enable DCHECK in release mode to ease debugging. - /// - bool release_dcheck_enabled; - - /// - // Custom flags that will be used when initializing the V8 JavaScript engine. - // The consequences of using custom flags may not be well tested. - /// - cef_string_t javascript_flags; - - /// - // Set to true (1) to use the system proxy resolver on Windows when - // "Automatically detect settings" is checked. This setting is disabled - // by default for performance reasons. - /// - bool auto_detect_proxy_settings_enabled; - - /// - // The fully qualified path for the resources directory. If this value is - // empty the cef.pak and/or devtools_resources.pak files must be located in - // the module directory on Windows/Linux or the app bundle Resources directory - // on Mac OS X. - /// - cef_string_t resources_dir_path; - - /// - // The fully qualified path for the locales directory. If this value is empty - // the locales directory must be located in the module directory. This value - // is ignored on Mac OS X where pack files are always loaded from the app - // bundle Resources directory. - /// - cef_string_t locales_dir_path; - - /// - // Set to true (1) to disable loading of pack files for resources and locales. - // A resource bundle handler must be provided for the browser and render - // processes via CefApp::GetResourceBundleHandler() if loading of pack files - // is disabled. - /// - bool pack_loading_disabled; - - /// - // Set to a value between 1024 and 65535 to enable remote debugging on the - // specified port. For example, if 8080 is specified the remote debugging URL - // will be http://localhost:8080. CEF can be remotely debugged from any CEF or - // Chrome browser window. - /// - int remote_debugging_port; - - /// - // The number of stack trace frames to capture for uncaught exceptions. - // Specify a positive value to enable the CefV8ContextHandler:: - // OnUncaughtException() callback. Specify 0 (default value) and - // OnUncaughtException() will not be called. - /// - int uncaught_exception_stack_size; - - /// - // By default CEF V8 references will be invalidated (the IsValid() method will - // return false) after the owning context has been released. This reduces the - // need for external record keeping and avoids crashes due to the use of V8 - // references after the associated context has been released. - // - // CEF currently offers two context safety implementations with different - // performance characteristics. The default implementation (value of 0) uses a - // map of hash values and should provide better performance in situations with - // a small number contexts. The alternate implementation (value of 1) uses a - // hidden value attached to each context and should provide better performance - // in situations with a large number of contexts. - // - // If you need better performance in the creation of V8 references and you - // plan to manually track context lifespan you can disable context safety by - // specifying a value of -1. - /// - int context_safety_implementation; -} cef_settings_t; - -/// -// Browser initialization settings. Specify NULL or 0 to get the recommended -// default values. The consequences of using custom values may not be well -// tested. Many of these and other settings can also configured using command- -// line flags. -/// -typedef struct _cef_browser_settings_t { - /// - // Size of this structure. - /// - size_t size; - - // The below values map to WebPreferences settings. - - /// - // Font settings. - /// - cef_string_t standard_font_family; - cef_string_t fixed_font_family; - cef_string_t serif_font_family; - cef_string_t sans_serif_font_family; - cef_string_t cursive_font_family; - cef_string_t fantasy_font_family; - int default_font_size; - int default_fixed_font_size; - int minimum_font_size; - int minimum_logical_font_size; - - /// - // Set to true (1) to disable loading of fonts from remote sources. - /// - bool remote_fonts_disabled; - - /// - // Default encoding for Web content. If empty "ISO-8859-1" will be used. - /// - cef_string_t default_encoding; - - /// - // Set to true (1) to attempt automatic detection of content encoding. - /// - bool encoding_detector_enabled; - - /// - // Set to true (1) to disable JavaScript. - /// - bool javascript_disabled; - - /// - // Set to true (1) to disallow JavaScript from opening windows. - /// - bool javascript_open_windows_disallowed; - - /// - // Set to true (1) to disallow JavaScript from closing windows. - /// - bool javascript_close_windows_disallowed; - - /// - // Set to true (1) to disallow JavaScript from accessing the clipboard. - /// - bool javascript_access_clipboard_disallowed; - - /// - // Set to true (1) to disable DOM pasting in the editor. DOM pasting also - // depends on |javascript_cannot_access_clipboard| being false (0). - /// - bool dom_paste_disabled; - - /// - // Set to true (1) to enable drawing of the caret position. - /// - bool caret_browsing_enabled; - - /// - // Set to true (1) to disable Java. - /// - bool java_disabled; - - /// - // Set to true (1) to disable plugins. - /// - bool plugins_disabled; - - /// - // Set to true (1) to allow access to all URLs from file URLs. - /// - bool universal_access_from_file_urls_allowed; - - /// - // Set to true (1) to allow access to file URLs from other file URLs. - /// - bool file_access_from_file_urls_allowed; - - /// - // Set to true (1) to allow risky security behavior such as cross-site - // scripting (XSS). Use with extreme care. - /// - bool web_security_disabled; - - /// - // Set to true (1) to enable console warnings about XSS attempts. - /// - bool xss_auditor_enabled; - - /// - // Set to true (1) to suppress the network load of image URLs. A cached - // image will still be rendered if requested. - /// - bool image_load_disabled; - - /// - // Set to true (1) to shrink standalone images to fit the page. - /// - bool shrink_standalone_images_to_fit; - - /// - // Set to true (1) to disable browser backwards compatibility features. - /// - bool site_specific_quirks_disabled; - - /// - // Set to true (1) to disable resize of text areas. - /// - bool text_area_resize_disabled; - - /// - // Set to true (1) to disable use of the page cache. - /// - bool page_cache_disabled; - - /// - // Set to true (1) to not have the tab key advance focus to links. - /// - bool tab_to_links_disabled; - - /// - // Set to true (1) to disable hyperlink pings ( and window.sendPing). - /// - bool hyperlink_auditing_disabled; - - /// - // Set to true (1) to enable the user style sheet for all pages. - /// - bool user_style_sheet_enabled; - - /// - // Location of the user style sheet. This must be a data URL of the form - // "data:text/css;charset=utf-8;base64,csscontent" where "csscontent" is the - // base64 encoded contents of the CSS file. - /// - cef_string_t user_style_sheet_location; - - /// - // Set to true (1) to disable style sheets. - /// - bool author_and_user_styles_disabled; - - /// - // Set to true (1) to disable local storage. - /// - bool local_storage_disabled; - - /// - // Set to true (1) to disable databases. - /// - bool databases_disabled; - - /// - // Set to true (1) to disable application cache. - /// - bool application_cache_disabled; - - /// - // Set to true (1) to disable WebGL. - /// - bool webgl_disabled; - - /// - // Set to true (1) to disable accelerated compositing. - /// - bool accelerated_compositing_disabled; - - /// - // Set to true (1) to disable accelerated layers. This affects features like - // 3D CSS transforms. - /// - bool accelerated_layers_disabled; - - /// - // Set to true (1) to disable accelerated video. - /// - bool accelerated_video_disabled; - - /// - // Set to true (1) to disable accelerated 2d canvas. - /// - bool accelerated_2d_canvas_disabled; - - /// - // Set to true (1) to disable accelerated plugins. - /// - bool accelerated_plugins_disabled; - - /// - // Set to true (1) to disable developer tools (WebKit inspector). - /// - bool developer_tools_disabled; -} cef_browser_settings_t; - -/// -// URL component parts. -/// -typedef struct _cef_urlparts_t { - /// - // The complete URL specification. - /// - cef_string_t spec; - - /// - // Scheme component not including the colon (e.g., "http"). - /// - cef_string_t scheme; - - /// - // User name component. - /// - cef_string_t username; - - /// - // Password component. - /// - cef_string_t password; - - /// - // Host component. This may be a hostname, an IPv4 address or an IPv6 literal - // surrounded by square brackets (e.g., "[2001:db8::1]"). - /// - cef_string_t host; - - /// - // Port number component. - /// - cef_string_t port; - - /// - // Path component including the first slash following the host. - /// - cef_string_t path; - - /// - // Query string component (i.e., everything following the '?'). - /// - cef_string_t query; -} cef_urlparts_t; - -/// -// Cookie information. -/// -typedef struct _cef_cookie_t { - /// - // The cookie name. - /// - cef_string_t name; - - /// - // The cookie value. - /// - cef_string_t value; - - /// - // If |domain| is empty a host cookie will be created instead of a domain - // cookie. Domain cookies are stored with a leading "." and are visible to - // sub-domains whereas host cookies are not. - /// - cef_string_t domain; - - /// - // If |path| is non-empty only URLs at or below the path will get the cookie - // value. - /// - cef_string_t path; - - /// - // If |secure| is true the cookie will only be sent for HTTPS requests. - /// - bool secure; - - /// - // If |httponly| is true the cookie will only be sent for HTTP requests. - /// - bool httponly; - - /// - // The cookie creation date. This is automatically populated by the system on - // cookie creation. - /// - cef_time_t creation; - - /// - // The cookie last access date. This is automatically populated by the system - // on access. - /// - cef_time_t last_access; - - /// - // The cookie expiration date is only valid if |has_expires| is true. - /// - bool has_expires; - cef_time_t expires; -} cef_cookie_t; - -/// -// Process termination status values. -/// -enum cef_termination_status_t { - /// - // Non-zero exit status. - /// - TS_ABNORMAL_TERMINATION, - - /// - // SIGKILL or task manager kill. - /// - TS_PROCESS_WAS_KILLED, - - /// - // Segmentation fault. - /// - TS_PROCESS_CRASHED, -}; - -/// -// Path key values. -/// -enum cef_path_key_t { - /// - // Current directory. - /// - PK_DIR_CURRENT, - - /// - // Directory containing PK_FILE_EXE. - /// - PK_DIR_EXE, - - /// - // Directory containing PK_FILE_MODULE. - /// - PK_DIR_MODULE, - - /// - // Temporary directory. - /// - PK_DIR_TEMP, - - /// - // Path and filename of the current executable. - /// - PK_FILE_EXE, - - /// - // Path and filename of the module containing the CEF code (usually the libcef - // module). - /// - PK_FILE_MODULE, -}; - -/// -// Storage types. -/// -enum cef_storage_type_t { - ST_LOCALSTORAGE = 0, - ST_SESSIONSTORAGE, -}; - -/// -// Supported error code values. See net\base\net_error_list.h for complete -// descriptions of the error codes. -/// -enum cef_errorcode_t { - ERR_NONE = 0, - ERR_FAILED = -2, - ERR_ABORTED = -3, - ERR_INVALID_ARGUMENT = -4, - ERR_INVALID_HANDLE = -5, - ERR_FILE_NOT_FOUND = -6, - ERR_TIMED_OUT = -7, - ERR_FILE_TOO_BIG = -8, - ERR_UNEXPECTED = -9, - ERR_ACCESS_DENIED = -10, - ERR_NOT_IMPLEMENTED = -11, - ERR_CONNECTION_CLOSED = -100, - ERR_CONNECTION_RESET = -101, - ERR_CONNECTION_REFUSED = -102, - ERR_CONNECTION_ABORTED = -103, - ERR_CONNECTION_FAILED = -104, - ERR_NAME_NOT_RESOLVED = -105, - ERR_INTERNET_DISCONNECTED = -106, - ERR_SSL_PROTOCOL_ERROR = -107, - ERR_ADDRESS_INVALID = -108, - ERR_ADDRESS_UNREACHABLE = -109, - ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, - ERR_TUNNEL_CONNECTION_FAILED = -111, - ERR_NO_SSL_VERSIONS_ENABLED = -112, - ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, - ERR_SSL_RENEGOTIATION_REQUESTED = -114, - ERR_CERT_COMMON_NAME_INVALID = -200, - ERR_CERT_DATE_INVALID = -201, - ERR_CERT_AUTHORITY_INVALID = -202, - ERR_CERT_CONTAINS_ERRORS = -203, - ERR_CERT_NO_REVOCATION_MECHANISM = -204, - ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, - ERR_CERT_REVOKED = -206, - ERR_CERT_INVALID = -207, - ERR_CERT_END = -208, - ERR_INVALID_URL = -300, - ERR_DISALLOWED_URL_SCHEME = -301, - ERR_UNKNOWN_URL_SCHEME = -302, - ERR_TOO_MANY_REDIRECTS = -310, - ERR_UNSAFE_REDIRECT = -311, - ERR_UNSAFE_PORT = -312, - ERR_INVALID_RESPONSE = -320, - ERR_INVALID_CHUNKED_ENCODING = -321, - ERR_METHOD_NOT_SUPPORTED = -322, - ERR_UNEXPECTED_PROXY_AUTH = -323, - ERR_EMPTY_RESPONSE = -324, - ERR_RESPONSE_HEADERS_TOO_BIG = -325, - ERR_CACHE_MISS = -400, - ERR_INSECURE_RESPONSE = -501, -}; - -/// -// V8 access control values. -/// -enum cef_v8_accesscontrol_t { - V8_ACCESS_CONTROL_DEFAULT = 0, - V8_ACCESS_CONTROL_ALL_CAN_READ = 1, - V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, - V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2 -}; - -/// -// V8 property attribute values. -/// -enum cef_v8_propertyattribute_t { - V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable, - // Configurable - V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable - V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable - V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 // Not configurable -}; - -/// -// Post data elements may represent either bytes or files. -/// -enum cef_postdataelement_type_t { - PDE_TYPE_EMPTY = 0, - PDE_TYPE_BYTES, - PDE_TYPE_FILE, -}; - -/// -// Flags used to customize the behavior of CefURLRequest. -/// -enum cef_urlrequest_flags_t { - /// - // Default behavior. - /// - UR_FLAG_NONE = 0, - - /// - // If set the cache will be skipped when handling the request. - /// - UR_FLAG_SKIP_CACHE = 1 << 0, - - /// - // If set user name, password, and cookies may be sent with the request. - /// - UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1, - - /// - // If set cookies may be sent with the request and saved from the response. - // UR_FLAG_ALLOW_CACHED_CREDENTIALS must also be set. - /// - UR_FLAG_ALLOW_COOKIES = 1 << 2, - - /// - // If set upload progress events will be generated when a request has a body. - /// - UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3, - - /// - // If set load timing info will be collected for the request. - /// - UR_FLAG_REPORT_LOAD_TIMING = 1 << 4, - - /// - // If set the headers sent and received for the request will be recorded. - /// - UR_FLAG_REPORT_RAW_HEADERS = 1 << 5, - - /// - // If set the CefURLRequestClient::OnDownloadData method will not be called. - /// - UR_FLAG_NO_DOWNLOAD_DATA = 1 << 6, - - /// - // If set 5XX redirect errors will be propagated to the observer instead of - // automatically re-tried. This currently only applies for requests - // originated in the browser process. - /// - UR_FLAG_NO_RETRY_ON_5XX = 1 << 7, -}; - -/// -// Flags that represent CefURLRequest status. -/// -enum cef_urlrequest_status_t { - /// - // Unknown status. - /// - UR_UNKNOWN = 0, - - /// - // Request succeeded. - /// - UR_SUCCESS, - - /// - // An IO request is pending, and the caller will be informed when it is - // completed. - /// - UR_IO_PENDING, - - /// - // Request was canceled programatically. - /// - UR_CANCELED, - - /// - // Request failed for some reason. - /// - UR_FAILED, -}; - -/// -// Structure representing a rectangle. -/// -typedef struct _cef_rect_t { - int x; - int y; - int width; - int height; -} cef_rect_t; - -/// -// Existing process IDs. -/// -enum cef_process_id_t { - /// - // Browser process. - /// - PID_BROWSER, - /// - // Renderer process. - /// - PID_RENDERER, -}; - -/// -// Existing thread IDs. -/// -enum cef_thread_id_t { -// BROWSER PROCESS THREADS -- Only available in the browser process. - - /// - // The main thread in the browser. This will be the same as the main - // application thread if CefInitialize() is called with a - // CefSettings.multi_threaded_message_loop value of false. - /// - TID_UI, - - /// - // Used to interact with the database. - /// - TID_DB, - - /// - // Used to interact with the file system. - /// - TID_FILE, - - /// - // Used for file system operations that block user interactions. - // Responsiveness of this thread affects users. - /// - TID_FILE_USER_BLOCKING, - - /// - // Used to launch and terminate browser processes. - /// - TID_PROCESS_LAUNCHER, - - /// - // Used to handle slow HTTP cache operations. - /// - TID_CACHE, - - /// - // Used to process IPC and network messages. - /// - TID_IO, - -// RENDER PROCESS THREADS -- Only available in the render process. - - /// - // The main thread in the renderer. Used for all WebKit and V8 interaction. - /// - TID_RENDERER, -}; - -/// -// Supported value types. -/// -enum cef_value_type_t { - VTYPE_INVALID = 0, - VTYPE_NULL, - VTYPE_BOOL, - VTYPE_INT, - VTYPE_DOUBLE, - VTYPE_STRING, - VTYPE_BINARY, - VTYPE_DICTIONARY, - VTYPE_LIST, -}; - -/// -// Supported JavaScript dialog types. -/// -enum cef_jsdialog_type_t { - JSDIALOGTYPE_ALERT = 0, - JSDIALOGTYPE_CONFIRM, - JSDIALOGTYPE_PROMPT, -}; - -/// -// Supported menu IDs. Non-English translations can be provided for the -// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString(). -/// -enum cef_menu_id_t { - // Navigation. - MENU_ID_BACK = 100, - MENU_ID_FORWARD = 101, - MENU_ID_RELOAD = 102, - MENU_ID_RELOAD_NOCACHE = 103, - MENU_ID_STOPLOAD = 104, - - // Editing. - MENU_ID_UNDO = 110, - MENU_ID_REDO = 111, - MENU_ID_CUT = 112, - MENU_ID_COPY = 113, - MENU_ID_PASTE = 114, - MENU_ID_DELETE = 115, - MENU_ID_SELECT_ALL = 116, - - // Miscellaneous. - MENU_ID_FIND = 130, - MENU_ID_PRINT = 131, - MENU_ID_VIEW_SOURCE = 132, - - // All user-defined menu IDs should come between MENU_ID_USER_FIRST and - // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges - // defined in the tools/gritsettings/resource_ids file. - MENU_ID_USER_FIRST = 26500, - MENU_ID_USER_LAST = 28500, -}; - -/// -// Mouse button types. -/// -enum cef_mouse_button_type_t { - MBT_LEFT = 0, - MBT_MIDDLE, - MBT_RIGHT, -}; - -/// -// Structure representing mouse event information. -/// -typedef struct _cef_mouse_event_t { - /// - // X coordinate relative to the left side of the view. - /// - int x; - - /// - // Y coordinate relative to the top side of the view. - /// - int y; - - /// - // Bit flags describing any pressed modifier keys. See - // cef_event_flags_t for values. - /// - uint32 modifiers; -} cef_mouse_event_t; - -/// -// Paint element types. -/// -enum cef_paint_element_type_t { - PET_VIEW = 0, - PET_POPUP, -}; - -/// -// Supported event bit flags. -/// -enum cef_event_flags_t { - EVENTFLAG_NONE = 0, - EVENTFLAG_CAPS_LOCK_ON = 1 << 0, - EVENTFLAG_SHIFT_DOWN = 1 << 1, - EVENTFLAG_CONTROL_DOWN = 1 << 2, - EVENTFLAG_ALT_DOWN = 1 << 3, - EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4, - EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5, - EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, - // Mac OS-X command key. - EVENTFLAG_COMMAND_DOWN = 1 << 7, - EVENTFLAG_NUM_LOCK_ON = 1 << 8, - EVENTFLAG_IS_KEY_PAD = 1 << 9, - EVENTFLAG_IS_LEFT = 1 << 10, - EVENTFLAG_IS_RIGHT = 1 << 11, -}; - -/// -// Supported menu item types. -/// -enum cef_menu_item_type_t { - MENUITEMTYPE_NONE, - MENUITEMTYPE_COMMAND, - MENUITEMTYPE_CHECK, - MENUITEMTYPE_RADIO, - MENUITEMTYPE_SEPARATOR, - MENUITEMTYPE_SUBMENU, -}; - -/// -// Supported context menu type flags. -/// -enum cef_context_menu_type_flags_t { - /// - // No node is selected. - /// - CM_TYPEFLAG_NONE = 0, - /// - // The top page is selected. - /// - CM_TYPEFLAG_PAGE = 1 << 0, - /// - // A subframe page is selected. - /// - CM_TYPEFLAG_FRAME = 1 << 1, - /// - // A link is selected. - /// - CM_TYPEFLAG_LINK = 1 << 2, - /// - // A media node is selected. - /// - CM_TYPEFLAG_MEDIA = 1 << 3, - /// - // There is a textual or mixed selection that is selected. - /// - CM_TYPEFLAG_SELECTION = 1 << 4, - /// - // An editable element is selected. - /// - CM_TYPEFLAG_EDITABLE = 1 << 5, -}; - -/// -// Supported context menu media types. -/// -enum cef_context_menu_media_type_t { - /// - // No special node is in context. - /// - CM_MEDIATYPE_NONE, - /// - // An image node is selected. - /// - CM_MEDIATYPE_IMAGE, - /// - // A video node is selected. - /// - CM_MEDIATYPE_VIDEO, - /// - // An audio node is selected. - /// - CM_MEDIATYPE_AUDIO, - /// - // A file node is selected. - /// - CM_MEDIATYPE_FILE, - /// - // A plugin node is selected. - /// - CM_MEDIATYPE_PLUGIN, -}; - -/// -// Supported context menu media state bit flags. -/// -enum cef_context_menu_media_state_flags_t { - CM_MEDIAFLAG_NONE = 0, - CM_MEDIAFLAG_ERROR = 1 << 0, - CM_MEDIAFLAG_PAUSED = 1 << 1, - CM_MEDIAFLAG_MUTED = 1 << 2, - CM_MEDIAFLAG_LOOP = 1 << 3, - CM_MEDIAFLAG_CAN_SAVE = 1 << 4, - CM_MEDIAFLAG_HAS_AUDIO = 1 << 5, - CM_MEDIAFLAG_HAS_VIDEO = 1 << 6, - CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7, - CM_MEDIAFLAG_CAN_PRINT = 1 << 8, - CM_MEDIAFLAG_CAN_ROTATE = 1 << 9, -}; - -/// -// Supported context menu edit state bit flags. -/// -enum cef_context_menu_edit_state_flags_t { - CM_EDITFLAG_NONE = 0, - CM_EDITFLAG_CAN_UNDO = 1 << 0, - CM_EDITFLAG_CAN_REDO = 1 << 1, - CM_EDITFLAG_CAN_CUT = 1 << 2, - CM_EDITFLAG_CAN_COPY = 1 << 3, - CM_EDITFLAG_CAN_PASTE = 1 << 4, - CM_EDITFLAG_CAN_DELETE = 1 << 5, - CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6, - CM_EDITFLAG_CAN_TRANSLATE = 1 << 7, -}; - -/// -// Key event types. -/// -enum cef_key_event_type_t { - KEYEVENT_RAWKEYDOWN = 0, - KEYEVENT_KEYDOWN, - KEYEVENT_KEYUP, - KEYEVENT_CHAR -}; - -/// -// Structure representing keyboard event information. -/// -typedef struct _cef_key_event_t { - /// - // The type of keyboard event. - /// - cef_key_event_type_t type; - - /// - // Bit flags describing any pressed modifier keys. See - // cef_event_flags_t for values. - /// - uint32 modifiers; - - /// - // The Windows key code for the key event. This value is used by the DOM - // specification. Sometimes it comes directly from the event (i.e. on - // Windows) and sometimes it's determined using a mapping function. See - // WebCore/platform/chromium/KeyboardCodes.h for the list of values. - /// - int windows_key_code; - - /// - // The actual key code genenerated by the platform. - /// - int native_key_code; - - /// - // Indicates whether the event is considered a "system key" event (see - // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). - // This value will always be false on non-Windows platforms. - /// - bool is_system_key; - - /// - // The character generated by the keystroke. - /// - char16 character; - - /// - // Same as |character| but unmodified by any concurrently-held modifiers - // (except shift). This is useful for working out shortcut keys. - /// - char16 unmodified_character; - - /// - // True if the focus is currently on an editable field on the page. This is - // useful for determining if standard key events should be intercepted. - /// - bool focus_on_editable_field; -} cef_key_event_t; - -/// -// Focus sources. -/// -enum cef_focus_source_t { - /// - // The source is explicit navigation via the API (LoadURL(), etc). - /// - FOCUS_SOURCE_NAVIGATION = 0, - /// - // The source is a system-generated focus event. - /// - FOCUS_SOURCE_SYSTEM, -}; - -/// -// Navigation types. -/// -enum cef_navigation_type_t { - NAVIGATION_LINK_CLICKED = 0, - NAVIGATION_FORM_SUBMITTED, - NAVIGATION_BACK_FORWARD, - NAVIGATION_RELOAD, - NAVIGATION_FORM_RESUBMITTED, - NAVIGATION_OTHER, -}; - -/// -// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and -// UTF16 (LE and BE) by default. All other types must be translated to UTF8 -// before being passed to the parser. If a BOM is detected and the correct -// decoder is available then that decoder will be used automatically. -/// -enum cef_xml_encoding_type_t { - XML_ENCODING_NONE = 0, - XML_ENCODING_UTF8, - XML_ENCODING_UTF16LE, - XML_ENCODING_UTF16BE, - XML_ENCODING_ASCII, -}; - -/// -// XML node types. -/// -enum cef_xml_node_type_t { - XML_NODE_UNSUPPORTED = 0, - XML_NODE_PROCESSING_INSTRUCTION, - XML_NODE_DOCUMENT_TYPE, - XML_NODE_ELEMENT_START, - XML_NODE_ELEMENT_END, - XML_NODE_ATTRIBUTE, - XML_NODE_TEXT, - XML_NODE_CDATA, - XML_NODE_ENTITY_REFERENCE, - XML_NODE_WHITESPACE, - XML_NODE_COMMENT, -}; - -/// -// Popup window features. -/// -typedef struct _cef_popup_features_t { - int x; - bool xSet; - int y; - bool ySet; - int width; - bool widthSet; - int height; - bool heightSet; - - bool menuBarVisible; - bool statusBarVisible; - bool toolBarVisible; - bool locationBarVisible; - bool scrollbarsVisible; - bool resizable; - - bool fullscreen; - bool dialog; - cef_string_list_t additionalFeatures; -} cef_popup_features_t; - -/// -// Proxy types. -/// -enum cef_proxy_type_t { - CEF_PROXY_TYPE_DIRECT = 0, - CEF_PROXY_TYPE_NAMED, - CEF_PROXY_TYPE_PAC_STRING, -}; - -/// -// Proxy information. -/// -typedef struct _cef_proxy_info_t { - enum cef_proxy_type_t proxyType; - cef_string_t proxyList; -} cef_proxy_info_t; - -/// -// DOM document types. -/// -enum cef_dom_document_type_t { - DOM_DOCUMENT_TYPE_UNKNOWN = 0, - DOM_DOCUMENT_TYPE_HTML, - DOM_DOCUMENT_TYPE_XHTML, - DOM_DOCUMENT_TYPE_PLUGIN, -}; - -/// -// DOM event category flags. -/// -enum cef_dom_event_category_t { - DOM_EVENT_CATEGORY_UNKNOWN = 0x0, - DOM_EVENT_CATEGORY_UI = 0x1, - DOM_EVENT_CATEGORY_MOUSE = 0x2, - DOM_EVENT_CATEGORY_MUTATION = 0x4, - DOM_EVENT_CATEGORY_KEYBOARD = 0x8, - DOM_EVENT_CATEGORY_TEXT = 0x10, - DOM_EVENT_CATEGORY_COMPOSITION = 0x20, - DOM_EVENT_CATEGORY_DRAG = 0x40, - DOM_EVENT_CATEGORY_CLIPBOARD = 0x80, - DOM_EVENT_CATEGORY_MESSAGE = 0x100, - DOM_EVENT_CATEGORY_WHEEL = 0x200, - DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400, - DOM_EVENT_CATEGORY_OVERFLOW = 0x800, - DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000, - DOM_EVENT_CATEGORY_POPSTATE = 0x2000, - DOM_EVENT_CATEGORY_PROGRESS = 0x4000, - DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000, - DOM_EVENT_CATEGORY_WEBKIT_ANIMATION = 0x10000, - DOM_EVENT_CATEGORY_WEBKIT_TRANSITION = 0x20000, - DOM_EVENT_CATEGORY_BEFORE_LOAD = 0x40000, -}; - -/// -// DOM event processing phases. -/// -enum cef_dom_event_phase_t { - DOM_EVENT_PHASE_UNKNOWN = 0, - DOM_EVENT_PHASE_CAPTURING, - DOM_EVENT_PHASE_AT_TARGET, - DOM_EVENT_PHASE_BUBBLING, -}; - -/// -// DOM node types. -/// -enum cef_dom_node_type_t { - DOM_NODE_TYPE_UNSUPPORTED = 0, - DOM_NODE_TYPE_ELEMENT, - DOM_NODE_TYPE_ATTRIBUTE, - DOM_NODE_TYPE_TEXT, - DOM_NODE_TYPE_CDATA_SECTION, - DOM_NODE_TYPE_ENTITY_REFERENCE, - DOM_NODE_TYPE_ENTITY, - DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS, - DOM_NODE_TYPE_COMMENT, - DOM_NODE_TYPE_DOCUMENT, - DOM_NODE_TYPE_DOCUMENT_TYPE, - DOM_NODE_TYPE_DOCUMENT_FRAGMENT, - DOM_NODE_TYPE_NOTATION, - DOM_NODE_TYPE_XPATH_NAMESPACE, -}; - -/// -// Supported file dialog modes. -/// -enum cef_file_dialog_mode_t { - /// - // Requires that the file exists before allowing the user to pick it. - /// - FILE_DIALOG_OPEN = 0, - - /// - // Like Open, but allows picking multiple files to open. - /// - FILE_DIALOG_OPEN_MULTIPLE, - - /// - // Allows picking a nonexistent file, and prompts to overwrite if the file - // already exists. - /// - FILE_DIALOG_SAVE, -}; - -/// -// Geoposition error codes. -/// -enum cef_geoposition_error_code_t { - GEOPOSITON_ERROR_NONE = 0, - GEOPOSITON_ERROR_PERMISSION_DENIED, - GEOPOSITON_ERROR_POSITION_UNAVAILABLE, - GEOPOSITON_ERROR_TIMEOUT, -}; - -/// -// Structure representing geoposition information. The properties of this -// structure correspond to those of the JavaScript Position object although -// their types may differ. -/// -typedef struct _cef_geoposition_t { - /// - // Latitude in decimal degrees north (WGS84 coordinate frame). - /// - double latitude; - - /// - // Longitude in decimal degrees west (WGS84 coordinate frame). - /// - double longitude; - - /// - // Altitude in meters (above WGS84 datum). - /// - double altitude; - - /// - // Accuracy of horizontal position in meters. - /// - double accuracy; - - /// - // Accuracy of altitude in meters. - /// - double altitude_accuracy; - - /// - // Heading in decimal degrees clockwise from true north. - /// - double heading; - - /// - // Horizontal component of device velocity in meters per second. - /// - double speed; - - /// - // Time of position measurement in miliseconds since Epoch in UTC time. This - // is taken from the host computer's system clock. - /// - cef_time_t timestamp; - - /// - // Error code, see enum above. - /// - cef_geoposition_error_code_t error_code; - - /// - // Human-readable error message. - /// - cef_string_t error_message; -} cef_geoposition_t; - -#ifdef __cplusplus -} -#endif - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ diff --git a/cef/include/internal/cef_types_linux.h b/cef/include/internal/cef_types_linux.h deleted file mode 100644 index e92c5d0b5..000000000 --- a/cef/include/internal/cef_types_linux.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2010 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_TYPES_LINUX_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_ -#pragma once - -#include "include/internal/cef_build.h" - -#if defined(OS_LINUX) -#include -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Handle types. -#define cef_cursor_handle_t GtkCursor* -#define cef_event_handle_t GdkEvent* -#define cef_window_handle_t GtkWidget* - -/// -// Structure representing CefExecuteProcess arguments. -/// -typedef struct _cef_main_args_t { - int argc; - char** argv; -} cef_main_args_t; - -/// -// Class representing window information. -/// -typedef struct _cef_window_info_t { - // Pointer for the parent GtkBox widget. - cef_window_handle_t parent_widget; - - // Pointer for the new browser widget. - cef_window_handle_t widget; -} cef_window_info_t; - -#ifdef __cplusplus -} -#endif - -#endif // OS_LINUX - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_ diff --git a/cef/include/internal/cef_types_mac.h b/cef/include/internal/cef_types_mac.h deleted file mode 100644 index 44863bd4b..000000000 --- a/cef/include/internal/cef_types_mac.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2010 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_TYPES_MAC_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_ -#pragma once - -#include "include/internal/cef_build.h" - -#if defined(OS_MACOSX) -#include "include/internal/cef_string.h" - -// Handle types. -#ifdef __cplusplus -#ifdef __OBJC__ -@class NSCursor; -@class NSEvent; -@class NSView; -#else -class NSCursor; -class NSEvent; -struct NSView; -#endif -#define cef_cursor_handle_t NSCursor* -#define cef_event_handle_t NSEvent* -#define cef_window_handle_t NSView* -#else -#define cef_cursor_handle_t void* -#define cef_event_handle_t void* -#define cef_window_handle_t void* -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/// -// Structure representing CefExecuteProcess arguments. -/// -typedef struct _cef_main_args_t { - int argc; - char** argv; -} cef_main_args_t; - -/// -// Class representing window information. -/// -typedef struct _cef_window_info_t { - cef_string_t window_name; - int x; - int y; - int width; - int height; - int hidden; - - // NSView pointer for the parent view. - cef_window_handle_t parent_view; - - // NSView pointer for the new browser view. - cef_window_handle_t view; -} cef_window_info_t; - -#ifdef __cplusplus -} -#endif - -#endif // OS_MACOSX - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_ diff --git a/cef/include/internal/cef_types_win.h b/cef/include/internal/cef_types_win.h deleted file mode 100644 index 136b89744..000000000 --- a/cef/include/internal/cef_types_win.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2009 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_TYPES_WIN_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_ -#pragma once - -#include "include/internal/cef_build.h" - -#if defined(OS_WIN) -#include -#include "include/internal/cef_string.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Handle types. -#define cef_cursor_handle_t HCURSOR -#define cef_event_handle_t MSG* -#define cef_window_handle_t HWND - -/// -// Structure representing CefExecuteProcess arguments. -/// -typedef struct _cef_main_args_t { - HINSTANCE instance; -} cef_main_args_t; - -/// -// Structure representing window information. -/// -typedef struct _cef_window_info_t { - // Standard parameters required by CreateWindowEx() - DWORD ex_style; - cef_string_t window_name; - DWORD style; - int x; - int y; - int width; - int height; - cef_window_handle_t parent_window; - HMENU menu; - - // Set to true to enable transparent painting. - BOOL transparent_painting; - - // Handle for the new browser window. - cef_window_handle_t window; -} cef_window_info_t; - -#ifdef __cplusplus -} -#endif - -#endif // OS_WIN - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_ diff --git a/cef/include/internal/cef_types_wrappers.h b/cef/include/internal/cef_types_wrappers.h deleted file mode 100644 index 54e9dc917..000000000 --- a/cef/include/internal/cef_types_wrappers.h +++ /dev/null @@ -1,653 +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. - -#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ -#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ -#pragma once - -#include "include/internal/cef_string.h" -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_types.h" - -/// -// Template class that provides common functionality for CEF structure wrapping. -/// -template -class CefStructBase : public traits::struct_type { - public: - typedef typename traits::struct_type struct_type; - - CefStructBase() : attached_to_(NULL) { - Init(); - } - virtual ~CefStructBase() { - // Only clear this object's data if it isn't currently attached to a - // structure. - if (!attached_to_) - Clear(this); - } - - CefStructBase(const CefStructBase& r) { - Init(); - *this = r; - } - CefStructBase(const struct_type& r) { // NOLINT(runtime/explicit) - Init(); - *this = r; - } - - /// - // Clear this object's values. - /// - void Reset() { - Clear(this); - Init(); - } - - /// - // Attach to the source structure's existing values. DetachTo() can be called - // to insert the values back into the existing structure. - /// - void AttachTo(struct_type& source) { - // Only clear this object's data if it isn't currently attached to a - // structure. - if (!attached_to_) - Clear(this); - - // This object is now attached to the new structure. - attached_to_ = &source; - - // Transfer ownership of the values from the source structure. - memcpy(static_cast(this), &source, sizeof(struct_type)); - } - - /// - // Relinquish ownership of values to the target structure. - /// - void DetachTo(struct_type& target) { - if (attached_to_ != &target) { - // Clear the target structure's values only if we are not currently - // attached to that structure. - Clear(&target); - } - - // Transfer ownership of the values to the target structure. - memcpy(&target, static_cast(this), sizeof(struct_type)); - - // Remove the references from this object. - Init(); - } - - /// - // Set this object's values. If |copy| is true the source structure's values - // will be copied instead of referenced. - /// - void Set(const struct_type& source, bool copy) { - traits::set(&source, this, copy); - } - - CefStructBase& operator=(const CefStructBase& s) { - return operator=(static_cast(s)); - } - - CefStructBase& operator=(const struct_type& s) { - Set(s, true); - return *this; - } - - protected: - void Init() { - memset(static_cast(this), 0, sizeof(struct_type)); - attached_to_ = NULL; - traits::init(this); - } - - static void Clear(struct_type* s) { traits::clear(s); } - - struct_type* attached_to_; -}; - - -struct CefRectTraits { - typedef cef_rect_t struct_type; - - static inline void init(struct_type* s) {} - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - *target = *src; - } -}; - -/// -// Class representing a rectangle. -/// -class CefRect : public CefStructBase { - public: - typedef CefStructBase parent; - - CefRect() : parent() {} - CefRect(const cef_rect_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefRect(const CefRect& r) : parent(r) {} // NOLINT(runtime/explicit) - CefRect(int x, int y, int width, int height) : parent() { - Set(x, y, width, height); - } - - bool IsEmpty() const { return width <= 0 || height <= 0; } - void Set(int x, int y, int width, int height) { - this->x = x, this->y = y, this->width = width, this->height = height; - } -}; - -inline bool operator==(const CefRect& a, const CefRect& b) { - return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height; -} - -inline bool operator!=(const CefRect& a, const CefRect& b) { - return !(a == b); -} - -struct CefKeyEventTraits { - typedef cef_key_event_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->type = src->type; - target->modifiers = src->modifiers; - target->windows_key_code = src->windows_key_code; - target->native_key_code = src->native_key_code; - target->is_system_key = src->is_system_key; - target->character = src->character; - target->unmodified_character = src->unmodified_character; - target->focus_on_editable_field = src->focus_on_editable_field; - } -}; - -/// -// Class representing a a keyboard event. -/// -typedef CefStructBase CefKeyEvent; - -struct CefMouseEventTraits { - typedef cef_mouse_event_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->x = src->x; - target->y = src->y; - target->modifiers = src->modifiers; - } -}; - -/// -// Class representing a mouse event. -/// -typedef CefStructBase CefMouseEvent; - -struct CefPopupFeaturesTraits { - typedef cef_popup_features_t struct_type; - - static inline void init(struct_type* s) { - s->menuBarVisible = true; - s->statusBarVisible = true; - s->toolBarVisible = true; - s->locationBarVisible = true; - s->scrollbarsVisible = true; - s->resizable = true; - } - - static inline void clear(struct_type* s) { - if (s->additionalFeatures) - cef_string_list_free(s->additionalFeatures); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - if (target->additionalFeatures) - cef_string_list_free(target->additionalFeatures); - target->additionalFeatures = src->additionalFeatures ? - cef_string_list_copy(src->additionalFeatures) : NULL; - - target->x = src->x; - target->xSet = src->xSet; - target->y = src->y; - target->ySet = src->ySet; - target->width = src->width; - target->widthSet = src->widthSet; - target->height = src->height; - target->heightSet = src->heightSet; - target->menuBarVisible = src->menuBarVisible; - target->statusBarVisible = src->statusBarVisible; - target->toolBarVisible = src->toolBarVisible; - target->locationBarVisible = src->locationBarVisible; - target->scrollbarsVisible = src->scrollbarsVisible; - target->resizable = src->resizable; - target->fullscreen = src->fullscreen; - target->dialog = src->dialog; - } -}; - -/// -// Class representing popup window features. -/// -typedef CefStructBase CefPopupFeatures; - - -struct CefSettingsTraits { - typedef cef_settings_t struct_type; - - static inline void init(struct_type* s) { - s->size = sizeof(struct_type); - } - - static inline void clear(struct_type* s) { - cef_string_clear(&s->browser_subprocess_path); - cef_string_clear(&s->cache_path); - cef_string_clear(&s->user_agent); - cef_string_clear(&s->product_version); - cef_string_clear(&s->locale); - cef_string_clear(&s->log_file); - cef_string_clear(&s->javascript_flags); - cef_string_clear(&s->resources_dir_path); - cef_string_clear(&s->locales_dir_path); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->single_process = src->single_process; - cef_string_set(src->browser_subprocess_path.str, - src->browser_subprocess_path.length, - &target->browser_subprocess_path, copy); - target->multi_threaded_message_loop = src->multi_threaded_message_loop; - target->command_line_args_disabled = src->command_line_args_disabled; - - cef_string_set(src->cache_path.str, src->cache_path.length, - &target->cache_path, copy); - cef_string_set(src->user_agent.str, src->user_agent.length, - &target->user_agent, copy); - cef_string_set(src->product_version.str, src->product_version.length, - &target->product_version, copy); - cef_string_set(src->locale.str, src->locale.length, &target->locale, copy); - - cef_string_set(src->log_file.str, src->log_file.length, &target->log_file, - copy); - target->log_severity = src->log_severity; - target->release_dcheck_enabled = src->release_dcheck_enabled; - cef_string_set(src->javascript_flags.str, src->javascript_flags.length, - &target->javascript_flags, copy); - - target->auto_detect_proxy_settings_enabled = - src->auto_detect_proxy_settings_enabled; - - cef_string_set(src->resources_dir_path.str, src->resources_dir_path.length, - &target->resources_dir_path, copy); - cef_string_set(src->locales_dir_path.str, src->locales_dir_path.length, - &target->locales_dir_path, copy); - target->pack_loading_disabled = src->pack_loading_disabled; - target->remote_debugging_port = src->remote_debugging_port; - target->uncaught_exception_stack_size = src->uncaught_exception_stack_size; - target->context_safety_implementation = src->context_safety_implementation; - } -}; - -/// -// Class representing initialization settings. -/// -typedef CefStructBase CefSettings; - - -struct CefBrowserSettingsTraits { - typedef cef_browser_settings_t struct_type; - - static inline void init(struct_type* s) { - s->size = sizeof(struct_type); - } - - static inline void clear(struct_type* s) { - cef_string_clear(&s->standard_font_family); - cef_string_clear(&s->fixed_font_family); - cef_string_clear(&s->serif_font_family); - cef_string_clear(&s->sans_serif_font_family); - cef_string_clear(&s->cursive_font_family); - cef_string_clear(&s->fantasy_font_family); - cef_string_clear(&s->default_encoding); - cef_string_clear(&s->user_style_sheet_location); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - cef_string_set(src->standard_font_family.str, - src->standard_font_family.length, &target->standard_font_family, copy); - cef_string_set(src->fixed_font_family.str, src->fixed_font_family.length, - &target->fixed_font_family, copy); - cef_string_set(src->serif_font_family.str, src->serif_font_family.length, - &target->serif_font_family, copy); - cef_string_set(src->sans_serif_font_family.str, - src->sans_serif_font_family.length, &target->sans_serif_font_family, - copy); - cef_string_set(src->cursive_font_family.str, - src->cursive_font_family.length, &target->cursive_font_family, copy); - cef_string_set(src->fantasy_font_family.str, - src->fantasy_font_family.length, &target->fantasy_font_family, copy); - - target->default_font_size = src->default_font_size; - target->default_fixed_font_size = src->default_fixed_font_size; - target->minimum_font_size = src->minimum_font_size; - target->minimum_logical_font_size = src->minimum_logical_font_size; - target->remote_fonts_disabled = src->remote_fonts_disabled; - - cef_string_set(src->default_encoding.str, src->default_encoding.length, - &target->default_encoding, copy); - - target->encoding_detector_enabled = src->encoding_detector_enabled; - target->javascript_disabled = src->javascript_disabled; - target->javascript_open_windows_disallowed = - src->javascript_open_windows_disallowed; - target->javascript_close_windows_disallowed = - src->javascript_close_windows_disallowed; - target->javascript_access_clipboard_disallowed = - src->javascript_access_clipboard_disallowed; - target->dom_paste_disabled = src->dom_paste_disabled; - target->caret_browsing_enabled = src->caret_browsing_enabled; - target->java_disabled = src->java_disabled; - target->plugins_disabled = src->plugins_disabled; - target->universal_access_from_file_urls_allowed = - src->universal_access_from_file_urls_allowed; - target->file_access_from_file_urls_allowed = - src->file_access_from_file_urls_allowed; - target->web_security_disabled = src->web_security_disabled; - target->xss_auditor_enabled = src->xss_auditor_enabled; - target->image_load_disabled = src->image_load_disabled; - target->shrink_standalone_images_to_fit = - src->shrink_standalone_images_to_fit; - target->site_specific_quirks_disabled = src->site_specific_quirks_disabled; - target->text_area_resize_disabled = src->text_area_resize_disabled; - target->page_cache_disabled = src->page_cache_disabled; - target->tab_to_links_disabled = src->tab_to_links_disabled; - target->hyperlink_auditing_disabled = src->hyperlink_auditing_disabled; - target->user_style_sheet_enabled = src->user_style_sheet_enabled; - - cef_string_set(src->user_style_sheet_location.str, - src->user_style_sheet_location.length, - &target->user_style_sheet_location, copy); - - target->author_and_user_styles_disabled = - src->author_and_user_styles_disabled; - target->local_storage_disabled = src->local_storage_disabled; - target->databases_disabled = src->databases_disabled; - target->application_cache_disabled = src->application_cache_disabled; - target->webgl_disabled = src->webgl_disabled; - target->accelerated_compositing_disabled = - src->accelerated_compositing_disabled; - target->accelerated_layers_disabled = src->accelerated_layers_disabled; - target->accelerated_video_disabled = src->accelerated_video_disabled; - target->accelerated_2d_canvas_disabled = - src->accelerated_2d_canvas_disabled; - target->accelerated_plugins_disabled = src->accelerated_plugins_disabled; - target->developer_tools_disabled = src->developer_tools_disabled; - } -}; - -/// -// Class representing browser initialization settings. -/// -typedef CefStructBase CefBrowserSettings; - - -struct CefURLPartsTraits { - typedef cef_urlparts_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->spec); - cef_string_clear(&s->scheme); - cef_string_clear(&s->username); - cef_string_clear(&s->password); - cef_string_clear(&s->host); - cef_string_clear(&s->port); - cef_string_clear(&s->path); - cef_string_clear(&s->query); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - cef_string_set(src->spec.str, src->spec.length, &target->spec, copy); - cef_string_set(src->scheme.str, src->scheme.length, &target->scheme, copy); - cef_string_set(src->username.str, src->username.length, &target->username, - copy); - cef_string_set(src->password.str, src->password.length, &target->password, - copy); - cef_string_set(src->host.str, src->host.length, &target->host, copy); - cef_string_set(src->port.str, src->port.length, &target->port, copy); - cef_string_set(src->path.str, src->path.length, &target->path, copy); - cef_string_set(src->query.str, src->query.length, &target->query, copy); - } -}; - -/// -// Class representing a URL's component parts. -/// -typedef CefStructBase CefURLParts; - - -struct CefTimeTraits { - typedef cef_time_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - *target = *src; - } -}; - -/// -// Class representing a time. -/// -class CefTime : public CefStructBase { - public: - typedef CefStructBase parent; - - CefTime() : parent() {} - CefTime(const cef_time_t& r) : parent(r) {} // NOLINT(runtime/explicit) - CefTime(const CefTime& r) : parent(r) {} // NOLINT(runtime/explicit) - explicit CefTime(time_t r) : parent() { SetTimeT(r); } - explicit CefTime(double r) : parent() { SetDoubleT(r); } - - // Converts to/from time_t. - void SetTimeT(time_t r) { - cef_time_from_timet(r, this); - } - time_t GetTimeT() const { - time_t time = 0; - cef_time_to_timet(this, &time); - return time; - } - - // Converts to/from a double which is the number of seconds since epoch - // (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 - // means "not initialized". - void SetDoubleT(double r) { - cef_time_from_doublet(r, this); - } - double GetDoubleT() const { - double time = 0; - cef_time_to_doublet(this, &time); - return time; - } - - // Set this object to now. - void Now() { - cef_time_now(this); - } - - // Return the delta between this object and |other| in milliseconds. - long long Delta(const CefTime& other) { - long long delta = 0; - cef_time_delta(this, &other, &delta); - return delta; - } -}; - - -struct CefCookieTraits { - typedef cef_cookie_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->name); - cef_string_clear(&s->value); - cef_string_clear(&s->domain); - cef_string_clear(&s->path); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - cef_string_set(src->name.str, src->name.length, &target->name, copy); - cef_string_set(src->value.str, src->value.length, &target->value, copy); - cef_string_set(src->domain.str, src->domain.length, &target->domain, copy); - cef_string_set(src->path.str, src->path.length, &target->path, copy); - target->secure = src->secure; - target->httponly = src->httponly; - target->creation = src->creation; - target->last_access = src->last_access; - target->has_expires = src->has_expires; - target->expires = src->expires; - } -}; - -/// -// Class representing a cookie. -/// -typedef CefStructBase CefCookie; - - -struct CefProxyInfoTraits { - typedef cef_proxy_info_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->proxyList); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->proxyType = src->proxyType; - cef_string_set(src->proxyList.str, src->proxyList.length, - &target->proxyList, copy); - } -}; - -/// -// Class representing the results of proxy resolution. -/// -class CefProxyInfo : public CefStructBase { - public: - /// - // Use a direction connection instead of a proxy. - /// - void UseDirect() { - proxyType = CEF_PROXY_TYPE_DIRECT; - } - - /// - // Use one or more named proxy servers specified in WinHTTP format. Each proxy - // server is of the form: - // - // ["://"][":"] - // - // Multiple values may be separated by semicolons or whitespace. For example, - // "foo1:80;foo2:80". - /// - void UseNamedProxy(const CefString& proxy_uri_list) { - proxyType = CEF_PROXY_TYPE_NAMED; - (CefString(&proxyList)) = proxy_uri_list; - } - - /// - // Use one or more named proxy servers specified in PAC script format. For - // example, "PROXY foobar:99; SOCKS fml:2; DIRECT". - /// - void UsePacString(const CefString& pac_string) { - proxyType = CEF_PROXY_TYPE_PAC_STRING; - (CefString(&proxyList)) = pac_string; - } - - bool IsDirect() const { return proxyType == CEF_PROXY_TYPE_DIRECT; } - bool IsNamedProxy() const { return proxyType == CEF_PROXY_TYPE_NAMED; } - bool IsPacString() const { return proxyType == CEF_PROXY_TYPE_PAC_STRING; } - - CefString ProxyList() const { return CefString(&proxyList); } -}; - -struct CefGeopositionTraits { - typedef cef_geoposition_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->error_message); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->latitude = src->latitude; - target->longitude = src->longitude; - target->altitude = src->altitude; - target->accuracy = src->accuracy; - target->altitude_accuracy = src->altitude_accuracy; - target->heading = src->heading; - target->speed = src->speed; - target->timestamp = src->timestamp; - target->error_code = src->error_code; - cef_string_set(src->error_message.str, src->error_message.length, - &target->error_message, copy); - } -}; - -/// -// Class representing a geoposition. -/// -typedef CefStructBase CefGeoposition; - -#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ diff --git a/cef/include/internal/cef_win.h b/cef/include/internal/cef_win.h deleted file mode 100644 index 1115bd161..000000000 --- a/cef/include/internal/cef_win.h +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2008 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_WIN_H_ -#define CEF_INCLUDE_INTERNAL_CEF_WIN_H_ -#pragma once - -#if defined(OS_WIN) -#include -#include "include/internal/cef_types_win.h" -#include "include/internal/cef_types_wrappers.h" - -/// -// Atomic increment and decrement. -/// -#define CefAtomicIncrement(p) InterlockedIncrement(p) -#define CefAtomicDecrement(p) InterlockedDecrement(p) - -/// -// Critical section wrapper. -/// -class CefCriticalSection { - public: - CefCriticalSection() { - memset(&m_sec, 0, sizeof(CRITICAL_SECTION)); - InitializeCriticalSection(&m_sec); - } - virtual ~CefCriticalSection() { - DeleteCriticalSection(&m_sec); - } - void Lock() { - EnterCriticalSection(&m_sec); - } - void Unlock() { - LeaveCriticalSection(&m_sec); - } - - CRITICAL_SECTION m_sec; -}; - -/// -// Handle types. -/// -#define CefCursorHandle cef_cursor_handle_t -#define CefEventHandle cef_event_handle_t -#define CefWindowHandle cef_window_handle_t - -struct CefMainArgsTraits { - typedef cef_main_args_t struct_type; - - static inline void init(struct_type* s) {} - static inline void clear(struct_type* s) {} - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->instance = src->instance; - } -}; - -// Class representing CefExecuteProcess arguments. -class CefMainArgs : public CefStructBase { - public: - typedef CefStructBase parent; - - CefMainArgs() : parent() {} - explicit CefMainArgs(const cef_main_args_t& r) : parent(r) {} - explicit CefMainArgs(const CefMainArgs& r) : parent(r) {} - explicit CefMainArgs(HINSTANCE hInstance) : parent() { - instance = hInstance; - } -}; - -struct CefWindowInfoTraits { - typedef cef_window_info_t struct_type; - - static inline void init(struct_type* s) {} - - static inline void clear(struct_type* s) { - cef_string_clear(&s->window_name); - } - - static inline void set(const struct_type* src, struct_type* target, - bool copy) { - target->ex_style = src->ex_style; - cef_string_set(src->window_name.str, src->window_name.length, - &target->window_name, copy); - target->style = src->style; - target->x = src->x; - target->y = src->y; - target->width = src->width; - target->height = src->height; - target->parent_window = src->parent_window; - target->menu = src->menu; - target->window = src->window; - target->transparent_painting = src->transparent_painting; - } -}; - -/// -// Class representing window information. -/// -class CefWindowInfo : public CefStructBase { - public: - typedef CefStructBase parent; - - CefWindowInfo() : parent() {} - explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} - explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} - - void SetAsChild(HWND hWndParent, RECT windowRect) { - style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP | - WS_VISIBLE; - parent_window = hWndParent; - x = windowRect.left; - y = windowRect.top; - width = windowRect.right - windowRect.left; - height = windowRect.bottom - windowRect.top; - } - - void SetAsPopup(HWND hWndParent, const CefString& windowName) { - style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | - WS_VISIBLE; - parent_window = hWndParent; - x = CW_USEDEFAULT; - y = CW_USEDEFAULT; - width = CW_USEDEFAULT; - height = CW_USEDEFAULT; - - cef_string_copy(windowName.c_str(), windowName.length(), &window_name); - } - - void SetTransparentPainting(BOOL transparentPainting) { - transparent_painting = transparentPainting; - } -}; - -#endif // OS_WIN - -#endif // CEF_INCLUDE_INTERNAL_CEF_WIN_H_ diff --git a/cef/include/wrapper/cef_byte_read_handler.h b/cef/include/wrapper/cef_byte_read_handler.h deleted file mode 100644 index 1752588de..000000000 --- a/cef/include/wrapper/cef_byte_read_handler.h +++ /dev/null @@ -1,74 +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 are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ -#define CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_stream.h" - -/// -// Thread safe implementation of the CefReadHandler class for reading an -// in-memory array of bytes. -/// -class CefByteReadHandler : public CefReadHandler { - public: - /// - // Create a new object for reading an array of bytes. An optional |source| - // reference can be kept to keep the underlying data source from being - // released while the reader exists. - /// - CefByteReadHandler(const unsigned char* bytes, - size_t size, - CefRefPtr source); - - // CefReadHandler methods. - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; - - private: - const unsigned char* bytes_; - int64 size_; - int64 offset_; - CefRefPtr source_; - - IMPLEMENT_REFCOUNTING(CefByteReadHandler); - IMPLEMENT_LOCKING(CefByteReadHandler); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_ diff --git a/cef/include/wrapper/cef_stream_resource_handler.h b/cef/include/wrapper/cef_stream_resource_handler.h deleted file mode 100644 index 181bbbfe8..000000000 --- a/cef/include/wrapper/cef_stream_resource_handler.h +++ /dev/null @@ -1,85 +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 are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_ -#define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_resource_handler.h" -#include "include/cef_response.h" - -class CefStreamReader; - -/// -// Implementation of the CefResourceHandler class for reading from a CefStream. -/// -class CefStreamResourceHandler : public CefResourceHandler { - public: - /// - // Create a new object with default response values. - /// - CefStreamResourceHandler(const CefString& mime_type, - CefRefPtr stream); - /// - // Create a new object with explicit response values. - /// - CefStreamResourceHandler(int status_code, - const CefString& mime_type, - CefResponse::HeaderMap header_map, - CefRefPtr stream); - - // CefStreamResourceHandler methods. - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) OVERRIDE; - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl) OVERRIDE; - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) OVERRIDE; - virtual void Cancel() OVERRIDE; - - private: - int status_code_; - CefString mime_type_; - CefResponse::HeaderMap header_map_; - CefRefPtr stream_; - - IMPLEMENT_REFCOUNTING(CefStreamResourceHandler); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_ diff --git a/cef/include/wrapper/cef_xml_object.h b/cef/include/wrapper/cef_xml_object.h deleted file mode 100644 index d9f706fde..000000000 --- a/cef/include/wrapper/cef_xml_object.h +++ /dev/null @@ -1,188 +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 are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_ -#define CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/cef_xml_reader.h" -#include -#include - -class CefStreamReader; - -/// -// Thread safe class for representing XML data as a structured object. This -// class should not be used with large XML documents because all data will be -// resident in memory at the same time. This implementation supports a -// restricted set of XML features: -//
-// (1) Processing instructions, whitespace and comments are ignored.
-// (2) Elements and attributes must always be referenced using the fully
-//     qualified name (ie, namespace:localname).
-// (3) Empty elements () and elements with zero-length values ()
-//     are considered the same.
-// (4) Element nodes are considered part of a value if:
-//     (a) The element node follows a non-element node at the same depth
-//         (see 5), or
-//     (b) The element node does not have a namespace and the parent node does.
-// (5) Mixed node types at the same depth are combined into a single element
-//     value as follows:
-//     (a) All node values are concatenated to form a single string value.
-//     (b) Entity reference nodes are resolved to the corresponding entity
-//         value.
-//     (c) Element nodes are represented by their outer XML string.
-// 
-/// -class CefXmlObject : public CefBase { - public: - typedef std::vector > ObjectVector; - typedef std::map AttributeMap; - - /// - // Create a new object with the specified name. An object name must always be - // at least one character long. - /// - explicit CefXmlObject(const CefString& name); - virtual ~CefXmlObject(); - - /// - // Load the contents of the specified XML stream into this object. The - // existing children and attributes, if any, will first be cleared. - /// - bool Load(CefRefPtr stream, - CefXmlReader::EncodingType encodingType, - const CefString& URI, CefString* loadError); - - /// - // Set the name, children and attributes of this object to a duplicate of the - // specified object's contents. The existing children and attributes, if any, - // will first be cleared. - /// - void Set(CefRefPtr object); - - /// - // Append a duplicate of the children and attributes of the specified object - // to this object. If |overwriteAttributes| is true then any attributes in - // this object that also exist in the specified object will be overwritten - // with the new values. The name of this object is not changed. - /// - void Append(CefRefPtr object, bool overwriteAttributes); - - /// - // Return a new object with the same name, children and attributes as this - // object. The parent of the new object will be NULL. - /// - CefRefPtr Duplicate(); - - /// - // Clears this object's children and attributes. The name and parenting of - // this object are not changed. - /// - void Clear(); - - /// - // Access the object's name. An object name must always be at least one - // character long. - /// - CefString GetName(); - bool SetName(const CefString& name); - - /// - // Access the object's parent. The parent can be NULL if this object has not - // been added as the child on another object. - /// - bool HasParent(); - CefRefPtr GetParent(); - - /// - // Access the object's value. An object cannot have a value if it also has - // children. Attempting to set the value while children exist will fail. - /// - bool HasValue(); - CefString GetValue(); - bool SetValue(const CefString& value); - - /// - // Access the object's attributes. Attributes must have unique names. - /// - bool HasAttributes(); - size_t GetAttributeCount(); - bool HasAttribute(const CefString& name); - CefString GetAttributeValue(const CefString& name); - bool SetAttributeValue(const CefString& name, const CefString& value); - size_t GetAttributes(AttributeMap& attributes); - void ClearAttributes(); - - /// - // Access the object's children. Each object can only have one parent so - // attempting to add an object that already has a parent will fail. Removing a - // child will set the child's parent to NULL. Adding a child will set the - // child's parent to this object. This object's value, if any, will be cleared - // if a child is added. - /// - bool HasChildren(); - size_t GetChildCount(); - bool HasChild(CefRefPtr child); - bool AddChild(CefRefPtr child); - bool RemoveChild(CefRefPtr child); - size_t GetChildren(ObjectVector& children); - void ClearChildren(); - - /// - // Find the first child with the specified name. - /// - CefRefPtr FindChild(const CefString& name); - - /// - // Find all children with the specified name. - /// - size_t FindChildren(const CefString& name, ObjectVector& children); - - private: - void SetParent(CefXmlObject* parent); - - CefString name_; - CefXmlObject* parent_; - CefString value_; - AttributeMap attributes_; - ObjectVector children_; - - IMPLEMENT_REFCOUNTING(CefXmlObject); - IMPLEMENT_LOCKING(CefXmlObject); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_ diff --git a/cef/include/wrapper/cef_zip_archive.h b/cef/include/wrapper/cef_zip_archive.h deleted file mode 100644 index b58dbca01..000000000 --- a/cef/include/wrapper/cef_zip_archive.h +++ /dev/null @@ -1,132 +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 are only available to applications that link -// against the libcef_dll_wrapper target. -// - -#ifndef CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_ -#define CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_ -#pragma once - -#include "include/cef_base.h" -#include - -class CefStreamReader; - -/// -// Thread-safe class for accessing zip archive file contents. This class should -// not be used with large archive files because all data will be resident in -// memory at the same time. This implementation supports a restricted set of zip -// archive features: -// (1) Password-protected files are not supported. -// (2) All file names are stored and compared in lower case. -// (3) File ordering from the original zip archive is not maintained. This -// means that files from the same folder may not be located together in the -// file content map. -/// -class CefZipArchive : public CefBase { - public: - /// - // Class representing a file in the archive. Accessing the file data from - // multiple threads is safe provided a reference to the File object is kept. - /// - class File : public CefBase { - public: - /// - // Returns the read-only data contained in the file. - /// - virtual const unsigned char* GetData() =0; - - /// - // Returns the size of the data in the file. - /// - virtual size_t GetDataSize() =0; - - /// - // Returns a CefStreamReader object for streaming the contents of the file. - /// - virtual CefRefPtr GetStreamReader() =0; - }; - typedef std::map > FileMap; - - /// - // Create a new object. - /// - CefZipArchive(); - virtual ~CefZipArchive(); - - /// - // Load the contents of the specified zip archive stream into this object. - // If |overwriteExisting| is true then any files in this object that also - // exist in the specified archive will be replaced with the new files. - // Returns the number of files successfully loaded. - /// - size_t Load(CefRefPtr stream, bool overwriteExisting); - - /// - // Clears the contents of this object. - /// - void Clear(); - - /// - // Returns the number of files in the archive. - /// - size_t GetFileCount(); - - /// - // Returns true if the specified file exists and has contents. - /// - bool HasFile(const CefString& fileName); - - /// - // Returns the specified file. - /// - CefRefPtr GetFile(const CefString& fileName); - - /// - // Removes the specified file. - /// - bool RemoveFile(const CefString& fileName); - - /// - // Returns the map of all files. - /// - size_t GetFiles(FileMap& map); - - private: - FileMap contents_; - - IMPLEMENT_REFCOUNTING(CefZipArchive); - IMPLEMENT_LOCKING(CefZipArchive); -}; - -#endif // CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_ diff --git a/cef/libcef_dll/cef_logging.h b/cef/libcef_dll/cef_logging.h deleted file mode 100644 index 5d28a004e..000000000 --- a/cef/libcef_dll/cef_logging.h +++ /dev/null @@ -1,22 +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. - -#ifndef CEF_LIBCEF_DLL_CEF_LOGGING_H_ -#define CEF_LIBCEF_DLL_CEF_LOGGING_H_ -#pragma once - -#ifdef BUILDING_CEF_SHARED -#include "base/logging.h" -#else -#include // NOLINT(build/include_order) -#define DCHECK(condition) assert(condition) -#define DCHECK_EQ(val1, val2) DCHECK(val1 == val2) -#define DCHECK_NE(val1, val2) DCHECK(val1 != val2) -#define DCHECK_LE(val1, val2) DCHECK(val1 <= val2) -#define DCHECK_LT(val1, val2) DCHECK(val1 < val2) -#define DCHECK_GE(val1, val2) DCHECK(val1 >= val2) -#define DCHECK_GT(val1, val2) DCHECK(val1 > val2) -#endif - -#endif // CEF_LIBCEF_DLL_CEF_LOGGING_H_ diff --git a/cef/libcef_dll/cpptoc/app_cpptoc.cc b/cef/libcef_dll/cpptoc/app_cpptoc.cc deleted file mode 100644 index 5973f0f6b..000000000 --- a/cef/libcef_dll/cpptoc/app_cpptoc.cc +++ /dev/null @@ -1,124 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/app_cpptoc.h" -#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK app_on_before_command_line_processing(struct _cef_app_t* self, - const cef_string_t* process_type, - struct _cef_command_line_t* command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: command_line; type: refptr_diff - DCHECK(command_line); - if (!command_line) - return; - // Unverified params: process_type - - // Execute - CefAppCppToC::Get(self)->OnBeforeCommandLineProcessing( - CefString(process_type), - CefCommandLineCToCpp::Wrap(command_line)); -} - -void CEF_CALLBACK app_on_register_custom_schemes(struct _cef_app_t* self, - struct _cef_scheme_registrar_t* registrar) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: registrar; type: refptr_diff - DCHECK(registrar); - if (!registrar) - return; - - // Execute - CefAppCppToC::Get(self)->OnRegisterCustomSchemes( - CefSchemeRegistrarCToCpp::Wrap(registrar)); -} - -struct _cef_resource_bundle_handler_t* CEF_CALLBACK app_get_resource_bundle_handler( - struct _cef_app_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefAppCppToC::Get( - self)->GetResourceBundleHandler(); - - // Return type: refptr_same - return CefResourceBundleHandlerCppToC::Wrap(_retval); -} - -struct _cef_browser_process_handler_t* CEF_CALLBACK app_get_browser_process_handler( - struct _cef_app_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefAppCppToC::Get( - self)->GetBrowserProcessHandler(); - - // Return type: refptr_same - return CefBrowserProcessHandlerCppToC::Wrap(_retval); -} - -struct _cef_render_process_handler_t* CEF_CALLBACK app_get_render_process_handler( - struct _cef_app_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefAppCppToC::Get( - self)->GetRenderProcessHandler(); - - // Return type: refptr_same - return CefRenderProcessHandlerCppToC::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefAppCppToC::CefAppCppToC(CefApp* cls) - : CefCppToC(cls) { - struct_.struct_.on_before_command_line_processing = - app_on_before_command_line_processing; - struct_.struct_.on_register_custom_schemes = app_on_register_custom_schemes; - struct_.struct_.get_resource_bundle_handler = app_get_resource_bundle_handler; - struct_.struct_.get_browser_process_handler = app_get_browser_process_handler; - struct_.struct_.get_render_process_handler = app_get_render_process_handler; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/app_cpptoc.h b/cef/libcef_dll/cpptoc/app_cpptoc.h deleted file mode 100644 index 3daad00fc..000000000 --- a/cef/libcef_dll/cpptoc/app_cpptoc.h +++ /dev/null @@ -1,36 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_app.h" -#include "include/capi/cef_app_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefAppCppToC - : public CefCppToC { - public: - explicit CefAppCppToC(CefApp* cls); - virtual ~CefAppCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc deleted file mode 100644 index f9186a67b..000000000 --- a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/auth_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK auth_callback_cont(struct _cef_auth_callback_t* self, - const cef_string_t* username, const cef_string_t* password) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: username; type: string_byref_const - DCHECK(username); - if (!username) - return; - // Verify param: password; type: string_byref_const - DCHECK(password); - if (!password) - return; - - // Execute - CefAuthCallbackCppToC::Get(self)->Continue( - CefString(username), - CefString(password)); -} - -void CEF_CALLBACK auth_callback_cancel(struct _cef_auth_callback_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefAuthCallbackCppToC::Get(self)->Cancel(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefAuthCallbackCppToC::CefAuthCallbackCppToC(CefAuthCallback* cls) - : CefCppToC( - cls) { - struct_.struct_.cont = auth_callback_cont; - struct_.struct_.cancel = auth_callback_cancel; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h b/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h deleted file mode 100644 index a8bcded5b..000000000 --- a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefAuthCallbackCppToC - : public CefCppToC { - public: - explicit CefAuthCallbackCppToC(CefAuthCallback* cls); - virtual ~CefAuthCallbackCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/base_cpptoc.h b/cef/libcef_dll/cpptoc/base_cpptoc.h deleted file mode 100644 index 1184d718a..000000000 --- a/cef/libcef_dll/cpptoc/base_cpptoc.h +++ /dev/null @@ -1,146 +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. - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/cef_logging.h" - - -// CefCppToC implementation for CefBase. -class CefBaseCppToC : public CefBase { - public: - // Use this method to retrieve the underlying class instance from our - // own structure when the structure is passed as the required first - // parameter of a C API function call. No explicit reference counting - // is done in this case. - static CefRefPtr Get(cef_base_t* s) { - DCHECK(s); - - // Cast our structure to the wrapper structure type. - CefBaseCppToC::Struct* wrapperStruct = - reinterpret_cast(s); - // Return the underlying object instance. - return wrapperStruct->class_->GetClass(); - } - - // Use this method to create a wrapper structure for passing our class - // instance to the other side. - static cef_base_t* Wrap(CefRefPtr c) { - if (!c.get()) - return NULL; - - // Wrap our object with the CefCppToC class. - CefBaseCppToC* wrapper = new CefBaseCppToC(c); - // Add a reference to our wrapper object that will be released once our - // structure arrives on the other side. - wrapper->AddRef(); - // Return the structure pointer that can now be passed to the other side. - return wrapper->GetStruct(); - } - - // Use this method to retrieve the underlying class instance when receiving - // our wrapper structure back from the other side. - static CefRefPtr Unwrap(cef_base_t* s) { - if (!s) - return NULL; - - // Cast our structure to the wrapper structure type. - CefBaseCppToC::Struct* wrapperStruct = - reinterpret_cast(s); - // Add the underlying object instance to a smart pointer. - CefRefPtr objectPtr(wrapperStruct->class_->GetClass()); - // Release the reference to our wrapper object that was added before the - // structure was passed back to us. - wrapperStruct->class_->Release(); - // Return the underlying object instance. - return objectPtr; - } - - // Structure representation with pointer to the C++ class. - struct Struct { - cef_base_t struct_; - CefBaseCppToC* class_; - }; - - explicit CefBaseCppToC(CefBase* cls) - : class_(cls) { - DCHECK(cls); - - struct_.class_ = this; - - // zero the underlying structure and set base members - memset(&struct_.struct_, 0, sizeof(cef_base_t)); - struct_.struct_.size = sizeof(cef_base_t); - struct_.struct_.add_ref = struct_add_ref; - struct_.struct_.release = struct_release; - struct_.struct_.get_refct = struct_get_refct; - } - virtual ~CefBaseCppToC() {} - - CefBase* GetClass() { return class_; } - - // If returning the structure across the DLL boundary you should call - // AddRef() on this CefCppToC object. On the other side of the DLL boundary, - // call UnderlyingRelease() on the wrapping CefCToCpp object. - cef_base_t* GetStruct() { return &struct_.struct_; } - - // CefBase methods increment/decrement reference counts on both this object - // and the underlying wrapper class. - int AddRef() { - UnderlyingAddRef(); - return refct_.AddRef(); - } - int Release() { - UnderlyingRelease(); - int retval = refct_.Release(); - if (retval == 0) - delete this; - return retval; - } - int GetRefCt() { return refct_.GetRefCt(); } - - // Increment/decrement reference counts on only the underlying class. - int UnderlyingAddRef() { return class_->AddRef(); } - int UnderlyingRelease() { return class_->Release(); } - int UnderlyingGetRefCt() { return class_->GetRefCt(); } - - private: - static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - Struct* impl = reinterpret_cast(base); - return impl->class_->AddRef(); - } - - static int CEF_CALLBACK struct_release(struct _cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - Struct* impl = reinterpret_cast(base); - return impl->class_->Release(); - } - - static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - Struct* impl = reinterpret_cast(base); - return impl->class_->GetRefCt(); - } - - protected: - CefRefCount refct_; - Struct struct_; - CefBase* class_; -}; - -#endif // CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc deleted file mode 100644 index 8d922bfee..000000000 --- a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/before_download_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK before_download_callback_cont( - struct _cef_before_download_callback_t* self, - const cef_string_t* download_path, int show_dialog) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Unverified params: download_path - - // Execute - CefBeforeDownloadCallbackCppToC::Get(self)->Continue( - CefString(download_path), - show_dialog?true:false); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBeforeDownloadCallbackCppToC::CefBeforeDownloadCallbackCppToC( - CefBeforeDownloadCallback* cls) - : CefCppToC(cls) { - struct_.struct_.cont = before_download_callback_cont; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = - 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h b/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h deleted file mode 100644 index a4bea8390..000000000 --- a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BEFORE_DOWNLOAD_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BEFORE_DOWNLOAD_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefBeforeDownloadCallbackCppToC - : public CefCppToC { - public: - explicit CefBeforeDownloadCallbackCppToC(CefBeforeDownloadCallback* cls); - virtual ~CefBeforeDownloadCallbackCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BEFORE_DOWNLOAD_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc b/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc deleted file mode 100644 index 0929b1614..000000000 --- a/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/binary_value_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data, - size_t data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return NULL; - - // Execute - CefRefPtr _retval = CefBinaryValue::Create( - data, - data_size); - - // Return type: refptr_same - return CefBinaryValueCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK binary_value_is_valid(struct _cef_binary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBinaryValueCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK binary_value_is_owned(struct _cef_binary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBinaryValueCppToC::Get(self)->IsOwned(); - - // Return type: bool - return _retval; -} - -struct _cef_binary_value_t* CEF_CALLBACK binary_value_copy( - struct _cef_binary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBinaryValueCppToC::Get(self)->Copy(); - - // Return type: refptr_same - return CefBinaryValueCppToC::Wrap(_retval); -} - -size_t CEF_CALLBACK binary_value_get_size(struct _cef_binary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefBinaryValueCppToC::Get(self)->GetSize(); - - // Return type: simple - return _retval; -} - -size_t CEF_CALLBACK binary_value_get_data(struct _cef_binary_value_t* self, - void* buffer, size_t buffer_size, size_t data_offset) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return 0; - - // Execute - size_t _retval = CefBinaryValueCppToC::Get(self)->GetData( - buffer, - buffer_size, - data_offset); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBinaryValueCppToC::CefBinaryValueCppToC(CefBinaryValue* cls) - : CefCppToC(cls) { - struct_.struct_.is_valid = binary_value_is_valid; - struct_.struct_.is_owned = binary_value_is_owned; - struct_.struct_.copy = binary_value_copy; - struct_.struct_.get_size = binary_value_get_size; - struct_.struct_.get_data = binary_value_get_data; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/binary_value_cpptoc.h b/cef/libcef_dll/cpptoc/binary_value_cpptoc.h deleted file mode 100644 index bc85f1ccf..000000000 --- a/cef/libcef_dll/cpptoc/binary_value_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefBinaryValueCppToC - : public CefCppToC { - public: - explicit CefBinaryValueCppToC(CefBinaryValue* cls); - virtual ~CefBinaryValueCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/browser_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_cpptoc.cc deleted file mode 100644 index 6d024f278..000000000 --- a/cef/libcef_dll/cpptoc/browser_cpptoc.cc +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/browser_host_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/process_message_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -struct _cef_browser_host_t* CEF_CALLBACK browser_get_host( - struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserCppToC::Get(self)->GetHost(); - - // Return type: refptr_same - return CefBrowserHostCppToC::Wrap(_retval); -} - -int CEF_CALLBACK browser_can_go_back(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBrowserCppToC::Get(self)->CanGoBack(); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK browser_go_back(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserCppToC::Get(self)->GoBack(); -} - -int CEF_CALLBACK browser_can_go_forward(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBrowserCppToC::Get(self)->CanGoForward(); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK browser_go_forward(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserCppToC::Get(self)->GoForward(); -} - -int CEF_CALLBACK browser_is_loading(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBrowserCppToC::Get(self)->IsLoading(); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK browser_reload(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserCppToC::Get(self)->Reload(); -} - -void CEF_CALLBACK browser_reload_ignore_cache(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserCppToC::Get(self)->ReloadIgnoreCache(); -} - -void CEF_CALLBACK browser_stop_load(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserCppToC::Get(self)->StopLoad(); -} - -int CEF_CALLBACK browser_get_identifier(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefBrowserCppToC::Get(self)->GetIdentifier(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK browser_is_popup(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBrowserCppToC::Get(self)->IsPopup(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK browser_has_document(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefBrowserCppToC::Get(self)->HasDocument(); - - // Return type: bool - return _retval; -} - -struct _cef_frame_t* CEF_CALLBACK browser_get_main_frame( - struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserCppToC::Get(self)->GetMainFrame(); - - // Return type: refptr_same - return CefFrameCppToC::Wrap(_retval); -} - -struct _cef_frame_t* CEF_CALLBACK browser_get_focused_frame( - struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserCppToC::Get(self)->GetFocusedFrame(); - - // Return type: refptr_same - return CefFrameCppToC::Wrap(_retval); -} - -struct _cef_frame_t* CEF_CALLBACK browser_get_frame_byident( - struct _cef_browser_t* self, int64 identifier) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserCppToC::Get(self)->GetFrame( - identifier); - - // Return type: refptr_same - return CefFrameCppToC::Wrap(_retval); -} - -struct _cef_frame_t* CEF_CALLBACK browser_get_frame(struct _cef_browser_t* self, - const cef_string_t* name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserCppToC::Get(self)->GetFrame( - CefString(name)); - - // Return type: refptr_same - return CefFrameCppToC::Wrap(_retval); -} - -size_t CEF_CALLBACK browser_get_frame_count(struct _cef_browser_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefBrowserCppToC::Get(self)->GetFrameCount(); - - // Return type: simple - return _retval; -} - -void CEF_CALLBACK browser_get_frame_identifiers(struct _cef_browser_t* self, - size_t* identifiersCount, int64* identifiers) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: identifiers; type: simple_vec_byref - DCHECK(identifiersCount && (*identifiersCount == 0 || identifiers)); - if (!identifiersCount || (*identifiersCount > 0 && !identifiers)) - return; - - // Translate param: identifiers; type: simple_vec_byref - std::vector identifiersList; - if (identifiersCount && *identifiersCount > 0 && identifiers) { - for (size_t i = 0; i < *identifiersCount; ++i) { - identifiersList.push_back(identifiers[i]); - } - } - - // Execute - CefBrowserCppToC::Get(self)->GetFrameIdentifiers( - identifiersList); - - // Restore param: identifiers; type: simple_vec_byref - if (identifiersCount && identifiers) { - *identifiersCount = std::min(identifiersList.size(), *identifiersCount); - if (*identifiersCount > 0) { - for (size_t i = 0; i < *identifiersCount; ++i) { - identifiers[i] = identifiersList[i]; - } - } - } -} - -void CEF_CALLBACK browser_get_frame_names(struct _cef_browser_t* self, - cef_string_list_t names) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: names; type: string_vec_byref - DCHECK(names); - if (!names) - return; - - // Translate param: names; type: string_vec_byref - std::vector namesList; - transfer_string_list_contents(names, namesList); - - // Execute - CefBrowserCppToC::Get(self)->GetFrameNames( - namesList); - - // Restore param: names; type: string_vec_byref - cef_string_list_clear(names); - transfer_string_list_contents(namesList, names); -} - -int CEF_CALLBACK browser_send_process_message(struct _cef_browser_t* self, - enum cef_process_id_t target_process, - struct _cef_process_message_t* message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: message; type: refptr_same - DCHECK(message); - if (!message) - return 0; - - // Execute - bool _retval = CefBrowserCppToC::Get(self)->SendProcessMessage( - target_process, - CefProcessMessageCppToC::Unwrap(message)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls) - : CefCppToC(cls) { - struct_.struct_.get_host = browser_get_host; - struct_.struct_.can_go_back = browser_can_go_back; - struct_.struct_.go_back = browser_go_back; - struct_.struct_.can_go_forward = browser_can_go_forward; - struct_.struct_.go_forward = browser_go_forward; - struct_.struct_.is_loading = browser_is_loading; - struct_.struct_.reload = browser_reload; - struct_.struct_.reload_ignore_cache = browser_reload_ignore_cache; - struct_.struct_.stop_load = browser_stop_load; - struct_.struct_.get_identifier = browser_get_identifier; - struct_.struct_.is_popup = browser_is_popup; - struct_.struct_.has_document = browser_has_document; - struct_.struct_.get_main_frame = browser_get_main_frame; - struct_.struct_.get_focused_frame = browser_get_focused_frame; - struct_.struct_.get_frame_byident = browser_get_frame_byident; - struct_.struct_.get_frame = browser_get_frame; - struct_.struct_.get_frame_count = browser_get_frame_count; - struct_.struct_.get_frame_identifiers = browser_get_frame_identifiers; - struct_.struct_.get_frame_names = browser_get_frame_names; - struct_.struct_.send_process_message = browser_send_process_message; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/browser_cpptoc.h b/cef/libcef_dll/cpptoc/browser_cpptoc.h deleted file mode 100644 index eb8994163..000000000 --- a/cef/libcef_dll/cpptoc/browser_cpptoc.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefBrowserCppToC - : public CefCppToC { - public: - explicit CefBrowserCppToC(CefBrowser* cls); - virtual ~CefBrowserCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc deleted file mode 100644 index 7110b3f49..000000000 --- a/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/browser_host_cpptoc.h" -#include "libcef_dll/ctocpp/client_ctocpp.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT int cef_browser_host_create_browser( - const cef_window_info_t* windowInfo, struct _cef_client_t* client, - const cef_string_t* url, const struct _cef_browser_settings_t* settings) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: windowInfo; type: struct_byref_const - DCHECK(windowInfo); - if (!windowInfo) - return 0; - // Verify param: client; type: refptr_diff - DCHECK(client); - if (!client) - return 0; - // Verify param: settings; type: struct_byref_const - DCHECK(settings); - if (!settings) - return 0; - // Unverified params: url - - // Translate param: windowInfo; type: struct_byref_const - CefWindowInfo windowInfoObj; - if (windowInfo) - windowInfoObj.Set(*windowInfo, false); - // Translate param: settings; type: struct_byref_const - CefBrowserSettings settingsObj; - if (settings) - settingsObj.Set(*settings, false); - - // Execute - bool _retval = CefBrowserHost::CreateBrowser( - windowInfoObj, - CefClientCToCpp::Wrap(client), - CefString(url), - settingsObj); - - // Return type: bool - return _retval; -} - -CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync( - const cef_window_info_t* windowInfo, struct _cef_client_t* client, - const cef_string_t* url, const struct _cef_browser_settings_t* settings) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: windowInfo; type: struct_byref_const - DCHECK(windowInfo); - if (!windowInfo) - return NULL; - // Verify param: client; type: refptr_diff - DCHECK(client); - if (!client) - return NULL; - // Verify param: settings; type: struct_byref_const - DCHECK(settings); - if (!settings) - return NULL; - // Unverified params: url - - // Translate param: windowInfo; type: struct_byref_const - CefWindowInfo windowInfoObj; - if (windowInfo) - windowInfoObj.Set(*windowInfo, false); - // Translate param: settings; type: struct_byref_const - CefBrowserSettings settingsObj; - if (settings) - settingsObj.Set(*settings, false); - - // Execute - CefRefPtr _retval = CefBrowserHost::CreateBrowserSync( - windowInfoObj, - CefClientCToCpp::Wrap(client), - CefString(url), - settingsObj); - - // Return type: refptr_same - return CefBrowserCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_browser_t* CEF_CALLBACK browser_host_get_browser( - struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserHostCppToC::Get(self)->GetBrowser(); - - // Return type: refptr_same - return CefBrowserCppToC::Wrap(_retval); -} - -void CEF_CALLBACK browser_host_parent_window_will_close( - struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserHostCppToC::Get(self)->ParentWindowWillClose(); -} - -void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserHostCppToC::Get(self)->CloseBrowser(); -} - -void CEF_CALLBACK browser_host_set_focus(struct _cef_browser_host_t* self, - int enable) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserHostCppToC::Get(self)->SetFocus( - enable?true:false); -} - -cef_window_handle_t CEF_CALLBACK browser_host_get_window_handle( - struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - cef_window_handle_t _retval = CefBrowserHostCppToC::Get( - self)->GetWindowHandle(); - - // Return type: simple - return _retval; -} - -cef_window_handle_t CEF_CALLBACK browser_host_get_opener_window_handle( - struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - cef_window_handle_t _retval = CefBrowserHostCppToC::Get( - self)->GetOpenerWindowHandle(); - - // Return type: simple - return _retval; -} - -struct _cef_client_t* CEF_CALLBACK browser_host_get_client( - struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserHostCppToC::Get(self)->GetClient(); - - // Return type: refptr_diff - return CefClientCToCpp::Unwrap(_retval); -} - -cef_string_userfree_t CEF_CALLBACK browser_host_get_dev_tools_url( - struct _cef_browser_host_t* self, int http_scheme) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefBrowserHostCppToC::Get(self)->GetDevToolsURL( - http_scheme?true:false); - - // Return type: string - return _retval.DetachToUserFree(); -} - -double CEF_CALLBACK browser_host_get_zoom_level( - struct _cef_browser_host_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - double _retval = CefBrowserHostCppToC::Get(self)->GetZoomLevel(); - - // Return type: simple - return _retval; -} - -void CEF_CALLBACK browser_host_set_zoom_level(struct _cef_browser_host_t* self, - double zoomLevel) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserHostCppToC::Get(self)->SetZoomLevel( - zoomLevel); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls) - : CefCppToC(cls) { - struct_.struct_.get_browser = browser_host_get_browser; - struct_.struct_.parent_window_will_close = - browser_host_parent_window_will_close; - struct_.struct_.close_browser = browser_host_close_browser; - struct_.struct_.set_focus = browser_host_set_focus; - struct_.struct_.get_window_handle = browser_host_get_window_handle; - struct_.struct_.get_opener_window_handle = - browser_host_get_opener_window_handle; - struct_.struct_.get_client = browser_host_get_client; - struct_.struct_.get_dev_tools_url = browser_host_get_dev_tools_url; - struct_.struct_.get_zoom_level = browser_host_get_zoom_level; - struct_.struct_.set_zoom_level = browser_host_set_zoom_level; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/browser_host_cpptoc.h b/cef/libcef_dll/cpptoc/browser_host_cpptoc.h deleted file mode 100644 index e81a489bf..000000000 --- a/cef/libcef_dll/cpptoc/browser_host_cpptoc.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefBrowserHostCppToC - : public CefCppToC { - public: - explicit CefBrowserHostCppToC(CefBrowserHost* cls); - virtual ~CefBrowserHostCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc deleted file mode 100644 index 380053a7b..000000000 --- a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc +++ /dev/null @@ -1,105 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -struct _cef_proxy_handler_t* CEF_CALLBACK browser_process_handler_get_proxy_handler( - struct _cef_browser_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefBrowserProcessHandlerCppToC::Get( - self)->GetProxyHandler(); - - // Return type: refptr_same - return CefProxyHandlerCppToC::Wrap(_retval); -} - -void CEF_CALLBACK browser_process_handler_on_context_initialized( - struct _cef_browser_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefBrowserProcessHandlerCppToC::Get(self)->OnContextInitialized(); -} - -void CEF_CALLBACK browser_process_handler_on_before_child_process_launch( - struct _cef_browser_process_handler_t* self, - struct _cef_command_line_t* command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: command_line; type: refptr_diff - DCHECK(command_line); - if (!command_line) - return; - - // Execute - CefBrowserProcessHandlerCppToC::Get(self)->OnBeforeChildProcessLaunch( - CefCommandLineCToCpp::Wrap(command_line)); -} - -void CEF_CALLBACK browser_process_handler_on_render_process_thread_created( - struct _cef_browser_process_handler_t* self, - struct _cef_list_value_t* extra_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: extra_info; type: refptr_diff - DCHECK(extra_info); - if (!extra_info) - return; - - // Execute - CefBrowserProcessHandlerCppToC::Get(self)->OnRenderProcessThreadCreated( - CefListValueCToCpp::Wrap(extra_info)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC( - CefBrowserProcessHandler* cls) - : CefCppToC(cls) { - struct_.struct_.get_proxy_handler = browser_process_handler_get_proxy_handler; - struct_.struct_.on_context_initialized = - browser_process_handler_on_context_initialized; - struct_.struct_.on_before_child_process_launch = - browser_process_handler_on_before_child_process_launch; - struct_.struct_.on_render_process_thread_created = - browser_process_handler_on_render_process_thread_created; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h deleted file mode 100644 index 4285b4c1a..000000000 --- a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_browser_process_handler.h" -#include "include/capi/cef_browser_process_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefBrowserProcessHandlerCppToC - : public CefCppToC { - public: - explicit CefBrowserProcessHandlerCppToC(CefBrowserProcessHandler* cls); - virtual ~CefBrowserProcessHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/callback_cpptoc.cc b/cef/libcef_dll/cpptoc/callback_cpptoc.cc deleted file mode 100644 index e7200c976..000000000 --- a/cef/libcef_dll/cpptoc/callback_cpptoc.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK callback_cont(struct _cef_callback_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefCallbackCppToC::Get(self)->Continue(); -} - -void CEF_CALLBACK callback_cancel(struct _cef_callback_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefCallbackCppToC::Get(self)->Cancel(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCallbackCppToC::CefCallbackCppToC(CefCallback* cls) - : CefCppToC(cls) { - struct_.struct_.cont = callback_cont; - struct_.struct_.cancel = callback_cancel; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/callback_cpptoc.h b/cef/libcef_dll/cpptoc/callback_cpptoc.h deleted file mode 100644 index 7bfd70a29..000000000 --- a/cef/libcef_dll/cpptoc/callback_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_callback.h" -#include "include/capi/cef_callback_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefCallbackCppToC - : public CefCppToC { - public: - explicit CefCallbackCppToC(CefCallback* cls); - virtual ~CefCallbackCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/client_cpptoc.cc b/cef/libcef_dll/cpptoc/client_cpptoc.cc deleted file mode 100644 index 5ff860181..000000000 --- a/cef/libcef_dll/cpptoc/client_cpptoc.cc +++ /dev/null @@ -1,276 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/client_cpptoc.h" -#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" -#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/display_handler_cpptoc.h" -#include "libcef_dll/cpptoc/download_handler_cpptoc.h" -#include "libcef_dll/cpptoc/focus_handler_cpptoc.h" -#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h" -#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" -#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_handler_cpptoc.h" -#include "libcef_dll/cpptoc/request_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -struct _cef_context_menu_handler_t* CEF_CALLBACK client_get_context_menu_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetContextMenuHandler(); - - // Return type: refptr_same - return CefContextMenuHandlerCppToC::Wrap(_retval); -} - -struct _cef_dialog_handler_t* CEF_CALLBACK client_get_dialog_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDialogHandler(); - - // Return type: refptr_same - return CefDialogHandlerCppToC::Wrap(_retval); -} - -struct _cef_display_handler_t* CEF_CALLBACK client_get_display_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDisplayHandler(); - - // Return type: refptr_same - return CefDisplayHandlerCppToC::Wrap(_retval); -} - -struct _cef_download_handler_t* CEF_CALLBACK client_get_download_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetDownloadHandler(); - - // Return type: refptr_same - return CefDownloadHandlerCppToC::Wrap(_retval); -} - -struct _cef_focus_handler_t* CEF_CALLBACK client_get_focus_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetFocusHandler(); - - // Return type: refptr_same - return CefFocusHandlerCppToC::Wrap(_retval); -} - -struct _cef_geolocation_handler_t* CEF_CALLBACK client_get_geolocation_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetGeolocationHandler(); - - // Return type: refptr_same - return CefGeolocationHandlerCppToC::Wrap(_retval); -} - -struct _cef_jsdialog_handler_t* CEF_CALLBACK client_get_jsdialog_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetJSDialogHandler(); - - // Return type: refptr_same - return CefJSDialogHandlerCppToC::Wrap(_retval); -} - -struct _cef_keyboard_handler_t* CEF_CALLBACK client_get_keyboard_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetKeyboardHandler(); - - // Return type: refptr_same - return CefKeyboardHandlerCppToC::Wrap(_retval); -} - -struct _cef_life_span_handler_t* CEF_CALLBACK client_get_life_span_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetLifeSpanHandler(); - - // Return type: refptr_same - return CefLifeSpanHandlerCppToC::Wrap(_retval); -} - -struct _cef_load_handler_t* CEF_CALLBACK client_get_load_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetLoadHandler(); - - // Return type: refptr_same - return CefLoadHandlerCppToC::Wrap(_retval); -} - -struct _cef_render_handler_t* CEF_CALLBACK client_get_render_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetRenderHandler(); - - // Return type: refptr_same - return CefRenderHandlerCppToC::Wrap(_retval); -} - -struct _cef_request_handler_t* CEF_CALLBACK client_get_request_handler( - struct _cef_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefClientCppToC::Get( - self)->GetRequestHandler(); - - // Return type: refptr_same - return CefRequestHandlerCppToC::Wrap(_retval); -} - -int CEF_CALLBACK client_on_process_message_received(struct _cef_client_t* self, - cef_browser_t* browser, enum cef_process_id_t source_process, - struct _cef_process_message_t* message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: message; type: refptr_diff - DCHECK(message); - if (!message) - return 0; - - // Execute - bool _retval = CefClientCppToC::Get(self)->OnProcessMessageReceived( - CefBrowserCToCpp::Wrap(browser), - source_process, - CefProcessMessageCToCpp::Wrap(message)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefClientCppToC::CefClientCppToC(CefClient* cls) - : CefCppToC(cls) { - struct_.struct_.get_context_menu_handler = client_get_context_menu_handler; - struct_.struct_.get_dialog_handler = client_get_dialog_handler; - struct_.struct_.get_display_handler = client_get_display_handler; - struct_.struct_.get_download_handler = client_get_download_handler; - struct_.struct_.get_focus_handler = client_get_focus_handler; - struct_.struct_.get_geolocation_handler = client_get_geolocation_handler; - struct_.struct_.get_jsdialog_handler = client_get_jsdialog_handler; - struct_.struct_.get_keyboard_handler = client_get_keyboard_handler; - struct_.struct_.get_life_span_handler = client_get_life_span_handler; - struct_.struct_.get_load_handler = client_get_load_handler; - struct_.struct_.get_render_handler = client_get_render_handler; - struct_.struct_.get_request_handler = client_get_request_handler; - struct_.struct_.on_process_message_received = - client_on_process_message_received; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/client_cpptoc.h b/cef/libcef_dll/cpptoc/client_cpptoc.h deleted file mode 100644 index 93731f15d..000000000 --- a/cef/libcef_dll/cpptoc/client_cpptoc.h +++ /dev/null @@ -1,36 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefClientCppToC - : public CefCppToC { - public: - explicit CefClientCppToC(CefClient* cls); - virtual ~CefClientCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/command_line_cpptoc.cc b/cef/libcef_dll/cpptoc/command_line_cpptoc.cc deleted file mode 100644 index 26a0e6bba..000000000 --- a/cef/libcef_dll/cpptoc/command_line_cpptoc.cc +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/command_line_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_command_line_t* cef_command_line_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefCommandLine::CreateCommandLine(); - - // Return type: refptr_same - return CefCommandLineCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_command_line_t* cef_command_line_get_global() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefCommandLine::GetGlobalCommandLine(); - - // Return type: refptr_same - return CefCommandLineCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK command_line_is_valid(struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefCommandLineCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK command_line_is_read_only(struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefCommandLineCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -struct _cef_command_line_t* CEF_CALLBACK command_line_copy( - struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefCommandLineCppToC::Get(self)->Copy(); - - // Return type: refptr_same - return CefCommandLineCppToC::Wrap(_retval); -} - -void CEF_CALLBACK command_line_init_from_argv(struct _cef_command_line_t* self, - int argc, const char* const* argv) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: argv; type: simple_byaddr - DCHECK(argv); - if (!argv) - return; - - // Execute - CefCommandLineCppToC::Get(self)->InitFromArgv( - argc, - argv); -} - -void CEF_CALLBACK command_line_init_from_string( - struct _cef_command_line_t* self, const cef_string_t* command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: command_line; type: string_byref_const - DCHECK(command_line); - if (!command_line) - return; - - // Execute - CefCommandLineCppToC::Get(self)->InitFromString( - CefString(command_line)); -} - -void CEF_CALLBACK command_line_reset(struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefCommandLineCppToC::Get(self)->Reset(); -} - -cef_string_userfree_t CEF_CALLBACK command_line_get_command_line_string( - struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefCommandLineCppToC::Get(self)->GetCommandLineString(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK command_line_get_program( - struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefCommandLineCppToC::Get(self)->GetProgram(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK command_line_set_program(struct _cef_command_line_t* self, - const cef_string_t* program) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: program; type: string_byref_const - DCHECK(program); - if (!program) - return; - - // Execute - CefCommandLineCppToC::Get(self)->SetProgram( - CefString(program)); -} - -int CEF_CALLBACK command_line_has_switches(struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefCommandLineCppToC::Get(self)->HasSwitches(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK command_line_has_switch(struct _cef_command_line_t* self, - const cef_string_t* name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - - // Execute - bool _retval = CefCommandLineCppToC::Get(self)->HasSwitch( - CefString(name)); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK command_line_get_switch_value( - struct _cef_command_line_t* self, const cef_string_t* name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return NULL; - - // Execute - CefString _retval = CefCommandLineCppToC::Get(self)->GetSwitchValue( - CefString(name)); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK command_line_get_switches(struct _cef_command_line_t* self, - cef_string_map_t switches) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: switches; type: string_map_single_byref - DCHECK(switches); - if (!switches) - return; - - // Translate param: switches; type: string_map_single_byref - std::map switchesMap; - transfer_string_map_contents(switches, switchesMap); - - // Execute - CefCommandLineCppToC::Get(self)->GetSwitches( - switchesMap); - - // Restore param: switches; type: string_map_single_byref - cef_string_map_clear(switches); - transfer_string_map_contents(switchesMap, switches); -} - -void CEF_CALLBACK command_line_append_switch(struct _cef_command_line_t* self, - const cef_string_t* name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return; - - // Execute - CefCommandLineCppToC::Get(self)->AppendSwitch( - CefString(name)); -} - -void CEF_CALLBACK command_line_append_switch_with_value( - struct _cef_command_line_t* self, const cef_string_t* name, - const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return; - // Verify param: value; type: string_byref_const - DCHECK(value); - if (!value) - return; - - // Execute - CefCommandLineCppToC::Get(self)->AppendSwitchWithValue( - CefString(name), - CefString(value)); -} - -int CEF_CALLBACK command_line_has_arguments(struct _cef_command_line_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefCommandLineCppToC::Get(self)->HasArguments(); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK command_line_get_arguments(struct _cef_command_line_t* self, - cef_string_list_t arguments) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: arguments; type: string_vec_byref - DCHECK(arguments); - if (!arguments) - return; - - // Translate param: arguments; type: string_vec_byref - std::vector argumentsList; - transfer_string_list_contents(arguments, argumentsList); - - // Execute - CefCommandLineCppToC::Get(self)->GetArguments( - argumentsList); - - // Restore param: arguments; type: string_vec_byref - cef_string_list_clear(arguments); - transfer_string_list_contents(argumentsList, arguments); -} - -void CEF_CALLBACK command_line_append_argument(struct _cef_command_line_t* self, - const cef_string_t* argument) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: argument; type: string_byref_const - DCHECK(argument); - if (!argument) - return; - - // Execute - CefCommandLineCppToC::Get(self)->AppendArgument( - CefString(argument)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCommandLineCppToC::CefCommandLineCppToC(CefCommandLine* cls) - : CefCppToC(cls) { - struct_.struct_.is_valid = command_line_is_valid; - struct_.struct_.is_read_only = command_line_is_read_only; - struct_.struct_.copy = command_line_copy; - struct_.struct_.init_from_argv = command_line_init_from_argv; - struct_.struct_.init_from_string = command_line_init_from_string; - struct_.struct_.reset = command_line_reset; - struct_.struct_.get_command_line_string = - command_line_get_command_line_string; - struct_.struct_.get_program = command_line_get_program; - struct_.struct_.set_program = command_line_set_program; - struct_.struct_.has_switches = command_line_has_switches; - struct_.struct_.has_switch = command_line_has_switch; - struct_.struct_.get_switch_value = command_line_get_switch_value; - struct_.struct_.get_switches = command_line_get_switches; - struct_.struct_.append_switch = command_line_append_switch; - struct_.struct_.append_switch_with_value = - command_line_append_switch_with_value; - struct_.struct_.has_arguments = command_line_has_arguments; - struct_.struct_.get_arguments = command_line_get_arguments; - struct_.struct_.append_argument = command_line_append_argument; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/command_line_cpptoc.h b/cef/libcef_dll/cpptoc/command_line_cpptoc.h deleted file mode 100644 index 1d98acd79..000000000 --- a/cef/libcef_dll/cpptoc/command_line_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_command_line.h" -#include "include/capi/cef_command_line_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefCommandLineCppToC - : public CefCppToC { - public: - explicit CefCommandLineCppToC(CefCommandLine* cls); - virtual ~CefCommandLineCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc deleted file mode 100644 index 24d99be51..000000000 --- a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc +++ /dev/null @@ -1,132 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/menu_model_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK context_menu_handler_on_before_context_menu( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - struct _cef_menu_model_t* model) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: params; type: refptr_diff - DCHECK(params); - if (!params) - return; - // Verify param: model; type: refptr_diff - DCHECK(model); - if (!model) - return; - - // Execute - CefContextMenuHandlerCppToC::Get(self)->OnBeforeContextMenu( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefContextMenuParamsCToCpp::Wrap(params), - CefMenuModelCToCpp::Wrap(model)); -} - -int CEF_CALLBACK context_menu_handler_on_context_menu_command( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params, - int command_id, enum cef_event_flags_t event_flags) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: params; type: refptr_diff - DCHECK(params); - if (!params) - return 0; - - // Execute - bool _retval = CefContextMenuHandlerCppToC::Get(self)->OnContextMenuCommand( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefContextMenuParamsCToCpp::Wrap(params), - command_id, - event_flags); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK context_menu_handler_on_context_menu_dismissed( - struct _cef_context_menu_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - - // Execute - CefContextMenuHandlerCppToC::Get(self)->OnContextMenuDismissed( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefContextMenuHandlerCppToC::CefContextMenuHandlerCppToC( - CefContextMenuHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_before_context_menu = - context_menu_handler_on_before_context_menu; - struct_.struct_.on_context_menu_command = - context_menu_handler_on_context_menu_command; - struct_.struct_.on_context_menu_dismissed = - context_menu_handler_on_context_menu_dismissed; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h deleted file mode 100644 index f7592de0b..000000000 --- a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefContextMenuHandlerCppToC - : public CefCppToC { - public: - explicit CefContextMenuHandlerCppToC(CefContextMenuHandler* cls); - virtual ~CefContextMenuHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc b/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc deleted file mode 100644 index f9c7c8d77..000000000 --- a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/context_menu_params_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK context_menu_params_get_xcoord( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefContextMenuParamsCppToC::Get(self)->GetXCoord(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK context_menu_params_get_ycoord( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefContextMenuParamsCppToC::Get(self)->GetYCoord(); - - // Return type: simple - return _retval; -} - -enum cef_context_menu_type_flags_t CEF_CALLBACK context_menu_params_get_type_flags( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CM_TYPEFLAG_NONE; - - // Execute - cef_context_menu_type_flags_t _retval = CefContextMenuParamsCppToC::Get( - self)->GetTypeFlags(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_link_url( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get(self)->GetLinkUrl(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_unfiltered_link_url( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get( - self)->GetUnfilteredLinkUrl(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_source_url( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get(self)->GetSourceUrl(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK context_menu_params_is_image_blocked( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefContextMenuParamsCppToC::Get(self)->IsImageBlocked(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_page_url( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get(self)->GetPageUrl(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_frame_url( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get(self)->GetFrameUrl(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_frame_charset( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get(self)->GetFrameCharset(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -enum cef_context_menu_media_type_t CEF_CALLBACK context_menu_params_get_media_type( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CM_MEDIATYPE_NONE; - - // Execute - cef_context_menu_media_type_t _retval = CefContextMenuParamsCppToC::Get( - self)->GetMediaType(); - - // Return type: simple - return _retval; -} - -enum cef_context_menu_media_state_flags_t CEF_CALLBACK context_menu_params_get_media_state_flags( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CM_MEDIAFLAG_NONE; - - // Execute - cef_context_menu_media_state_flags_t _retval = - CefContextMenuParamsCppToC::Get(self)->GetMediaStateFlags(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK context_menu_params_get_selection_text( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefContextMenuParamsCppToC::Get(self)->GetSelectionText(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK context_menu_params_is_editable( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefContextMenuParamsCppToC::Get(self)->IsEditable(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK context_menu_params_is_speech_input_enabled( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefContextMenuParamsCppToC::Get(self)->IsSpeechInputEnabled(); - - // Return type: bool - return _retval; -} - -enum cef_context_menu_edit_state_flags_t CEF_CALLBACK context_menu_params_get_edit_state_flags( - struct _cef_context_menu_params_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CM_EDITFLAG_NONE; - - // Execute - cef_context_menu_edit_state_flags_t _retval = CefContextMenuParamsCppToC::Get( - self)->GetEditStateFlags(); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefContextMenuParamsCppToC::CefContextMenuParamsCppToC( - CefContextMenuParams* cls) - : CefCppToC(cls) { - struct_.struct_.get_xcoord = context_menu_params_get_xcoord; - struct_.struct_.get_ycoord = context_menu_params_get_ycoord; - struct_.struct_.get_type_flags = context_menu_params_get_type_flags; - struct_.struct_.get_link_url = context_menu_params_get_link_url; - struct_.struct_.get_unfiltered_link_url = - context_menu_params_get_unfiltered_link_url; - struct_.struct_.get_source_url = context_menu_params_get_source_url; - struct_.struct_.is_image_blocked = context_menu_params_is_image_blocked; - struct_.struct_.get_page_url = context_menu_params_get_page_url; - struct_.struct_.get_frame_url = context_menu_params_get_frame_url; - struct_.struct_.get_frame_charset = context_menu_params_get_frame_charset; - struct_.struct_.get_media_type = context_menu_params_get_media_type; - struct_.struct_.get_media_state_flags = - context_menu_params_get_media_state_flags; - struct_.struct_.get_selection_text = context_menu_params_get_selection_text; - struct_.struct_.is_editable = context_menu_params_is_editable; - struct_.struct_.is_speech_input_enabled = - context_menu_params_is_speech_input_enabled; - struct_.struct_.get_edit_state_flags = - context_menu_params_get_edit_state_flags; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h b/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h deleted file mode 100644 index 790f2e6fc..000000000 --- a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_PARAMS_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_PARAMS_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefContextMenuParamsCppToC - : public CefCppToC { - public: - explicit CefContextMenuParamsCppToC(CefContextMenuParams* cls); - virtual ~CefContextMenuParamsCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_PARAMS_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc b/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc deleted file mode 100644 index 5af5020de..000000000 --- a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h" -#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefCookieManager::GetGlobalManager(); - - // Return type: refptr_same - return CefCookieManagerCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager( - const cef_string_t* path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: path - - // Execute - CefRefPtr _retval = CefCookieManager::CreateManager( - CefString(path)); - - // Return type: refptr_same - return CefCookieManagerCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK cookie_manager_set_supported_schemes( - struct _cef_cookie_manager_t* self, cef_string_list_t schemes) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: schemes; type: string_vec_byref_const - DCHECK(schemes); - if (!schemes) - return; - - // Translate param: schemes; type: string_vec_byref_const - std::vector schemesList; - transfer_string_list_contents(schemes, schemesList); - - // Execute - CefCookieManagerCppToC::Get(self)->SetSupportedSchemes( - schemesList); -} - -int CEF_CALLBACK cookie_manager_visit_all_cookies( - struct _cef_cookie_manager_t* self, - struct _cef_cookie_visitor_t* visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor); - if (!visitor) - return 0; - - // Execute - bool _retval = CefCookieManagerCppToC::Get(self)->VisitAllCookies( - CefCookieVisitorCToCpp::Wrap(visitor)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK cookie_manager_visit_url_cookies( - struct _cef_cookie_manager_t* self, const cef_string_t* url, - int includeHttpOnly, struct _cef_cookie_visitor_t* visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return 0; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor); - if (!visitor) - return 0; - - // Execute - bool _retval = CefCookieManagerCppToC::Get(self)->VisitUrlCookies( - CefString(url), - includeHttpOnly?true:false, - CefCookieVisitorCToCpp::Wrap(visitor)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK cookie_manager_set_cookie(struct _cef_cookie_manager_t* self, - const cef_string_t* url, const struct _cef_cookie_t* cookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - - // Execute - bool _retval = CefCookieManagerCppToC::Get(self)->SetCookie( - CefString(url), - cookieObj); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK cookie_manager_delete_cookies( - struct _cef_cookie_manager_t* self, const cef_string_t* url, - const cef_string_t* cookie_name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Unverified params: url, cookie_name - - // Execute - bool _retval = CefCookieManagerCppToC::Get(self)->DeleteCookies( - CefString(url), - CefString(cookie_name)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK cookie_manager_set_storage_path( - struct _cef_cookie_manager_t* self, const cef_string_t* path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Unverified params: path - - // Execute - bool _retval = CefCookieManagerCppToC::Get(self)->SetStoragePath( - CefString(path)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCookieManagerCppToC::CefCookieManagerCppToC(CefCookieManager* cls) - : CefCppToC( - cls) { - struct_.struct_.set_supported_schemes = cookie_manager_set_supported_schemes; - struct_.struct_.visit_all_cookies = cookie_manager_visit_all_cookies; - struct_.struct_.visit_url_cookies = cookie_manager_visit_url_cookies; - struct_.struct_.set_cookie = cookie_manager_set_cookie; - struct_.struct_.delete_cookies = cookie_manager_delete_cookies; - struct_.struct_.set_storage_path = cookie_manager_set_storage_path; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h b/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h deleted file mode 100644 index cacc919f4..000000000 --- a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefCookieManagerCppToC - : public CefCppToC { - public: - explicit CefCookieManagerCppToC(CefCookieManager* cls); - virtual ~CefCookieManagerCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc deleted file mode 100644 index 0b26e62b5..000000000 --- a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc +++ /dev/null @@ -1,70 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self, - const struct _cef_cookie_t* cookie, int count, int total, - int* deleteCookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - // Verify param: deleteCookie; type: bool_byref - DCHECK(deleteCookie); - if (!deleteCookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - // Translate param: deleteCookie; type: bool_byref - bool deleteCookieBool = (deleteCookie && *deleteCookie)?true:false; - - // Execute - bool _retval = CefCookieVisitorCppToC::Get(self)->Visit( - cookieObj, - count, - total, - deleteCookieBool); - - // Restore param: deleteCookie; type: bool_byref - if (deleteCookie) - *deleteCookie = deleteCookieBool?true:false; - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls) - : CefCppToC( - cls) { - struct_.struct_.visit = cookie_visitor_visit; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h deleted file mode 100644 index 24d7d62f9..000000000 --- a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefCookieVisitorCppToC - : public CefCppToC { - public: - explicit CefCookieVisitorCppToC(CefCookieVisitor* cls); - virtual ~CefCookieVisitorCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/cpptoc.h b/cef/libcef_dll/cpptoc/cpptoc.h deleted file mode 100644 index 3449264f9..000000000 --- a/cef/libcef_dll/cpptoc/cpptoc.h +++ /dev/null @@ -1,160 +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. - -#ifndef CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/cef_logging.h" - - -// Wrap a C++ class with a C structure. This is used when the class -// implementation exists on this side of the DLL boundary but will have methods -// called from the other side of the DLL boundary. -template -class CefCppToC : public CefBase { - public: - // Structure representation with pointer to the C++ class. - struct Struct { - StructName struct_; - CefCppToC* class_; - }; - - // Use this method to retrieve the underlying class instance from our - // own structure when the structure is passed as the required first - // parameter of a C API function call. No explicit reference counting - // is done in this case. - static CefRefPtr Get(StructName* s) { - DCHECK(s); - - // Cast our structure to the wrapper structure type. - Struct* wrapperStruct = reinterpret_cast(s); - // Return the underlying object instance. - return wrapperStruct->class_->GetClass(); - } - - // Use this method to create a wrapper structure for passing our class - // instance to the other side. - static StructName* Wrap(CefRefPtr c) { - if (!c.get()) - return NULL; - - // Wrap our object with the CefCppToC class. - ClassName* wrapper = new ClassName(c); - // Add a reference to our wrapper object that will be released once our - // structure arrives on the other side. - wrapper->AddRef(); - // Return the structure pointer that can now be passed to the other side. - return wrapper->GetStruct(); - } - - // Use this method to retrieve the underlying class instance when receiving - // our wrapper structure back from the other side. - static CefRefPtr Unwrap(StructName* s) { - if (!s) - return NULL; - - // Cast our structure to the wrapper structure type. - Struct* wrapperStruct = reinterpret_cast(s); - // Add the underlying object instance to a smart pointer. - CefRefPtr objectPtr(wrapperStruct->class_->GetClass()); - // Release the reference to our wrapper object that was added before the - // structure was passed back to us. - wrapperStruct->class_->Release(); - // Return the underlying object instance. - return objectPtr; - } - - explicit CefCppToC(BaseName* cls) - : class_(cls) { - DCHECK(cls); - - struct_.class_ = this; - - // zero the underlying structure and set base members - memset(&struct_.struct_, 0, sizeof(StructName)); - struct_.struct_.base.size = sizeof(StructName); - struct_.struct_.base.add_ref = struct_add_ref; - struct_.struct_.base.release = struct_release; - struct_.struct_.base.get_refct = struct_get_refct; - -#ifndef NDEBUG - CefAtomicIncrement(&DebugObjCt); -#endif - } - virtual ~CefCppToC() { -#ifndef NDEBUG - CefAtomicDecrement(&DebugObjCt); -#endif - } - - BaseName* GetClass() { return class_; } - - // If returning the structure across the DLL boundary you should call - // AddRef() on this CefCppToC object. On the other side of the DLL boundary, - // call UnderlyingRelease() on the wrapping CefCToCpp object. - StructName* GetStruct() { return &struct_.struct_; } - - // CefBase methods increment/decrement reference counts on both this object - // and the underlying wrapper class. - int AddRef() { - UnderlyingAddRef(); - return refct_.AddRef(); - } - int Release() { - UnderlyingRelease(); - int retval = refct_.Release(); - if (retval == 0) - delete this; - return retval; - } - int GetRefCt() { return refct_.GetRefCt(); } - - // Increment/decrement reference counts on only the underlying class. - int UnderlyingAddRef() { return class_->AddRef(); } - int UnderlyingRelease() { return class_->Release(); } - int UnderlyingGetRefCt() { return class_->GetRefCt(); } - -#ifndef NDEBUG - // Simple tracking of allocated objects. - static long DebugObjCt; // NOLINT(runtime/int) -#endif - - private: - static int CEF_CALLBACK struct_add_ref(struct _cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - Struct* impl = reinterpret_cast(base); - return impl->class_->AddRef(); - } - - static int CEF_CALLBACK struct_release(struct _cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - Struct* impl = reinterpret_cast(base); - return impl->class_->Release(); - } - - static int CEF_CALLBACK struct_get_refct(struct _cef_base_t* base) { - DCHECK(base); - if (!base) - return 0; - - Struct* impl = reinterpret_cast(base); - return impl->class_->GetRefCt(); - } - - protected: - CefRefCount refct_; - Struct struct_; - BaseName* class_; -}; - -#endif // CEF_LIBCEF_DLL_CPPTOC_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc deleted file mode 100644 index 7714183b6..000000000 --- a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc +++ /dev/null @@ -1,71 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK dialog_handler_on_file_dialog( - struct _cef_dialog_handler_t* self, cef_browser_t* browser, - enum cef_file_dialog_mode_t mode, const cef_string_t* title, - const cef_string_t* default_file_name, cef_string_list_t accept_types, - cef_file_dialog_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: title, default_file_name, accept_types - - // Translate param: accept_types; type: string_vec_byref_const - std::vector accept_typesList; - transfer_string_list_contents(accept_types, accept_typesList); - - // Execute - bool _retval = CefDialogHandlerCppToC::Get(self)->OnFileDialog( - CefBrowserCToCpp::Wrap(browser), - mode, - CefString(title), - CefString(default_file_name), - accept_typesList, - CefFileDialogCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDialogHandlerCppToC::CefDialogHandlerCppToC(CefDialogHandler* cls) - : CefCppToC( - cls) { - struct_.struct_.on_file_dialog = dialog_handler_on_file_dialog; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h deleted file mode 100644 index 9d69fbadf..000000000 --- a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dialog_handler.h" -#include "include/capi/cef_dialog_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDialogHandlerCppToC - : public CefCppToC { - public: - explicit CefDialogHandlerCppToC(CefDialogHandler* cls); - virtual ~CefDialogHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc b/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc deleted file mode 100644 index 23f883c62..000000000 --- a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc +++ /dev/null @@ -1,577 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/binary_value_cpptoc.h" -#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" -#include "libcef_dll/cpptoc/list_value_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefDictionaryValue::Create(); - - // Return type: refptr_same - return CefDictionaryValueCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK dictionary_value_is_valid( - struct _cef_dictionary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_is_owned( - struct _cef_dictionary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->IsOwned(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_is_read_only( - struct _cef_dictionary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -struct _cef_dictionary_value_t* CEF_CALLBACK dictionary_value_copy( - struct _cef_dictionary_value_t* self, int exclude_empty_children) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDictionaryValueCppToC::Get( - self)->Copy( - exclude_empty_children?true:false); - - // Return type: refptr_same - return CefDictionaryValueCppToC::Wrap(_retval); -} - -size_t CEF_CALLBACK dictionary_value_get_size( - struct _cef_dictionary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefDictionaryValueCppToC::Get(self)->GetSize(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK dictionary_value_clear(struct _cef_dictionary_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->Clear(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_has_key(struct _cef_dictionary_value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->HasKey( - CefString(key)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_get_keys(struct _cef_dictionary_value_t* self, - cef_string_list_t keys) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: keys; type: string_vec_byref - DCHECK(keys); - if (!keys) - return 0; - - // Translate param: keys; type: string_vec_byref - std::vector keysList; - transfer_string_list_contents(keys, keysList); - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->GetKeys( - keysList); - - // Restore param: keys; type: string_vec_byref - cef_string_list_clear(keys); - transfer_string_list_contents(keysList, keys); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_remove(struct _cef_dictionary_value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->Remove( - CefString(key)); - - // Return type: bool - return _retval; -} - -enum cef_value_type_t CEF_CALLBACK dictionary_value_get_type( - struct _cef_dictionary_value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return VTYPE_INVALID; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return VTYPE_INVALID; - - // Execute - cef_value_type_t _retval = CefDictionaryValueCppToC::Get(self)->GetType( - CefString(key)); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK dictionary_value_get_bool(struct _cef_dictionary_value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->GetBool( - CefString(key)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_get_int(struct _cef_dictionary_value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - int _retval = CefDictionaryValueCppToC::Get(self)->GetInt( - CefString(key)); - - // Return type: simple - return _retval; -} - -double CEF_CALLBACK dictionary_value_get_double( - struct _cef_dictionary_value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - double _retval = CefDictionaryValueCppToC::Get(self)->GetDouble( - CefString(key)); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK dictionary_value_get_string( - struct _cef_dictionary_value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return NULL; - - // Execute - CefString _retval = CefDictionaryValueCppToC::Get(self)->GetString( - CefString(key)); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_binary_value_t* CEF_CALLBACK dictionary_value_get_binary( - struct _cef_dictionary_value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return NULL; - - // Execute - CefRefPtr _retval = CefDictionaryValueCppToC::Get( - self)->GetBinary( - CefString(key)); - - // Return type: refptr_same - return CefBinaryValueCppToC::Wrap(_retval); -} - -struct _cef_dictionary_value_t* CEF_CALLBACK dictionary_value_get_dictionary( - struct _cef_dictionary_value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return NULL; - - // Execute - CefRefPtr _retval = CefDictionaryValueCppToC::Get( - self)->GetDictionary( - CefString(key)); - - // Return type: refptr_same - return CefDictionaryValueCppToC::Wrap(_retval); -} - -struct _cef_list_value_t* CEF_CALLBACK dictionary_value_get_list( - struct _cef_dictionary_value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return NULL; - - // Execute - CefRefPtr _retval = CefDictionaryValueCppToC::Get( - self)->GetList( - CefString(key)); - - // Return type: refptr_same - return CefListValueCppToC::Wrap(_retval); -} - -int CEF_CALLBACK dictionary_value_set_null(struct _cef_dictionary_value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetNull( - CefString(key)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_bool(struct _cef_dictionary_value_t* self, - const cef_string_t* key, int value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetBool( - CefString(key), - value?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_int(struct _cef_dictionary_value_t* self, - const cef_string_t* key, int value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetInt( - CefString(key), - value); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_double( - struct _cef_dictionary_value_t* self, const cef_string_t* key, - double value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetDouble( - CefString(key), - value); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_string( - struct _cef_dictionary_value_t* self, const cef_string_t* key, - const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - // Unverified params: value - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetString( - CefString(key), - CefString(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_binary( - struct _cef_dictionary_value_t* self, const cef_string_t* key, - cef_binary_value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetBinary( - CefString(key), - CefBinaryValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_dictionary( - struct _cef_dictionary_value_t* self, const cef_string_t* key, - struct _cef_dictionary_value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetDictionary( - CefString(key), - CefDictionaryValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK dictionary_value_set_list(struct _cef_dictionary_value_t* self, - const cef_string_t* key, struct _cef_list_value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefDictionaryValueCppToC::Get(self)->SetList( - CefString(key), - CefListValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDictionaryValueCppToC::CefDictionaryValueCppToC(CefDictionaryValue* cls) - : CefCppToC(cls) { - struct_.struct_.is_valid = dictionary_value_is_valid; - struct_.struct_.is_owned = dictionary_value_is_owned; - struct_.struct_.is_read_only = dictionary_value_is_read_only; - struct_.struct_.copy = dictionary_value_copy; - struct_.struct_.get_size = dictionary_value_get_size; - struct_.struct_.clear = dictionary_value_clear; - struct_.struct_.has_key = dictionary_value_has_key; - struct_.struct_.get_keys = dictionary_value_get_keys; - struct_.struct_.remove = dictionary_value_remove; - struct_.struct_.get_type = dictionary_value_get_type; - struct_.struct_.get_bool = dictionary_value_get_bool; - struct_.struct_.get_int = dictionary_value_get_int; - struct_.struct_.get_double = dictionary_value_get_double; - struct_.struct_.get_string = dictionary_value_get_string; - struct_.struct_.get_binary = dictionary_value_get_binary; - struct_.struct_.get_dictionary = dictionary_value_get_dictionary; - struct_.struct_.get_list = dictionary_value_get_list; - struct_.struct_.set_null = dictionary_value_set_null; - struct_.struct_.set_bool = dictionary_value_set_bool; - struct_.struct_.set_int = dictionary_value_set_int; - struct_.struct_.set_double = dictionary_value_set_double; - struct_.struct_.set_string = dictionary_value_set_string; - struct_.struct_.set_binary = dictionary_value_set_binary; - struct_.struct_.set_dictionary = dictionary_value_set_dictionary; - struct_.struct_.set_list = dictionary_value_set_list; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h b/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h deleted file mode 100644 index 8614d1392..000000000 --- a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefDictionaryValueCppToC - : public CefCppToC { - public: - explicit CefDictionaryValueCppToC(CefDictionaryValue* cls); - virtual ~CefDictionaryValueCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc deleted file mode 100644 index dcf222d42..000000000 --- a/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc +++ /dev/null @@ -1,178 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/display_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK display_handler_on_loading_state_change( - struct _cef_display_handler_t* self, cef_browser_t* browser, int isLoading, - int canGoBack, int canGoForward) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnLoadingStateChange( - CefBrowserCToCpp::Wrap(browser), - isLoading?true:false, - canGoBack?true:false, - canGoForward?true:false); -} - -void CEF_CALLBACK display_handler_on_address_change( - struct _cef_display_handler_t* self, cef_browser_t* browser, - struct _cef_frame_t* frame, const cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnAddressChange( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(url)); -} - -void CEF_CALLBACK display_handler_on_title_change( - struct _cef_display_handler_t* self, cef_browser_t* browser, - const cef_string_t* title) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: title - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnTitleChange( - CefBrowserCToCpp::Wrap(browser), - CefString(title)); -} - -int CEF_CALLBACK display_handler_on_tooltip(struct _cef_display_handler_t* self, - cef_browser_t* browser, cef_string_t* text) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Unverified params: text - - // Translate param: text; type: string_byref - CefString textStr(text); - - // Execute - bool _retval = CefDisplayHandlerCppToC::Get(self)->OnTooltip( - CefBrowserCToCpp::Wrap(browser), - textStr); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK display_handler_on_status_message( - struct _cef_display_handler_t* self, cef_browser_t* browser, - const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: value - - // Execute - CefDisplayHandlerCppToC::Get(self)->OnStatusMessage( - CefBrowserCToCpp::Wrap(browser), - CefString(value)); -} - -int CEF_CALLBACK display_handler_on_console_message( - struct _cef_display_handler_t* self, cef_browser_t* browser, - const cef_string_t* message, const cef_string_t* source, int line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Unverified params: message, source - - // Execute - bool _retval = CefDisplayHandlerCppToC::Get(self)->OnConsoleMessage( - CefBrowserCToCpp::Wrap(browser), - CefString(message), - CefString(source), - line); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDisplayHandlerCppToC::CefDisplayHandlerCppToC(CefDisplayHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_loading_state_change = - display_handler_on_loading_state_change; - struct_.struct_.on_address_change = display_handler_on_address_change; - struct_.struct_.on_title_change = display_handler_on_title_change; - struct_.struct_.on_tooltip = display_handler_on_tooltip; - struct_.struct_.on_status_message = display_handler_on_status_message; - struct_.struct_.on_console_message = display_handler_on_console_message; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/display_handler_cpptoc.h b/cef/libcef_dll/cpptoc/display_handler_cpptoc.h deleted file mode 100644 index bfa04645d..000000000 --- a/cef/libcef_dll/cpptoc/display_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_display_handler.h" -#include "include/capi/cef_display_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDisplayHandlerCppToC - : public CefCppToC { - public: - explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls); - virtual ~CefDisplayHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc b/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc deleted file mode 100644 index 403f8d812..000000000 --- a/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domdocument_cpptoc.h" -#include "libcef_dll/cpptoc/domnode_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -enum cef_dom_document_type_t CEF_CALLBACK domdocument_get_type( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return DOM_DOCUMENT_TYPE_UNKNOWN; - - // Execute - cef_dom_document_type_t _retval = CefDOMDocumentCppToC::Get(self)->GetType(); - - // Return type: simple - return _retval; -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_document( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get(self)->GetDocument( - ); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_body( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get(self)->GetBody(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_head( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get(self)->GetHead(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -cef_string_userfree_t CEF_CALLBACK domdocument_get_title( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMDocumentCppToC::Get(self)->GetTitle(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_element_by_id( - struct _cef_domdocument_t* self, const cef_string_t* id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: id; type: string_byref_const - DCHECK(id); - if (!id) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get( - self)->GetElementById( - CefString(id)); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_focused_node( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get( - self)->GetFocusedNode(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -int CEF_CALLBACK domdocument_has_selection(struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMDocumentCppToC::Get(self)->HasSelection(); - - // Return type: bool - return _retval; -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_selection_start_node( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get( - self)->GetSelectionStartNode(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -int CEF_CALLBACK domdocument_get_selection_start_offset( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionStartOffset(); - - // Return type: simple - return _retval; -} - -struct _cef_domnode_t* CEF_CALLBACK domdocument_get_selection_end_node( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMDocumentCppToC::Get( - self)->GetSelectionEndNode(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -int CEF_CALLBACK domdocument_get_selection_end_offset( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionEndOffset(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK domdocument_get_selection_as_markup( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionAsMarkup(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK domdocument_get_selection_as_text( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMDocumentCppToC::Get(self)->GetSelectionAsText(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK domdocument_get_base_url( - struct _cef_domdocument_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMDocumentCppToC::Get(self)->GetBaseURL(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK domdocument_get_complete_url( - struct _cef_domdocument_t* self, const cef_string_t* partialURL) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: partialURL; type: string_byref_const - DCHECK(partialURL); - if (!partialURL) - return NULL; - - // Execute - CefString _retval = CefDOMDocumentCppToC::Get(self)->GetCompleteURL( - CefString(partialURL)); - - // Return type: string - return _retval.DetachToUserFree(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMDocumentCppToC::CefDOMDocumentCppToC(CefDOMDocument* cls) - : CefCppToC(cls) { - struct_.struct_.get_type = domdocument_get_type; - struct_.struct_.get_document = domdocument_get_document; - struct_.struct_.get_body = domdocument_get_body; - struct_.struct_.get_head = domdocument_get_head; - struct_.struct_.get_title = domdocument_get_title; - struct_.struct_.get_element_by_id = domdocument_get_element_by_id; - struct_.struct_.get_focused_node = domdocument_get_focused_node; - struct_.struct_.has_selection = domdocument_has_selection; - struct_.struct_.get_selection_start_node = - domdocument_get_selection_start_node; - struct_.struct_.get_selection_start_offset = - domdocument_get_selection_start_offset; - struct_.struct_.get_selection_end_node = domdocument_get_selection_end_node; - struct_.struct_.get_selection_end_offset = - domdocument_get_selection_end_offset; - struct_.struct_.get_selection_as_markup = domdocument_get_selection_as_markup; - struct_.struct_.get_selection_as_text = domdocument_get_selection_as_text; - struct_.struct_.get_base_url = domdocument_get_base_url; - struct_.struct_.get_complete_url = domdocument_get_complete_url; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/domdocument_cpptoc.h b/cef/libcef_dll/cpptoc/domdocument_cpptoc.h deleted file mode 100644 index a35fcdd7a..000000000 --- a/cef/libcef_dll/cpptoc/domdocument_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefDOMDocumentCppToC - : public CefCppToC { - public: - explicit CefDOMDocumentCppToC(CefDOMDocument* cls); - virtual ~CefDOMDocumentCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/domevent_cpptoc.cc b/cef/libcef_dll/cpptoc/domevent_cpptoc.cc deleted file mode 100644 index 051898cab..000000000 --- a/cef/libcef_dll/cpptoc/domevent_cpptoc.cc +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domdocument_cpptoc.h" -#include "libcef_dll/cpptoc/domevent_cpptoc.h" -#include "libcef_dll/cpptoc/domnode_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_string_userfree_t CEF_CALLBACK domevent_get_type( - struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMEventCppToC::Get(self)->GetType(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -enum cef_dom_event_category_t CEF_CALLBACK domevent_get_category( - struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return DOM_EVENT_CATEGORY_UNKNOWN; - - // Execute - cef_dom_event_category_t _retval = CefDOMEventCppToC::Get(self)->GetCategory( - ); - - // Return type: simple - return _retval; -} - -enum cef_dom_event_phase_t CEF_CALLBACK domevent_get_phase( - struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return DOM_EVENT_PHASE_UNKNOWN; - - // Execute - cef_dom_event_phase_t _retval = CefDOMEventCppToC::Get(self)->GetPhase(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK domevent_can_bubble(struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMEventCppToC::Get(self)->CanBubble(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK domevent_can_cancel(struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMEventCppToC::Get(self)->CanCancel(); - - // Return type: bool - return _retval; -} - -cef_domdocument_t* CEF_CALLBACK domevent_get_document( - struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMEventCppToC::Get(self)->GetDocument( - ); - - // Return type: refptr_same - return CefDOMDocumentCppToC::Wrap(_retval); -} - -cef_domnode_t* CEF_CALLBACK domevent_get_target(struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMEventCppToC::Get(self)->GetTarget(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -cef_domnode_t* CEF_CALLBACK domevent_get_current_target( - struct _cef_domevent_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMEventCppToC::Get( - self)->GetCurrentTarget(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMEventCppToC::CefDOMEventCppToC(CefDOMEvent* cls) - : CefCppToC(cls) { - struct_.struct_.get_type = domevent_get_type; - struct_.struct_.get_category = domevent_get_category; - struct_.struct_.get_phase = domevent_get_phase; - struct_.struct_.can_bubble = domevent_can_bubble; - struct_.struct_.can_cancel = domevent_can_cancel; - struct_.struct_.get_document = domevent_get_document; - struct_.struct_.get_target = domevent_get_target; - struct_.struct_.get_current_target = domevent_get_current_target; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/domevent_cpptoc.h b/cef/libcef_dll/cpptoc/domevent_cpptoc.h deleted file mode 100644 index aec1540ec..000000000 --- a/cef/libcef_dll/cpptoc/domevent_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefDOMEventCppToC - : public CefCppToC { - public: - explicit CefDOMEventCppToC(CefDOMEvent* cls); - virtual ~CefDOMEventCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc b/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc deleted file mode 100644 index 50e0158a2..000000000 --- a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc +++ /dev/null @@ -1,49 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domevent_listener_cpptoc.h" -#include "libcef_dll/ctocpp/domevent_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK domevent_listener_handle_event( - struct _cef_domevent_listener_t* self, cef_domevent_t* event) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: event; type: refptr_diff - DCHECK(event); - if (!event) - return; - - // Execute - CefDOMEventListenerCppToC::Get(self)->HandleEvent( - CefDOMEventCToCpp::Wrap(event)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMEventListenerCppToC::CefDOMEventListenerCppToC(CefDOMEventListener* cls) - : CefCppToC(cls) { - struct_.struct_.handle_event = domevent_listener_handle_event; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h b/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h deleted file mode 100644 index 4e8c84d7b..000000000 --- a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMEventListenerCppToC - : public CefCppToC { - public: - explicit CefDOMEventListenerCppToC(CefDOMEventListener* cls); - virtual ~CefDOMEventListenerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/domnode_cpptoc.cc b/cef/libcef_dll/cpptoc/domnode_cpptoc.cc deleted file mode 100644 index f38caee38..000000000 --- a/cef/libcef_dll/cpptoc/domnode_cpptoc.cc +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domdocument_cpptoc.h" -#include "libcef_dll/cpptoc/domnode_cpptoc.h" -#include "libcef_dll/ctocpp/domevent_listener_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -enum cef_dom_node_type_t CEF_CALLBACK domnode_get_type( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return DOM_NODE_TYPE_UNSUPPORTED; - - // Execute - cef_dom_node_type_t _retval = CefDOMNodeCppToC::Get(self)->GetType(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK domnode_is_text(struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->IsText(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK domnode_is_element(struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->IsElement(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK domnode_is_editable(struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->IsEditable(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK domnode_is_form_control_element(struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->IsFormControlElement(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_form_control_element_type( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetFormControlElementType(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK domnode_is_same(struct _cef_domnode_t* self, - struct _cef_domnode_t* that) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: that; type: refptr_same - DCHECK(that); - if (!that) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->IsSame( - CefDOMNodeCppToC::Unwrap(that)); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_name( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_value( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetValue(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK domnode_set_value(struct _cef_domnode_t* self, - const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: value; type: string_byref_const - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->SetValue( - CefString(value)); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_as_markup( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetAsMarkup(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_domdocument_t* CEF_CALLBACK domnode_get_document( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMNodeCppToC::Get(self)->GetDocument( - ); - - // Return type: refptr_same - return CefDOMDocumentCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domnode_get_parent( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMNodeCppToC::Get(self)->GetParent(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domnode_get_previous_sibling( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMNodeCppToC::Get( - self)->GetPreviousSibling(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domnode_get_next_sibling( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMNodeCppToC::Get(self)->GetNextSibling(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -int CEF_CALLBACK domnode_has_children(struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->HasChildren(); - - // Return type: bool - return _retval; -} - -struct _cef_domnode_t* CEF_CALLBACK domnode_get_first_child( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMNodeCppToC::Get(self)->GetFirstChild(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -struct _cef_domnode_t* CEF_CALLBACK domnode_get_last_child( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefDOMNodeCppToC::Get(self)->GetLastChild(); - - // Return type: refptr_same - return CefDOMNodeCppToC::Wrap(_retval); -} - -void CEF_CALLBACK domnode_add_event_listener(struct _cef_domnode_t* self, - const cef_string_t* eventType, struct _cef_domevent_listener_t* listener, - int useCapture) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: eventType; type: string_byref_const - DCHECK(eventType); - if (!eventType) - return; - // Verify param: listener; type: refptr_diff - DCHECK(listener); - if (!listener) - return; - - // Execute - CefDOMNodeCppToC::Get(self)->AddEventListener( - CefString(eventType), - CefDOMEventListenerCToCpp::Wrap(listener), - useCapture?true:false); -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_element_tag_name( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementTagName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK domnode_has_element_attributes(struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->HasElementAttributes(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK domnode_has_element_attribute(struct _cef_domnode_t* self, - const cef_string_t* attrName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: attrName; type: string_byref_const - DCHECK(attrName); - if (!attrName) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->HasElementAttribute( - CefString(attrName)); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_element_attribute( - struct _cef_domnode_t* self, const cef_string_t* attrName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: attrName; type: string_byref_const - DCHECK(attrName); - if (!attrName) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementAttribute( - CefString(attrName)); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK domnode_get_element_attributes(struct _cef_domnode_t* self, - cef_string_map_t attrMap) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: attrMap; type: string_map_single_byref - DCHECK(attrMap); - if (!attrMap) - return; - - // Translate param: attrMap; type: string_map_single_byref - std::map attrMapMap; - transfer_string_map_contents(attrMap, attrMapMap); - - // Execute - CefDOMNodeCppToC::Get(self)->GetElementAttributes( - attrMapMap); - - // Restore param: attrMap; type: string_map_single_byref - cef_string_map_clear(attrMap); - transfer_string_map_contents(attrMapMap, attrMap); -} - -int CEF_CALLBACK domnode_set_element_attribute(struct _cef_domnode_t* self, - const cef_string_t* attrName, const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: attrName; type: string_byref_const - DCHECK(attrName); - if (!attrName) - return 0; - // Verify param: value; type: string_byref_const - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefDOMNodeCppToC::Get(self)->SetElementAttribute( - CefString(attrName), - CefString(value)); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK domnode_get_element_inner_text( - struct _cef_domnode_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDOMNodeCppToC::Get(self)->GetElementInnerText(); - - // Return type: string - return _retval.DetachToUserFree(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMNodeCppToC::CefDOMNodeCppToC(CefDOMNode* cls) - : CefCppToC(cls) { - struct_.struct_.get_type = domnode_get_type; - struct_.struct_.is_text = domnode_is_text; - struct_.struct_.is_element = domnode_is_element; - struct_.struct_.is_editable = domnode_is_editable; - struct_.struct_.is_form_control_element = domnode_is_form_control_element; - struct_.struct_.get_form_control_element_type = - domnode_get_form_control_element_type; - struct_.struct_.is_same = domnode_is_same; - struct_.struct_.get_name = domnode_get_name; - struct_.struct_.get_value = domnode_get_value; - struct_.struct_.set_value = domnode_set_value; - struct_.struct_.get_as_markup = domnode_get_as_markup; - struct_.struct_.get_document = domnode_get_document; - struct_.struct_.get_parent = domnode_get_parent; - struct_.struct_.get_previous_sibling = domnode_get_previous_sibling; - struct_.struct_.get_next_sibling = domnode_get_next_sibling; - struct_.struct_.has_children = domnode_has_children; - struct_.struct_.get_first_child = domnode_get_first_child; - struct_.struct_.get_last_child = domnode_get_last_child; - struct_.struct_.add_event_listener = domnode_add_event_listener; - struct_.struct_.get_element_tag_name = domnode_get_element_tag_name; - struct_.struct_.has_element_attributes = domnode_has_element_attributes; - struct_.struct_.has_element_attribute = domnode_has_element_attribute; - struct_.struct_.get_element_attribute = domnode_get_element_attribute; - struct_.struct_.get_element_attributes = domnode_get_element_attributes; - struct_.struct_.set_element_attribute = domnode_set_element_attribute; - struct_.struct_.get_element_inner_text = domnode_get_element_inner_text; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/domnode_cpptoc.h b/cef/libcef_dll/cpptoc/domnode_cpptoc.h deleted file mode 100644 index 1da9af779..000000000 --- a/cef/libcef_dll/cpptoc/domnode_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefDOMNodeCppToC - : public CefCppToC { - public: - explicit CefDOMNodeCppToC(CefDOMNode* cls); - virtual ~CefDOMNodeCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc deleted file mode 100644 index e3c649648..000000000 --- a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc +++ /dev/null @@ -1,48 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domvisitor_cpptoc.h" -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self, - struct _cef_domdocument_t* document) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: document; type: refptr_diff - DCHECK(document); - if (!document) - return; - - // Execute - CefDOMVisitorCppToC::Get(self)->Visit( - CefDOMDocumentCToCpp::Wrap(document)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls) - : CefCppToC(cls) { - struct_.struct_.visit = domvisitor_visit; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h deleted file mode 100644 index 21d015c89..000000000 --- a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h +++ /dev/null @@ -1,36 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMVisitorCppToC - : public CefCppToC { - public: - explicit CefDOMVisitorCppToC(CefDOMVisitor* cls); - virtual ~CefDOMVisitorCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc deleted file mode 100644 index 9963a05ee..000000000 --- a/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc +++ /dev/null @@ -1,100 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/download_handler_cpptoc.h" -#include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK download_handler_on_before_download( - struct _cef_download_handler_t* self, cef_browser_t* browser, - struct _cef_download_item_t* download_item, - const cef_string_t* suggested_name, - cef_before_download_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: download_item; type: refptr_diff - DCHECK(download_item); - if (!download_item) - return; - // Verify param: suggested_name; type: string_byref_const - DCHECK(suggested_name); - if (!suggested_name) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return; - - // Execute - CefDownloadHandlerCppToC::Get(self)->OnBeforeDownload( - CefBrowserCToCpp::Wrap(browser), - CefDownloadItemCToCpp::Wrap(download_item), - CefString(suggested_name), - CefBeforeDownloadCallbackCToCpp::Wrap(callback)); -} - -void CEF_CALLBACK download_handler_on_download_updated( - struct _cef_download_handler_t* self, cef_browser_t* browser, - struct _cef_download_item_t* download_item, - cef_download_item_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: download_item; type: refptr_diff - DCHECK(download_item); - if (!download_item) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return; - - // Execute - CefDownloadHandlerCppToC::Get(self)->OnDownloadUpdated( - CefBrowserCToCpp::Wrap(browser), - CefDownloadItemCToCpp::Wrap(download_item), - CefDownloadItemCallbackCToCpp::Wrap(callback)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDownloadHandlerCppToC::CefDownloadHandlerCppToC(CefDownloadHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_before_download = download_handler_on_before_download; - struct_.struct_.on_download_updated = download_handler_on_download_updated; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/download_handler_cpptoc.h b/cef/libcef_dll/cpptoc/download_handler_cpptoc.h deleted file mode 100644 index b8c9ec319..000000000 --- a/cef/libcef_dll/cpptoc/download_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefDownloadHandlerCppToC - : public CefCppToC { - public: - explicit CefDownloadHandlerCppToC(CefDownloadHandler* cls); - virtual ~CefDownloadHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc deleted file mode 100644 index 241c1b53a..000000000 --- a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/download_item_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK download_item_callback_cancel( - struct _cef_download_item_callback_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefDownloadItemCallbackCppToC::Get(self)->Cancel(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDownloadItemCallbackCppToC::CefDownloadItemCallbackCppToC( - CefDownloadItemCallback* cls) - : CefCppToC(cls) { - struct_.struct_.cancel = download_item_callback_cancel; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h b/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h deleted file mode 100644 index 1afc07b93..000000000 --- a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefDownloadItemCallbackCppToC - : public CefCppToC { - public: - explicit CefDownloadItemCallbackCppToC(CefDownloadItemCallback* cls); - virtual ~CefDownloadItemCallbackCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/download_item_cpptoc.cc b/cef/libcef_dll/cpptoc/download_item_cpptoc.cc deleted file mode 100644 index 923e64467..000000000 --- a/cef/libcef_dll/cpptoc/download_item_cpptoc.cc +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/download_item_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK download_item_is_valid(struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDownloadItemCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK download_item_is_in_progress( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDownloadItemCppToC::Get(self)->IsInProgress(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK download_item_is_complete(struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDownloadItemCppToC::Get(self)->IsComplete(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK download_item_is_canceled(struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefDownloadItemCppToC::Get(self)->IsCanceled(); - - // Return type: bool - return _retval; -} - -int64 CEF_CALLBACK download_item_get_current_speed( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefDownloadItemCppToC::Get(self)->GetCurrentSpeed(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK download_item_get_percent_complete( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefDownloadItemCppToC::Get(self)->GetPercentComplete(); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK download_item_get_total_bytes( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefDownloadItemCppToC::Get(self)->GetTotalBytes(); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK download_item_get_received_bytes( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefDownloadItemCppToC::Get(self)->GetReceivedBytes(); - - // Return type: simple - return _retval; -} - -cef_time_t CEF_CALLBACK download_item_get_start_time( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CefTime(); - - // Execute - cef_time_t _retval = CefDownloadItemCppToC::Get(self)->GetStartTime(); - - // Return type: simple - return _retval; -} - -cef_time_t CEF_CALLBACK download_item_get_end_time( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CefTime(); - - // Execute - cef_time_t _retval = CefDownloadItemCppToC::Get(self)->GetEndTime(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK download_item_get_full_path( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDownloadItemCppToC::Get(self)->GetFullPath(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int32 CEF_CALLBACK download_item_get_id(struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int32 _retval = CefDownloadItemCppToC::Get(self)->GetId(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK download_item_get_url( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDownloadItemCppToC::Get(self)->GetURL(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK download_item_get_suggested_file_name( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDownloadItemCppToC::Get(self)->GetSuggestedFileName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK download_item_get_content_disposition( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDownloadItemCppToC::Get(self)->GetContentDisposition(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK download_item_get_mime_type( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDownloadItemCppToC::Get(self)->GetMimeType(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK download_item_get_referrer_charset( - struct _cef_download_item_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefDownloadItemCppToC::Get(self)->GetReferrerCharset(); - - // Return type: string - return _retval.DetachToUserFree(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefDownloadItemCppToC::CefDownloadItemCppToC(CefDownloadItem* cls) - : CefCppToC( - cls) { - struct_.struct_.is_valid = download_item_is_valid; - struct_.struct_.is_in_progress = download_item_is_in_progress; - struct_.struct_.is_complete = download_item_is_complete; - struct_.struct_.is_canceled = download_item_is_canceled; - struct_.struct_.get_current_speed = download_item_get_current_speed; - struct_.struct_.get_percent_complete = download_item_get_percent_complete; - struct_.struct_.get_total_bytes = download_item_get_total_bytes; - struct_.struct_.get_received_bytes = download_item_get_received_bytes; - struct_.struct_.get_start_time = download_item_get_start_time; - struct_.struct_.get_end_time = download_item_get_end_time; - struct_.struct_.get_full_path = download_item_get_full_path; - struct_.struct_.get_id = download_item_get_id; - struct_.struct_.get_url = download_item_get_url; - struct_.struct_.get_suggested_file_name = - download_item_get_suggested_file_name; - struct_.struct_.get_content_disposition = - download_item_get_content_disposition; - struct_.struct_.get_mime_type = download_item_get_mime_type; - struct_.struct_.get_referrer_charset = download_item_get_referrer_charset; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/download_item_cpptoc.h b/cef/libcef_dll/cpptoc/download_item_cpptoc.h deleted file mode 100644 index c19ac48a2..000000000 --- a/cef/libcef_dll/cpptoc/download_item_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_download_item.h" -#include "include/capi/cef_download_item_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefDownloadItemCppToC - : public CefCppToC { - public: - explicit CefDownloadItemCppToC(CefDownloadItem* cls); - virtual ~CefDownloadItemCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc deleted file mode 100644 index 09d7038c4..000000000 --- a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc +++ /dev/null @@ -1,90 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/focus_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK focus_handler_on_take_focus(struct _cef_focus_handler_t* self, - cef_browser_t* browser, int next) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefFocusHandlerCppToC::Get(self)->OnTakeFocus( - CefBrowserCToCpp::Wrap(browser), - next?true:false); -} - -int CEF_CALLBACK focus_handler_on_set_focus(struct _cef_focus_handler_t* self, - cef_browser_t* browser, enum cef_focus_source_t source) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - - // Execute - bool _retval = CefFocusHandlerCppToC::Get(self)->OnSetFocus( - CefBrowserCToCpp::Wrap(browser), - source); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK focus_handler_on_got_focus(struct _cef_focus_handler_t* self, - cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefFocusHandlerCppToC::Get(self)->OnGotFocus( - CefBrowserCToCpp::Wrap(browser)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefFocusHandlerCppToC::CefFocusHandlerCppToC(CefFocusHandler* cls) - : CefCppToC( - cls) { - struct_.struct_.on_take_focus = focus_handler_on_take_focus; - struct_.struct_.on_set_focus = focus_handler_on_set_focus; - struct_.struct_.on_got_focus = focus_handler_on_got_focus; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h deleted file mode 100644 index 5ed79a643..000000000 --- a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_focus_handler.h" -#include "include/capi/cef_focus_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefFocusHandlerCppToC - : public CefCppToC { - public: - explicit CefFocusHandlerCppToC(CefFocusHandler* cls); - virtual ~CefFocusHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/frame_cpptoc.cc b/cef/libcef_dll/cpptoc/frame_cpptoc.cc deleted file mode 100644 index 87d756d76..000000000 --- a/cef/libcef_dll/cpptoc/frame_cpptoc.cc +++ /dev/null @@ -1,401 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/request_cpptoc.h" -#include "libcef_dll/cpptoc/v8context_cpptoc.h" -#include "libcef_dll/ctocpp/domvisitor_ctocpp.h" -#include "libcef_dll/ctocpp/string_visitor_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK frame_is_valid(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefFrameCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK frame_undo(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->Undo(); -} - -void CEF_CALLBACK frame_redo(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->Redo(); -} - -void CEF_CALLBACK frame_cut(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->Cut(); -} - -void CEF_CALLBACK frame_copy(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->Copy(); -} - -void CEF_CALLBACK frame_paste(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->Paste(); -} - -void CEF_CALLBACK frame_del(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->Delete(); -} - -void CEF_CALLBACK frame_select_all(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->SelectAll(); -} - -void CEF_CALLBACK frame_view_source(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefFrameCppToC::Get(self)->ViewSource(); -} - -void CEF_CALLBACK frame_get_source(struct _cef_frame_t* self, - struct _cef_string_visitor_t* visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor); - if (!visitor) - return; - - // Execute - CefFrameCppToC::Get(self)->GetSource( - CefStringVisitorCToCpp::Wrap(visitor)); -} - -void CEF_CALLBACK frame_get_text(struct _cef_frame_t* self, - struct _cef_string_visitor_t* visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor); - if (!visitor) - return; - - // Execute - CefFrameCppToC::Get(self)->GetText( - CefStringVisitorCToCpp::Wrap(visitor)); -} - -void CEF_CALLBACK frame_load_request(struct _cef_frame_t* self, - struct _cef_request_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_same - DCHECK(request); - if (!request) - return; - - // Execute - CefFrameCppToC::Get(self)->LoadRequest( - CefRequestCppToC::Unwrap(request)); -} - -void CEF_CALLBACK frame_load_url(struct _cef_frame_t* self, - const cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - - // Execute - CefFrameCppToC::Get(self)->LoadURL( - CefString(url)); -} - -void CEF_CALLBACK frame_load_string(struct _cef_frame_t* self, - const cef_string_t* string_val, const cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: string_val; type: string_byref_const - DCHECK(string_val); - if (!string_val) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - - // Execute - CefFrameCppToC::Get(self)->LoadString( - CefString(string_val), - CefString(url)); -} - -void CEF_CALLBACK frame_execute_java_script(struct _cef_frame_t* self, - const cef_string_t* code, const cef_string_t* script_url, - int start_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: code; type: string_byref_const - DCHECK(code); - if (!code) - return; - // Unverified params: script_url - - // Execute - CefFrameCppToC::Get(self)->ExecuteJavaScript( - CefString(code), - CefString(script_url), - start_line); -} - -int CEF_CALLBACK frame_is_main(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefFrameCppToC::Get(self)->IsMain(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK frame_is_focused(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefFrameCppToC::Get(self)->IsFocused(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK frame_get_name(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefFrameCppToC::Get(self)->GetName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int64 CEF_CALLBACK frame_get_identifier(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefFrameCppToC::Get(self)->GetIdentifier(); - - // Return type: simple - return _retval; -} - -struct _cef_frame_t* CEF_CALLBACK frame_get_parent(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefFrameCppToC::Get(self)->GetParent(); - - // Return type: refptr_same - return CefFrameCppToC::Wrap(_retval); -} - -cef_string_userfree_t CEF_CALLBACK frame_get_url(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefFrameCppToC::Get(self)->GetURL(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_browser_t* CEF_CALLBACK frame_get_browser(struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefFrameCppToC::Get(self)->GetBrowser(); - - // Return type: refptr_same - return CefBrowserCppToC::Wrap(_retval); -} - -struct _cef_v8context_t* CEF_CALLBACK frame_get_v8context( - struct _cef_frame_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefFrameCppToC::Get(self)->GetV8Context(); - - // Return type: refptr_same - return CefV8ContextCppToC::Wrap(_retval); -} - -void CEF_CALLBACK frame_visit_dom(struct _cef_frame_t* self, - cef_domvisitor_t* visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor); - if (!visitor) - return; - - // Execute - CefFrameCppToC::Get(self)->VisitDOM( - CefDOMVisitorCToCpp::Wrap(visitor)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefFrameCppToC::CefFrameCppToC(CefFrame* cls) - : CefCppToC(cls) { - struct_.struct_.is_valid = frame_is_valid; - struct_.struct_.undo = frame_undo; - struct_.struct_.redo = frame_redo; - struct_.struct_.cut = frame_cut; - struct_.struct_.copy = frame_copy; - struct_.struct_.paste = frame_paste; - struct_.struct_.del = frame_del; - struct_.struct_.select_all = frame_select_all; - struct_.struct_.view_source = frame_view_source; - struct_.struct_.get_source = frame_get_source; - struct_.struct_.get_text = frame_get_text; - struct_.struct_.load_request = frame_load_request; - struct_.struct_.load_url = frame_load_url; - struct_.struct_.load_string = frame_load_string; - struct_.struct_.execute_java_script = frame_execute_java_script; - struct_.struct_.is_main = frame_is_main; - struct_.struct_.is_focused = frame_is_focused; - struct_.struct_.get_name = frame_get_name; - struct_.struct_.get_identifier = frame_get_identifier; - struct_.struct_.get_parent = frame_get_parent; - struct_.struct_.get_url = frame_get_url; - struct_.struct_.get_browser = frame_get_browser; - struct_.struct_.get_v8context = frame_get_v8context; - struct_.struct_.visit_dom = frame_visit_dom; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = - 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/frame_cpptoc.h b/cef/libcef_dll/cpptoc/frame_cpptoc.h deleted file mode 100644 index 0392777de..000000000 --- a/cef/libcef_dll/cpptoc/frame_cpptoc.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_frame.h" -#include "include/capi/cef_frame_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefFrameCppToC - : public CefCppToC { - public: - explicit CefFrameCppToC(CefFrame* cls); - virtual ~CefFrameCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.cc deleted file mode 100644 index 477aee284..000000000 --- a/cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK geolocation_callback_cont( - struct _cef_geolocation_callback_t* self, int allow) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefGeolocationCallbackCppToC::Get(self)->Continue( - allow?true:false); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefGeolocationCallbackCppToC::CefGeolocationCallbackCppToC( - CefGeolocationCallback* cls) - : CefCppToC(cls) { - struct_.struct_.cont = geolocation_callback_cont; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.h b/cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.h deleted file mode 100644 index b4f6d32e4..000000000 --- a/cef/libcef_dll/cpptoc/geolocation_callback_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_geolocation_handler.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefGeolocationCallbackCppToC - : public CefCppToC { - public: - explicit CefGeolocationCallbackCppToC(CefGeolocationCallback* cls); - virtual ~CefGeolocationCallbackCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc deleted file mode 100644 index d9c852e91..000000000 --- a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc +++ /dev/null @@ -1,91 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK geolocation_handler_on_request_geolocation_permission( - struct _cef_geolocation_handler_t* self, cef_browser_t* browser, - const cef_string_t* requesting_url, int request_id, - cef_geolocation_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: requesting_url; type: string_byref_const - DCHECK(requesting_url); - if (!requesting_url) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return; - - // Execute - CefGeolocationHandlerCppToC::Get(self)->OnRequestGeolocationPermission( - CefBrowserCToCpp::Wrap(browser), - CefString(requesting_url), - request_id, - CefGeolocationCallbackCToCpp::Wrap(callback)); -} - -void CEF_CALLBACK geolocation_handler_on_cancel_geolocation_permission( - struct _cef_geolocation_handler_t* self, cef_browser_t* browser, - const cef_string_t* requesting_url, int request_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: requesting_url; type: string_byref_const - DCHECK(requesting_url); - if (!requesting_url) - return; - - // Execute - CefGeolocationHandlerCppToC::Get(self)->OnCancelGeolocationPermission( - CefBrowserCToCpp::Wrap(browser), - CefString(requesting_url), - request_id); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefGeolocationHandlerCppToC::CefGeolocationHandlerCppToC( - CefGeolocationHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_request_geolocation_permission = - geolocation_handler_on_request_geolocation_permission; - struct_.struct_.on_cancel_geolocation_permission = - geolocation_handler_on_cancel_geolocation_permission; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h b/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h deleted file mode 100644 index 577422796..000000000 --- a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_geolocation_handler.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefGeolocationHandlerCppToC - : public CefCppToC { - public: - explicit CefGeolocationHandlerCppToC(CefGeolocationHandler* cls); - virtual ~CefGeolocationHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc deleted file mode 100644 index e51cda2e8..000000000 --- a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc +++ /dev/null @@ -1,57 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK get_geolocation_callback_on_location_update( - struct _cef_get_geolocation_callback_t* self, - const struct _cef_geoposition_t* position) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: position; type: struct_byref_const - DCHECK(position); - if (!position) - return; - - // Translate param: position; type: struct_byref_const - CefGeoposition positionObj; - if (position) - positionObj.Set(*position, false); - - // Execute - CefGetGeolocationCallbackCppToC::Get(self)->OnLocationUpdate( - positionObj); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC( - CefGetGeolocationCallback* cls) - : CefCppToC(cls) { - struct_.struct_.on_location_update = - get_geolocation_callback_on_location_update; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = - 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h b/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h deleted file mode 100644 index d239c6962..000000000 --- a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_geolocation.h" -#include "include/capi/cef_geolocation_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefGetGeolocationCallbackCppToC - : public CefCppToC { - public: - explicit CefGetGeolocationCallbackCppToC(CefGetGeolocationCallback* cls); - virtual ~CefGetGeolocationCallbackCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc deleted file mode 100644 index 487d9a510..000000000 --- a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK jsdialog_callback_cont(struct _cef_jsdialog_callback_t* self, - int success, const cef_string_t* user_input) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Unverified params: user_input - - // Execute - CefJSDialogCallbackCppToC::Get(self)->Continue( - success?true:false, - CefString(user_input)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefJSDialogCallbackCppToC::CefJSDialogCallbackCppToC(CefJSDialogCallback* cls) - : CefCppToC(cls) { - struct_.struct_.cont = jsdialog_callback_cont; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h deleted file mode 100644 index c6c7719ea..000000000 --- a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_jsdialog_handler.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefJSDialogCallbackCppToC - : public CefCppToC { - public: - explicit CefJSDialogCallbackCppToC(CefJSDialogCallback* cls); - virtual ~CefJSDialogCallbackCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc deleted file mode 100644 index d3dd01940..000000000 --- a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc +++ /dev/null @@ -1,136 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK jsdialog_handler_on_jsdialog( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser, - const cef_string_t* origin_url, const cef_string_t* accept_lang, - enum cef_jsdialog_type_t dialog_type, const cef_string_t* message_text, - const cef_string_t* default_prompt_text, cef_jsdialog_callback_t* callback, - int* suppress_message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: origin_url; type: string_byref_const - DCHECK(origin_url); - if (!origin_url) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Verify param: suppress_message; type: bool_byref - DCHECK(suppress_message); - if (!suppress_message) - return 0; - // Unverified params: accept_lang, message_text, default_prompt_text - - // Translate param: suppress_message; type: bool_byref - bool suppress_messageBool = ( - suppress_message && *suppress_message)?true:false; - - // Execute - bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnJSDialog( - CefBrowserCToCpp::Wrap(browser), - CefString(origin_url), - CefString(accept_lang), - dialog_type, - CefString(message_text), - CefString(default_prompt_text), - CefJSDialogCallbackCToCpp::Wrap(callback), - suppress_messageBool); - - // Restore param: suppress_message; type: bool_byref - if (suppress_message) - *suppress_message = suppress_messageBool?true:false; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK jsdialog_handler_on_before_unload_dialog( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser, - const cef_string_t* message_text, int is_reload, - cef_jsdialog_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: message_text - - // Execute - bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnBeforeUnloadDialog( - CefBrowserCToCpp::Wrap(browser), - CefString(message_text), - is_reload?true:false, - CefJSDialogCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK jsdialog_handler_on_reset_dialog_state( - struct _cef_jsdialog_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefJSDialogHandlerCppToC::Get(self)->OnResetDialogState( - CefBrowserCToCpp::Wrap(browser)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC(CefJSDialogHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_jsdialog = jsdialog_handler_on_jsdialog; - struct_.struct_.on_before_unload_dialog = - jsdialog_handler_on_before_unload_dialog; - struct_.struct_.on_reset_dialog_state = - jsdialog_handler_on_reset_dialog_state; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h deleted file mode 100644 index 68a07b83e..000000000 --- a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_jsdialog_handler.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefJSDialogHandlerCppToC - : public CefCppToC { - public: - explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls); - virtual ~CefJSDialogHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc deleted file mode 100644 index bee1102e1..000000000 --- a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc +++ /dev/null @@ -1,110 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK keyboard_handler_on_pre_key_event( - struct _cef_keyboard_handler_t* self, cef_browser_t* browser, - const struct _cef_key_event_t* event, cef_event_handle_t os_event, - int* is_keyboard_shortcut) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: event; type: struct_byref_const - DCHECK(event); - if (!event) - return 0; - // Verify param: is_keyboard_shortcut; type: bool_byaddr - DCHECK(is_keyboard_shortcut); - if (!is_keyboard_shortcut) - return 0; - - // Translate param: event; type: struct_byref_const - CefKeyEvent eventObj; - if (event) - eventObj.Set(*event, false); - // Translate param: is_keyboard_shortcut; type: bool_byaddr - bool is_keyboard_shortcutBool = ( - is_keyboard_shortcut && *is_keyboard_shortcut)?true:false; - - // Execute - bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnPreKeyEvent( - CefBrowserCToCpp::Wrap(browser), - eventObj, - os_event, - &is_keyboard_shortcutBool); - - // Restore param: is_keyboard_shortcut; type: bool_byaddr - if (is_keyboard_shortcut) - *is_keyboard_shortcut = is_keyboard_shortcutBool?true:false; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK keyboard_handler_on_key_event( - struct _cef_keyboard_handler_t* self, cef_browser_t* browser, - const struct _cef_key_event_t* event, cef_event_handle_t os_event) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: event; type: struct_byref_const - DCHECK(event); - if (!event) - return 0; - - // Translate param: event; type: struct_byref_const - CefKeyEvent eventObj; - if (event) - eventObj.Set(*event, false); - - // Execute - bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnKeyEvent( - CefBrowserCToCpp::Wrap(browser), - eventObj, - os_event); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC(CefKeyboardHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_pre_key_event = keyboard_handler_on_pre_key_event; - struct_.struct_.on_key_event = keyboard_handler_on_key_event; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h deleted file mode 100644 index 7a4829b7d..000000000 --- a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_keyboard_handler.h" -#include "include/capi/cef_keyboard_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefKeyboardHandlerCppToC - : public CefCppToC { - public: - explicit CefKeyboardHandlerCppToC(CefKeyboardHandler* cls); - virtual ~CefKeyboardHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc deleted file mode 100644 index cdb031b2d..000000000 --- a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc +++ /dev/null @@ -1,191 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/client_cpptoc.h" -#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK life_span_handler_on_before_popup( - struct _cef_life_span_handler_t* self, cef_browser_t* parentBrowser, - const struct _cef_popup_features_t* popupFeatures, - cef_window_info_t* windowInfo, const cef_string_t* url, - cef_client_t** client, struct _cef_browser_settings_t* settings) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: parentBrowser; type: refptr_diff - DCHECK(parentBrowser); - if (!parentBrowser) - return 0; - // Verify param: popupFeatures; type: struct_byref_const - DCHECK(popupFeatures); - if (!popupFeatures) - return 0; - // Verify param: windowInfo; type: struct_byref - DCHECK(windowInfo); - if (!windowInfo) - return 0; - // Verify param: client; type: refptr_same_byref - DCHECK(client); - if (!client) - return 0; - // Verify param: settings; type: struct_byref - DCHECK(settings); - if (!settings) - return 0; - // Unverified params: url - - // Translate param: popupFeatures; type: struct_byref_const - CefPopupFeatures popupFeaturesObj; - if (popupFeatures) - popupFeaturesObj.Set(*popupFeatures, false); - // Translate param: windowInfo; type: struct_byref - CefWindowInfo windowInfoObj; - if (windowInfo) - windowInfoObj.AttachTo(*windowInfo); - // Translate param: client; type: refptr_same_byref - CefRefPtr clientPtr; - if (client && *client) - clientPtr = CefClientCppToC::Unwrap(*client); - CefClient* clientOrig = clientPtr.get(); - // Translate param: settings; type: struct_byref - CefBrowserSettings settingsObj; - if (settings) - settingsObj.AttachTo(*settings); - - // Execute - bool _retval = CefLifeSpanHandlerCppToC::Get(self)->OnBeforePopup( - CefBrowserCToCpp::Wrap(parentBrowser), - popupFeaturesObj, - windowInfoObj, - CefString(url), - clientPtr, - settingsObj); - - // Restore param: windowInfo; type: struct_byref - if (windowInfo) - windowInfoObj.DetachTo(*windowInfo); - // Restore param: client; type: refptr_same_byref - if (client) { - if (clientPtr.get()) { - if (clientPtr.get() != clientOrig) { - *client = CefClientCppToC::Wrap(clientPtr); - } - } else { - *client = NULL; - } - } - // Restore param: settings; type: struct_byref - if (settings) - settingsObj.DetachTo(*settings); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK life_span_handler_on_after_created( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefLifeSpanHandlerCppToC::Get(self)->OnAfterCreated( - CefBrowserCToCpp::Wrap(browser)); -} - -int CEF_CALLBACK life_span_handler_run_modal( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - - // Execute - bool _retval = CefLifeSpanHandlerCppToC::Get(self)->RunModal( - CefBrowserCToCpp::Wrap(browser)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK life_span_handler_do_close( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - - // Execute - bool _retval = CefLifeSpanHandlerCppToC::Get(self)->DoClose( - CefBrowserCToCpp::Wrap(browser)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK life_span_handler_on_before_close( - struct _cef_life_span_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefLifeSpanHandlerCppToC::Get(self)->OnBeforeClose( - CefBrowserCToCpp::Wrap(browser)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_before_popup = life_span_handler_on_before_popup; - struct_.struct_.on_after_created = life_span_handler_on_after_created; - struct_.struct_.run_modal = life_span_handler_run_modal; - struct_.struct_.do_close = life_span_handler_do_close; - struct_.struct_.on_before_close = life_span_handler_on_before_close; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h deleted file mode 100644 index 360073aad..000000000 --- a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h +++ /dev/null @@ -1,39 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_life_span_handler.h" -#include "include/capi/cef_life_span_handler_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefLifeSpanHandlerCppToC - : public CefCppToC { - public: - explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls); - virtual ~CefLifeSpanHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/list_value_cpptoc.cc b/cef/libcef_dll/cpptoc/list_value_cpptoc.cc deleted file mode 100644 index 6682a92fc..000000000 --- a/cef/libcef_dll/cpptoc/list_value_cpptoc.cc +++ /dev/null @@ -1,528 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/binary_value_cpptoc.h" -#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" -#include "libcef_dll/cpptoc/list_value_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_list_value_t* cef_list_value_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefListValue::Create(); - - // Return type: refptr_same - return CefListValueCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK list_value_is_valid(struct _cef_list_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_is_owned(struct _cef_list_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->IsOwned(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_is_read_only(struct _cef_list_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -struct _cef_list_value_t* CEF_CALLBACK list_value_copy( - struct _cef_list_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefListValueCppToC::Get(self)->Copy(); - - // Return type: refptr_same - return CefListValueCppToC::Wrap(_retval); -} - -int CEF_CALLBACK list_value_set_size(struct _cef_list_value_t* self, - size_t size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetSize( - size); - - // Return type: bool - return _retval; -} - -size_t CEF_CALLBACK list_value_get_size(struct _cef_list_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefListValueCppToC::Get(self)->GetSize(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK list_value_clear(struct _cef_list_value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->Clear(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_remove(struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->Remove( - index); - - // Return type: bool - return _retval; -} - -enum cef_value_type_t CEF_CALLBACK list_value_get_type( - struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return VTYPE_INVALID; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return VTYPE_INVALID; - - // Execute - cef_value_type_t _retval = CefListValueCppToC::Get(self)->GetType( - index); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK list_value_get_bool(struct _cef_list_value_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->GetBool( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_get_int(struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - int _retval = CefListValueCppToC::Get(self)->GetInt( - index); - - // Return type: simple - return _retval; -} - -double CEF_CALLBACK list_value_get_double(struct _cef_list_value_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - double _retval = CefListValueCppToC::Get(self)->GetDouble( - index); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK list_value_get_string( - struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - CefString _retval = CefListValueCppToC::Get(self)->GetString( - index); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_binary_value_t* CEF_CALLBACK list_value_get_binary( - struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - CefRefPtr _retval = CefListValueCppToC::Get(self)->GetBinary( - index); - - // Return type: refptr_same - return CefBinaryValueCppToC::Wrap(_retval); -} - -cef_dictionary_value_t* CEF_CALLBACK list_value_get_dictionary( - struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - CefRefPtr _retval = CefListValueCppToC::Get( - self)->GetDictionary( - index); - - // Return type: refptr_same - return CefDictionaryValueCppToC::Wrap(_retval); -} - -struct _cef_list_value_t* CEF_CALLBACK list_value_get_list( - struct _cef_list_value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - CefRefPtr _retval = CefListValueCppToC::Get(self)->GetList( - index); - - // Return type: refptr_same - return CefListValueCppToC::Wrap(_retval); -} - -int CEF_CALLBACK list_value_set_null(struct _cef_list_value_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetNull( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_bool(struct _cef_list_value_t* self, int index, - int value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetBool( - index, - value?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_int(struct _cef_list_value_t* self, int index, - int value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetInt( - index, - value); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_double(struct _cef_list_value_t* self, - int index, double value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetDouble( - index, - value); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_string(struct _cef_list_value_t* self, - int index, const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - // Unverified params: value - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetString( - index, - CefString(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_binary(struct _cef_list_value_t* self, - int index, cef_binary_value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetBinary( - index, - CefBinaryValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_dictionary(struct _cef_list_value_t* self, - int index, cef_dictionary_value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetDictionary( - index, - CefDictionaryValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK list_value_set_list(struct _cef_list_value_t* self, int index, - struct _cef_list_value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefListValueCppToC::Get(self)->SetList( - index, - CefListValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefListValueCppToC::CefListValueCppToC(CefListValue* cls) - : CefCppToC(cls) { - struct_.struct_.is_valid = list_value_is_valid; - struct_.struct_.is_owned = list_value_is_owned; - struct_.struct_.is_read_only = list_value_is_read_only; - struct_.struct_.copy = list_value_copy; - struct_.struct_.set_size = list_value_set_size; - struct_.struct_.get_size = list_value_get_size; - struct_.struct_.clear = list_value_clear; - struct_.struct_.remove = list_value_remove; - struct_.struct_.get_type = list_value_get_type; - struct_.struct_.get_bool = list_value_get_bool; - struct_.struct_.get_int = list_value_get_int; - struct_.struct_.get_double = list_value_get_double; - struct_.struct_.get_string = list_value_get_string; - struct_.struct_.get_binary = list_value_get_binary; - struct_.struct_.get_dictionary = list_value_get_dictionary; - struct_.struct_.get_list = list_value_get_list; - struct_.struct_.set_null = list_value_set_null; - struct_.struct_.set_bool = list_value_set_bool; - struct_.struct_.set_int = list_value_set_int; - struct_.struct_.set_double = list_value_set_double; - struct_.struct_.set_string = list_value_set_string; - struct_.struct_.set_binary = list_value_set_binary; - struct_.struct_.set_dictionary = list_value_set_dictionary; - struct_.struct_.set_list = list_value_set_list; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/list_value_cpptoc.h b/cef/libcef_dll/cpptoc/list_value_cpptoc.h deleted file mode 100644 index a38f90335..000000000 --- a/cef/libcef_dll/cpptoc/list_value_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefListValueCppToC - : public CefCppToC { - public: - explicit CefListValueCppToC(CefListValue* cls); - virtual ~CefListValueCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc deleted file mode 100644 index ee3a7bc9e..000000000 --- a/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc +++ /dev/null @@ -1,155 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK load_handler_on_load_start(struct _cef_load_handler_t* self, - cef_browser_t* browser, cef_frame_t* frame) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadStart( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame)); -} - -void CEF_CALLBACK load_handler_on_load_end(struct _cef_load_handler_t* self, - cef_browser_t* browser, cef_frame_t* frame, int httpStatusCode) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadEnd( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - httpStatusCode); -} - -void CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self, - cef_browser_t* browser, cef_frame_t* frame, enum cef_errorcode_t errorCode, - const cef_string_t* errorText, const cef_string_t* failedUrl) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: failedUrl; type: string_byref_const - DCHECK(failedUrl); - if (!failedUrl) - return; - // Unverified params: errorText - - // Execute - CefLoadHandlerCppToC::Get(self)->OnLoadError( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - errorCode, - CefString(errorText), - CefString(failedUrl)); -} - -void CEF_CALLBACK load_handler_on_render_process_terminated( - struct _cef_load_handler_t* self, cef_browser_t* browser, - enum cef_termination_status_t status) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnRenderProcessTerminated( - CefBrowserCToCpp::Wrap(browser), - status); -} - -void CEF_CALLBACK load_handler_on_plugin_crashed( - struct _cef_load_handler_t* self, cef_browser_t* browser, - const cef_string_t* plugin_path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: plugin_path; type: string_byref_const - DCHECK(plugin_path); - if (!plugin_path) - return; - - // Execute - CefLoadHandlerCppToC::Get(self)->OnPluginCrashed( - CefBrowserCToCpp::Wrap(browser), - CefString(plugin_path)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefLoadHandlerCppToC::CefLoadHandlerCppToC(CefLoadHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_load_start = load_handler_on_load_start; - struct_.struct_.on_load_end = load_handler_on_load_end; - struct_.struct_.on_load_error = load_handler_on_load_error; - struct_.struct_.on_render_process_terminated = - load_handler_on_render_process_terminated; - struct_.struct_.on_plugin_crashed = load_handler_on_plugin_crashed; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/load_handler_cpptoc.h b/cef/libcef_dll/cpptoc/load_handler_cpptoc.h deleted file mode 100644 index 7043d0aad..000000000 --- a/cef/libcef_dll/cpptoc/load_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_load_handler.h" -#include "include/capi/cef_load_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefLoadHandlerCppToC - : public CefCppToC { - public: - explicit CefLoadHandlerCppToC(CefLoadHandler* cls); - virtual ~CefLoadHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc b/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc deleted file mode 100644 index 95519c86a..000000000 --- a/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc +++ /dev/null @@ -1,1020 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/menu_model_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK menu_model_clear(struct _cef_menu_model_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->Clear(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_get_count(struct _cef_menu_model_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefMenuModelCppToC::Get(self)->GetCount(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK menu_model_add_separator(struct _cef_menu_model_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->AddSeparator(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_add_item(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->AddItem( - command_id, - CefString(label)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_add_check_item(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->AddCheckItem( - command_id, - CefString(label)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_add_radio_item(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label, int group_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->AddRadioItem( - command_id, - CefString(label), - group_id); - - // Return type: bool - return _retval; -} - -struct _cef_menu_model_t* CEF_CALLBACK menu_model_add_sub_menu( - struct _cef_menu_model_t* self, int command_id, - const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return NULL; - - // Execute - CefRefPtr _retval = CefMenuModelCppToC::Get(self)->AddSubMenu( - command_id, - CefString(label)); - - // Return type: refptr_same - return CefMenuModelCppToC::Wrap(_retval); -} - -int CEF_CALLBACK menu_model_insert_separator_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->InsertSeparatorAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_insert_item_at(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->InsertItemAt( - index, - command_id, - CefString(label)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_insert_check_item_at(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->InsertCheckItemAt( - index, - command_id, - CefString(label)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_insert_radio_item_at(struct _cef_menu_model_t* self, - int index, int command_id, const cef_string_t* label, int group_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->InsertRadioItemAt( - index, - command_id, - CefString(label), - group_id); - - // Return type: bool - return _retval; -} - -struct _cef_menu_model_t* CEF_CALLBACK menu_model_insert_sub_menu_at( - struct _cef_menu_model_t* self, int index, int command_id, - const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return NULL; - - // Execute - CefRefPtr _retval = CefMenuModelCppToC::Get( - self)->InsertSubMenuAt( - index, - command_id, - CefString(label)); - - // Return type: refptr_same - return CefMenuModelCppToC::Wrap(_retval); -} - -int CEF_CALLBACK menu_model_remove(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->Remove( - command_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_remove_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->RemoveAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_get_index_of(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefMenuModelCppToC::Get(self)->GetIndexOf( - command_id); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK menu_model_get_command_id_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefMenuModelCppToC::Get(self)->GetCommandIdAt( - index); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK menu_model_set_command_id_at(struct _cef_menu_model_t* self, - int index, int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetCommandIdAt( - index, - command_id); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK menu_model_get_label( - struct _cef_menu_model_t* self, int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefMenuModelCppToC::Get(self)->GetLabel( - command_id); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK menu_model_get_label_at( - struct _cef_menu_model_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefMenuModelCppToC::Get(self)->GetLabelAt( - index); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK menu_model_set_label(struct _cef_menu_model_t* self, - int command_id, const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetLabel( - command_id, - CefString(label)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_label_at(struct _cef_menu_model_t* self, - int index, const cef_string_t* label) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: label; type: string_byref_const - DCHECK(label); - if (!label) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetLabelAt( - index, - CefString(label)); - - // Return type: bool - return _retval; -} - -enum cef_menu_item_type_t CEF_CALLBACK menu_model_get_type( - struct _cef_menu_model_t* self, int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return MENUITEMTYPE_NONE; - - // Execute - cef_menu_item_type_t _retval = CefMenuModelCppToC::Get(self)->GetType( - command_id); - - // Return type: simple - return _retval; -} - -enum cef_menu_item_type_t CEF_CALLBACK menu_model_get_type_at( - struct _cef_menu_model_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return MENUITEMTYPE_NONE; - - // Execute - cef_menu_item_type_t _retval = CefMenuModelCppToC::Get(self)->GetTypeAt( - index); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK menu_model_get_group_id(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefMenuModelCppToC::Get(self)->GetGroupId( - command_id); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK menu_model_get_group_id_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefMenuModelCppToC::Get(self)->GetGroupIdAt( - index); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK menu_model_set_group_id(struct _cef_menu_model_t* self, - int command_id, int group_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetGroupId( - command_id, - group_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_group_id_at(struct _cef_menu_model_t* self, - int index, int group_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetGroupIdAt( - index, - group_id); - - // Return type: bool - return _retval; -} - -struct _cef_menu_model_t* CEF_CALLBACK menu_model_get_sub_menu( - struct _cef_menu_model_t* self, int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefMenuModelCppToC::Get(self)->GetSubMenu( - command_id); - - // Return type: refptr_same - return CefMenuModelCppToC::Wrap(_retval); -} - -struct _cef_menu_model_t* CEF_CALLBACK menu_model_get_sub_menu_at( - struct _cef_menu_model_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefMenuModelCppToC::Get(self)->GetSubMenuAt( - index); - - // Return type: refptr_same - return CefMenuModelCppToC::Wrap(_retval); -} - -int CEF_CALLBACK menu_model_is_visible(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->IsVisible( - command_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_is_visible_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->IsVisibleAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_visible(struct _cef_menu_model_t* self, - int command_id, int visible) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetVisible( - command_id, - visible?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_visible_at(struct _cef_menu_model_t* self, - int index, int visible) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetVisibleAt( - index, - visible?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_is_enabled(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->IsEnabled( - command_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_is_enabled_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->IsEnabledAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_enabled(struct _cef_menu_model_t* self, - int command_id, int enabled) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetEnabled( - command_id, - enabled?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_enabled_at(struct _cef_menu_model_t* self, - int index, int enabled) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetEnabledAt( - index, - enabled?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_is_checked(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->IsChecked( - command_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_is_checked_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->IsCheckedAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_checked(struct _cef_menu_model_t* self, - int command_id, int checked) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetChecked( - command_id, - checked?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_checked_at(struct _cef_menu_model_t* self, - int index, int checked) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetCheckedAt( - index, - checked?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_has_accelerator(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->HasAccelerator( - command_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_has_accelerator_at(struct _cef_menu_model_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->HasAcceleratorAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_accelerator(struct _cef_menu_model_t* self, - int command_id, int key_code, int shift_pressed, int ctrl_pressed, - int alt_pressed) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetAccelerator( - command_id, - key_code, - shift_pressed?true:false, - ctrl_pressed?true:false, - alt_pressed?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_set_accelerator_at(struct _cef_menu_model_t* self, - int index, int key_code, int shift_pressed, int ctrl_pressed, - int alt_pressed) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->SetAcceleratorAt( - index, - key_code, - shift_pressed?true:false, - ctrl_pressed?true:false, - alt_pressed?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_remove_accelerator(struct _cef_menu_model_t* self, - int command_id) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->RemoveAccelerator( - command_id); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_remove_accelerator_at( - struct _cef_menu_model_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->RemoveAcceleratorAt( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_get_accelerator(struct _cef_menu_model_t* self, - int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed, - int* alt_pressed) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key_code; type: simple_byref - DCHECK(key_code); - if (!key_code) - return 0; - // Verify param: shift_pressed; type: bool_byref - DCHECK(shift_pressed); - if (!shift_pressed) - return 0; - // Verify param: ctrl_pressed; type: bool_byref - DCHECK(ctrl_pressed); - if (!ctrl_pressed) - return 0; - // Verify param: alt_pressed; type: bool_byref - DCHECK(alt_pressed); - if (!alt_pressed) - return 0; - - // Translate param: key_code; type: simple_byref - int key_codeVal = key_code?*key_code:0; - // Translate param: shift_pressed; type: bool_byref - bool shift_pressedBool = (shift_pressed && *shift_pressed)?true:false; - // Translate param: ctrl_pressed; type: bool_byref - bool ctrl_pressedBool = (ctrl_pressed && *ctrl_pressed)?true:false; - // Translate param: alt_pressed; type: bool_byref - bool alt_pressedBool = (alt_pressed && *alt_pressed)?true:false; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->GetAccelerator( - command_id, - key_codeVal, - shift_pressedBool, - ctrl_pressedBool, - alt_pressedBool); - - // Restore param: key_code; type: simple_byref - if (key_code) - *key_code = key_codeVal; - // Restore param: shift_pressed; type: bool_byref - if (shift_pressed) - *shift_pressed = shift_pressedBool?true:false; - // Restore param: ctrl_pressed; type: bool_byref - if (ctrl_pressed) - *ctrl_pressed = ctrl_pressedBool?true:false; - // Restore param: alt_pressed; type: bool_byref - if (alt_pressed) - *alt_pressed = alt_pressedBool?true:false; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK menu_model_get_accelerator_at(struct _cef_menu_model_t* self, - int index, int* key_code, int* shift_pressed, int* ctrl_pressed, - int* alt_pressed) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key_code; type: simple_byref - DCHECK(key_code); - if (!key_code) - return 0; - // Verify param: shift_pressed; type: bool_byref - DCHECK(shift_pressed); - if (!shift_pressed) - return 0; - // Verify param: ctrl_pressed; type: bool_byref - DCHECK(ctrl_pressed); - if (!ctrl_pressed) - return 0; - // Verify param: alt_pressed; type: bool_byref - DCHECK(alt_pressed); - if (!alt_pressed) - return 0; - - // Translate param: key_code; type: simple_byref - int key_codeVal = key_code?*key_code:0; - // Translate param: shift_pressed; type: bool_byref - bool shift_pressedBool = (shift_pressed && *shift_pressed)?true:false; - // Translate param: ctrl_pressed; type: bool_byref - bool ctrl_pressedBool = (ctrl_pressed && *ctrl_pressed)?true:false; - // Translate param: alt_pressed; type: bool_byref - bool alt_pressedBool = (alt_pressed && *alt_pressed)?true:false; - - // Execute - bool _retval = CefMenuModelCppToC::Get(self)->GetAcceleratorAt( - index, - key_codeVal, - shift_pressedBool, - ctrl_pressedBool, - alt_pressedBool); - - // Restore param: key_code; type: simple_byref - if (key_code) - *key_code = key_codeVal; - // Restore param: shift_pressed; type: bool_byref - if (shift_pressed) - *shift_pressed = shift_pressedBool?true:false; - // Restore param: ctrl_pressed; type: bool_byref - if (ctrl_pressed) - *ctrl_pressed = ctrl_pressedBool?true:false; - // Restore param: alt_pressed; type: bool_byref - if (alt_pressed) - *alt_pressed = alt_pressedBool?true:false; - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefMenuModelCppToC::CefMenuModelCppToC(CefMenuModel* cls) - : CefCppToC(cls) { - struct_.struct_.clear = menu_model_clear; - struct_.struct_.get_count = menu_model_get_count; - struct_.struct_.add_separator = menu_model_add_separator; - struct_.struct_.add_item = menu_model_add_item; - struct_.struct_.add_check_item = menu_model_add_check_item; - struct_.struct_.add_radio_item = menu_model_add_radio_item; - struct_.struct_.add_sub_menu = menu_model_add_sub_menu; - struct_.struct_.insert_separator_at = menu_model_insert_separator_at; - struct_.struct_.insert_item_at = menu_model_insert_item_at; - struct_.struct_.insert_check_item_at = menu_model_insert_check_item_at; - struct_.struct_.insert_radio_item_at = menu_model_insert_radio_item_at; - struct_.struct_.insert_sub_menu_at = menu_model_insert_sub_menu_at; - struct_.struct_.remove = menu_model_remove; - struct_.struct_.remove_at = menu_model_remove_at; - struct_.struct_.get_index_of = menu_model_get_index_of; - struct_.struct_.get_command_id_at = menu_model_get_command_id_at; - struct_.struct_.set_command_id_at = menu_model_set_command_id_at; - struct_.struct_.get_label = menu_model_get_label; - struct_.struct_.get_label_at = menu_model_get_label_at; - struct_.struct_.set_label = menu_model_set_label; - struct_.struct_.set_label_at = menu_model_set_label_at; - struct_.struct_.get_type = menu_model_get_type; - struct_.struct_.get_type_at = menu_model_get_type_at; - struct_.struct_.get_group_id = menu_model_get_group_id; - struct_.struct_.get_group_id_at = menu_model_get_group_id_at; - struct_.struct_.set_group_id = menu_model_set_group_id; - struct_.struct_.set_group_id_at = menu_model_set_group_id_at; - struct_.struct_.get_sub_menu = menu_model_get_sub_menu; - struct_.struct_.get_sub_menu_at = menu_model_get_sub_menu_at; - struct_.struct_.is_visible = menu_model_is_visible; - struct_.struct_.is_visible_at = menu_model_is_visible_at; - struct_.struct_.set_visible = menu_model_set_visible; - struct_.struct_.set_visible_at = menu_model_set_visible_at; - struct_.struct_.is_enabled = menu_model_is_enabled; - struct_.struct_.is_enabled_at = menu_model_is_enabled_at; - struct_.struct_.set_enabled = menu_model_set_enabled; - struct_.struct_.set_enabled_at = menu_model_set_enabled_at; - struct_.struct_.is_checked = menu_model_is_checked; - struct_.struct_.is_checked_at = menu_model_is_checked_at; - struct_.struct_.set_checked = menu_model_set_checked; - struct_.struct_.set_checked_at = menu_model_set_checked_at; - struct_.struct_.has_accelerator = menu_model_has_accelerator; - struct_.struct_.has_accelerator_at = menu_model_has_accelerator_at; - struct_.struct_.set_accelerator = menu_model_set_accelerator; - struct_.struct_.set_accelerator_at = menu_model_set_accelerator_at; - struct_.struct_.remove_accelerator = menu_model_remove_accelerator; - struct_.struct_.remove_accelerator_at = menu_model_remove_accelerator_at; - struct_.struct_.get_accelerator = menu_model_get_accelerator; - struct_.struct_.get_accelerator_at = menu_model_get_accelerator_at; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/menu_model_cpptoc.h b/cef/libcef_dll/cpptoc/menu_model_cpptoc.h deleted file mode 100644 index 35c6149dc..000000000 --- a/cef/libcef_dll/cpptoc/menu_model_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_menu_model.h" -#include "include/capi/cef_menu_model_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefMenuModelCppToC - : public CefCppToC { - public: - explicit CefMenuModelCppToC(CefMenuModel* cls); - virtual ~CefMenuModelCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/permission_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/permission_handler_cpptoc.cc deleted file mode 100644 index 5558de8eb..000000000 --- a/cef/libcef_dll/cpptoc/permission_handler_cpptoc.cc +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/permission_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK permission_handler_on_before_script_extension_load( - struct _cef_permission_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, const cef_string_t* extensionName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: extensionName; type: string_byref_const - DCHECK(extensionName); - if (!extensionName) - return 0; - - // Execute - bool _retval = CefPermissionHandlerCppToC::Get( - self)->OnBeforeScriptExtensionLoad( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(extensionName)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPermissionHandlerCppToC::CefPermissionHandlerCppToC( - CefPermissionHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_before_script_extension_load = - permission_handler_on_before_script_extension_load; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/permission_handler_cpptoc.h b/cef/libcef_dll/cpptoc/permission_handler_cpptoc.h deleted file mode 100644 index 6c8d2f86d..000000000 --- a/cef/libcef_dll/cpptoc/permission_handler_cpptoc.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_permission_handler.h" -#include "include/capi/cef_permission_handler_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_frame.h" -#include "include/capi/cef_frame_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefPermissionHandlerCppToC - : public CefCppToC { - public: - explicit CefPermissionHandlerCppToC(CefPermissionHandler* cls); - virtual ~CefPermissionHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/post_data_cpptoc.cc b/cef/libcef_dll/cpptoc/post_data_cpptoc.cc deleted file mode 100644 index bf51e349c..000000000 --- a/cef/libcef_dll/cpptoc/post_data_cpptoc.cc +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/post_data_cpptoc.h" -#include "libcef_dll/cpptoc/post_data_element_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_post_data_t* cef_post_data_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefPostData::Create(); - - // Return type: refptr_same - return CefPostDataCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK post_data_is_read_only(struct _cef_post_data_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefPostDataCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -size_t CEF_CALLBACK post_data_get_element_count(struct _cef_post_data_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefPostDataCppToC::Get(self)->GetElementCount(); - - // Return type: simple - return _retval; -} - -void CEF_CALLBACK post_data_get_elements(struct _cef_post_data_t* self, - size_t* elementsCount, struct _cef_post_data_element_t** elements) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: elements; type: refptr_vec_same_byref - DCHECK(elementsCount && (*elementsCount == 0 || elements)); - if (!elementsCount || (*elementsCount > 0 && !elements)) - return; - - // Translate param: elements; type: refptr_vec_same_byref - std::vector > elementsList; - if (elementsCount && *elementsCount > 0 && elements) { - for (size_t i = 0; i < *elementsCount; ++i) { - elementsList.push_back(CefPostDataElementCppToC::Unwrap(elements[i])); - } - } - - // Execute - CefPostDataCppToC::Get(self)->GetElements( - elementsList); - - // Restore param: elements; type: refptr_vec_same_byref - if (elementsCount && elements) { - *elementsCount = std::min(elementsList.size(), *elementsCount); - if (*elementsCount > 0) { - for (size_t i = 0; i < *elementsCount; ++i) { - elements[i] = CefPostDataElementCppToC::Wrap(elementsList[i]); - } - } - } -} - -int CEF_CALLBACK post_data_remove_element(struct _cef_post_data_t* self, - struct _cef_post_data_element_t* element) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: element; type: refptr_same - DCHECK(element); - if (!element) - return 0; - - // Execute - bool _retval = CefPostDataCppToC::Get(self)->RemoveElement( - CefPostDataElementCppToC::Unwrap(element)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK post_data_add_element(struct _cef_post_data_t* self, - struct _cef_post_data_element_t* element) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: element; type: refptr_same - DCHECK(element); - if (!element) - return 0; - - // Execute - bool _retval = CefPostDataCppToC::Get(self)->AddElement( - CefPostDataElementCppToC::Unwrap(element)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK post_data_remove_elements(struct _cef_post_data_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefPostDataCppToC::Get(self)->RemoveElements(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPostDataCppToC::CefPostDataCppToC(CefPostData* cls) - : CefCppToC(cls) { - struct_.struct_.is_read_only = post_data_is_read_only; - struct_.struct_.get_element_count = post_data_get_element_count; - struct_.struct_.get_elements = post_data_get_elements; - struct_.struct_.remove_element = post_data_remove_element; - struct_.struct_.add_element = post_data_add_element; - struct_.struct_.remove_elements = post_data_remove_elements; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/post_data_cpptoc.h b/cef/libcef_dll/cpptoc/post_data_cpptoc.h deleted file mode 100644 index a97ebbecc..000000000 --- a/cef/libcef_dll/cpptoc/post_data_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefPostDataCppToC - : public CefCppToC { - public: - explicit CefPostDataCppToC(CefPostData* cls); - virtual ~CefPostDataCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc b/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc deleted file mode 100644 index 8a3eca338..000000000 --- a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/post_data_element_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefPostDataElement::Create(); - - // Return type: refptr_same - return CefPostDataElementCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK post_data_element_is_read_only( - struct _cef_post_data_element_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefPostDataElementCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK post_data_element_set_to_empty( - struct _cef_post_data_element_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefPostDataElementCppToC::Get(self)->SetToEmpty(); -} - -void CEF_CALLBACK post_data_element_set_to_file( - struct _cef_post_data_element_t* self, const cef_string_t* fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: fileName; type: string_byref_const - DCHECK(fileName); - if (!fileName) - return; - - // Execute - CefPostDataElementCppToC::Get(self)->SetToFile( - CefString(fileName)); -} - -void CEF_CALLBACK post_data_element_set_to_bytes( - struct _cef_post_data_element_t* self, size_t size, const void* bytes) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: bytes; type: simple_byaddr - DCHECK(bytes); - if (!bytes) - return; - - // Execute - CefPostDataElementCppToC::Get(self)->SetToBytes( - size, - bytes); -} - -enum cef_postdataelement_type_t CEF_CALLBACK post_data_element_get_type( - struct _cef_post_data_element_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return PDE_TYPE_EMPTY; - - // Execute - cef_postdataelement_type_t _retval = CefPostDataElementCppToC::Get( - self)->GetType(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK post_data_element_get_file( - struct _cef_post_data_element_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefPostDataElementCppToC::Get(self)->GetFile(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -size_t CEF_CALLBACK post_data_element_get_bytes_count( - struct _cef_post_data_element_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefPostDataElementCppToC::Get(self)->GetBytesCount(); - - // Return type: simple - return _retval; -} - -size_t CEF_CALLBACK post_data_element_get_bytes( - struct _cef_post_data_element_t* self, size_t size, void* bytes) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: bytes; type: simple_byaddr - DCHECK(bytes); - if (!bytes) - return 0; - - // Execute - size_t _retval = CefPostDataElementCppToC::Get(self)->GetBytes( - size, - bytes); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefPostDataElementCppToC::CefPostDataElementCppToC(CefPostDataElement* cls) - : CefCppToC(cls) { - struct_.struct_.is_read_only = post_data_element_is_read_only; - struct_.struct_.set_to_empty = post_data_element_set_to_empty; - struct_.struct_.set_to_file = post_data_element_set_to_file; - struct_.struct_.set_to_bytes = post_data_element_set_to_bytes; - struct_.struct_.get_type = post_data_element_get_type; - struct_.struct_.get_file = post_data_element_get_file; - struct_.struct_.get_bytes_count = post_data_element_get_bytes_count; - struct_.struct_.get_bytes = post_data_element_get_bytes; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h b/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h deleted file mode 100644 index 72d14e436..000000000 --- a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefPostDataElementCppToC - : public CefCppToC { - public: - explicit CefPostDataElementCppToC(CefPostDataElement* cls); - virtual ~CefPostDataElementCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/process_message_cpptoc.cc b/cef/libcef_dll/cpptoc/process_message_cpptoc.cc deleted file mode 100644 index 7a07088cc..000000000 --- a/cef/libcef_dll/cpptoc/process_message_cpptoc.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/list_value_cpptoc.h" -#include "libcef_dll/cpptoc/process_message_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_process_message_t* cef_process_message_create( - const cef_string_t* name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return NULL; - - // Execute - CefRefPtr _retval = CefProcessMessage::Create( - CefString(name)); - - // Return type: refptr_same - return CefProcessMessageCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK process_message_is_valid(struct _cef_process_message_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefProcessMessageCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK process_message_is_read_only( - struct _cef_process_message_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefProcessMessageCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -struct _cef_process_message_t* CEF_CALLBACK process_message_copy( - struct _cef_process_message_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefProcessMessageCppToC::Get( - self)->Copy(); - - // Return type: refptr_same - return CefProcessMessageCppToC::Wrap(_retval); -} - -cef_string_userfree_t CEF_CALLBACK process_message_get_name( - struct _cef_process_message_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefProcessMessageCppToC::Get(self)->GetName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -struct _cef_list_value_t* CEF_CALLBACK process_message_get_argument_list( - struct _cef_process_message_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefProcessMessageCppToC::Get( - self)->GetArgumentList(); - - // Return type: refptr_same - return CefListValueCppToC::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefProcessMessageCppToC::CefProcessMessageCppToC(CefProcessMessage* cls) - : CefCppToC(cls) { - struct_.struct_.is_valid = process_message_is_valid; - struct_.struct_.is_read_only = process_message_is_read_only; - struct_.struct_.copy = process_message_copy; - struct_.struct_.get_name = process_message_get_name; - struct_.struct_.get_argument_list = process_message_get_argument_list; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/process_message_cpptoc.h b/cef/libcef_dll/cpptoc/process_message_cpptoc.h deleted file mode 100644 index ec56823ac..000000000 --- a/cef/libcef_dll/cpptoc/process_message_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_process_message.h" -#include "include/capi/cef_process_message_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefProcessMessageCppToC - : public CefCppToC { - public: - explicit CefProcessMessageCppToC(CefProcessMessage* cls); - virtual ~CefProcessMessageCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc deleted file mode 100644 index 98aaeb7b5..000000000 --- a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc +++ /dev/null @@ -1,63 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK proxy_handler_get_proxy_for_url( - struct _cef_proxy_handler_t* self, const cef_string_t* url, - struct _cef_proxy_info_t* proxy_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: proxy_info; type: struct_byref - DCHECK(proxy_info); - if (!proxy_info) - return; - - // Translate param: proxy_info; type: struct_byref - CefProxyInfo proxy_infoObj; - if (proxy_info) - proxy_infoObj.AttachTo(*proxy_info); - - // Execute - CefProxyHandlerCppToC::Get(self)->GetProxyForUrl( - CefString(url), - proxy_infoObj); - - // Restore param: proxy_info; type: struct_byref - if (proxy_info) - proxy_infoObj.DetachTo(*proxy_info); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefProxyHandlerCppToC::CefProxyHandlerCppToC(CefProxyHandler* cls) - : CefCppToC( - cls) { - struct_.struct_.get_proxy_for_url = proxy_handler_get_proxy_for_url; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h b/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h deleted file mode 100644 index 560b82698..000000000 --- a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_proxy_handler.h" -#include "include/capi/cef_proxy_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefProxyHandlerCppToC - : public CefCppToC { - public: - explicit CefProxyHandlerCppToC(CefProxyHandler* cls); - virtual ~CefProxyHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc deleted file mode 100644 index cc5495019..000000000 --- a/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc +++ /dev/null @@ -1,100 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/read_handler_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -size_t CEF_CALLBACK read_handler_read(struct _cef_read_handler_t* self, - void* ptr, size_t size, size_t n) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = CefReadHandlerCppToC::Get(self)->Read( - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK read_handler_seek(struct _cef_read_handler_t* self, - int64 offset, int whence) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefReadHandlerCppToC::Get(self)->Seek( - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK read_handler_tell(struct _cef_read_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefReadHandlerCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK read_handler_eof(struct _cef_read_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefReadHandlerCppToC::Get(self)->Eof(); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefReadHandlerCppToC::CefReadHandlerCppToC(CefReadHandler* cls) - : CefCppToC(cls) { - struct_.struct_.read = read_handler_read; - struct_.struct_.seek = read_handler_seek; - struct_.struct_.tell = read_handler_tell; - struct_.struct_.eof = read_handler_eof; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/read_handler_cpptoc.h b/cef/libcef_dll/cpptoc/read_handler_cpptoc.h deleted file mode 100644 index 04ffba8d4..000000000 --- a/cef/libcef_dll/cpptoc/read_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefReadHandlerCppToC - : public CefCppToC { - public: - explicit CefReadHandlerCppToC(CefReadHandler* cls); - virtual ~CefReadHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc deleted file mode 100644 index c77bed238..000000000 --- a/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc +++ /dev/null @@ -1,252 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/render_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK render_handler_get_root_screen_rect( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_rect_t* rect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: rect; type: simple_byref - DCHECK(rect); - if (!rect) - return 0; - - // Translate param: rect; type: simple_byref - CefRect rectVal = rect?*rect:CefRect(); - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetRootScreenRect( - CefBrowserCToCpp::Wrap(browser), - rectVal); - - // Restore param: rect; type: simple_byref - if (rect) - *rect = rectVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK render_handler_get_view_rect( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_rect_t* rect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: rect; type: simple_byref - DCHECK(rect); - if (!rect) - return 0; - - // Translate param: rect; type: simple_byref - CefRect rectVal = rect?*rect:CefRect(); - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetViewRect( - CefBrowserCToCpp::Wrap(browser), - rectVal); - - // Restore param: rect; type: simple_byref - if (rect) - *rect = rectVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK render_handler_get_screen_point( - struct _cef_render_handler_t* self, cef_browser_t* browser, int viewX, - int viewY, int* screenX, int* screenY) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: screenX; type: simple_byref - DCHECK(screenX); - if (!screenX) - return 0; - // Verify param: screenY; type: simple_byref - DCHECK(screenY); - if (!screenY) - return 0; - - // Translate param: screenX; type: simple_byref - int screenXVal = screenX?*screenX:0; - // Translate param: screenY; type: simple_byref - int screenYVal = screenY?*screenY:0; - - // Execute - bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenPoint( - CefBrowserCToCpp::Wrap(browser), - viewX, - viewY, - screenXVal, - screenYVal); - - // Restore param: screenX; type: simple_byref - if (screenX) - *screenX = screenXVal; - // Restore param: screenY; type: simple_byref - if (screenY) - *screenY = screenYVal; - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK render_handler_on_popup_show( - struct _cef_render_handler_t* self, cef_browser_t* browser, int show) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderHandlerCppToC::Get(self)->OnPopupShow( - CefBrowserCToCpp::Wrap(browser), - show?true:false); -} - -void CEF_CALLBACK render_handler_on_popup_size( - struct _cef_render_handler_t* self, cef_browser_t* browser, - const cef_rect_t* rect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: rect; type: simple_byref_const - DCHECK(rect); - if (!rect) - return; - - // Translate param: rect; type: simple_byref_const - CefRect rectVal = rect?*rect:CefRect(); - - // Execute - CefRenderHandlerCppToC::Get(self)->OnPopupSize( - CefBrowserCToCpp::Wrap(browser), - rectVal); -} - -void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self, - cef_browser_t* browser, enum cef_paint_element_type_t type, - size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer, - int width, int height) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: dirtyRects; type: simple_vec_byref_const - DCHECK(dirtyRectsCount == 0 || dirtyRects); - if (dirtyRectsCount > 0 && !dirtyRects) - return; - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return; - - // Translate param: dirtyRects; type: simple_vec_byref_const - std::vector dirtyRectsList; - if (dirtyRectsCount > 0) { - for (size_t i = 0; i < dirtyRectsCount; ++i) { - dirtyRectsList.push_back(dirtyRects[i]); - } - } - - // Execute - CefRenderHandlerCppToC::Get(self)->OnPaint( - CefBrowserCToCpp::Wrap(browser), - type, - dirtyRectsList, - buffer, - width, - height); -} - -void CEF_CALLBACK render_handler_on_cursor_change( - struct _cef_render_handler_t* self, cef_browser_t* browser, - cef_cursor_handle_t cursor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderHandlerCppToC::Get(self)->OnCursorChange( - CefBrowserCToCpp::Wrap(browser), - cursor); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRenderHandlerCppToC::CefRenderHandlerCppToC(CefRenderHandler* cls) - : CefCppToC( - cls) { - struct_.struct_.get_root_screen_rect = render_handler_get_root_screen_rect; - struct_.struct_.get_view_rect = render_handler_get_view_rect; - struct_.struct_.get_screen_point = render_handler_get_screen_point; - struct_.struct_.on_popup_show = render_handler_on_popup_show; - struct_.struct_.on_popup_size = render_handler_on_popup_size; - struct_.struct_.on_paint = render_handler_on_paint; - struct_.struct_.on_cursor_change = render_handler_on_cursor_change; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/render_handler_cpptoc.h b/cef/libcef_dll/cpptoc/render_handler_cpptoc.h deleted file mode 100644 index 1fd90fe3f..000000000 --- a/cef/libcef_dll/cpptoc/render_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_render_handler.h" -#include "include/capi/cef_render_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRenderHandlerCppToC - : public CefCppToC { - public: - explicit CefRenderHandlerCppToC(CefRenderHandler* cls); - virtual ~CefRenderHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc deleted file mode 100644 index 11684705a..000000000 --- a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc +++ /dev/null @@ -1,393 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK render_process_handler_on_render_thread_created( - struct _cef_render_process_handler_t* self, - struct _cef_list_value_t* extra_info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: extra_info; type: refptr_diff - DCHECK(extra_info); - if (!extra_info) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnRenderThreadCreated( - CefListValueCToCpp::Wrap(extra_info)); -} - -void CEF_CALLBACK render_process_handler_on_web_kit_initialized( - struct _cef_render_process_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnWebKitInitialized(); -} - -void CEF_CALLBACK render_process_handler_on_browser_created( - struct _cef_render_process_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnBrowserCreated( - CefBrowserCToCpp::Wrap(browser)); -} - -void CEF_CALLBACK render_process_handler_on_browser_destroyed( - struct _cef_render_process_handler_t* self, cef_browser_t* browser) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnBrowserDestroyed( - CefBrowserCToCpp::Wrap(browser)); -} - -int CEF_CALLBACK render_process_handler_on_before_navigation( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_request_t* request, - enum cef_navigation_type_t navigation_type, int is_redirect) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - - // Execute - bool _retval = CefRenderProcessHandlerCppToC::Get(self)->OnBeforeNavigation( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request), - navigation_type, - is_redirect?true:false); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK render_process_handler_on_context_created( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_v8context_t* context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnContextCreated( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefV8ContextCToCpp::Wrap(context)); -} - -void CEF_CALLBACK render_process_handler_on_context_released( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_v8context_t* context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnContextReleased( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefV8ContextCToCpp::Wrap(context)); -} - -void CEF_CALLBACK render_process_handler_on_uncaught_exception( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, struct _cef_v8context_t* context, - struct _cef_v8exception_t* exception, - struct _cef_v8stack_trace_t* stackTrace) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - // Verify param: exception; type: refptr_diff - DCHECK(exception); - if (!exception) - return; - // Verify param: stackTrace; type: refptr_diff - DCHECK(stackTrace); - if (!stackTrace) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnUncaughtException( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefV8ContextCToCpp::Wrap(context), - CefV8ExceptionCToCpp::Wrap(exception), - CefV8StackTraceCToCpp::Wrap(stackTrace)); -} - -void CEF_CALLBACK render_process_handler_on_worker_context_created( - struct _cef_render_process_handler_t* self, int worker_id, - const cef_string_t* url, struct _cef_v8context_t* context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnWorkerContextCreated( - worker_id, - CefString(url), - CefV8ContextCToCpp::Wrap(context)); -} - -void CEF_CALLBACK render_process_handler_on_worker_context_released( - struct _cef_render_process_handler_t* self, int worker_id, - const cef_string_t* url, struct _cef_v8context_t* context) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnWorkerContextReleased( - worker_id, - CefString(url), - CefV8ContextCToCpp::Wrap(context)); -} - -void CEF_CALLBACK render_process_handler_on_worker_uncaught_exception( - struct _cef_render_process_handler_t* self, int worker_id, - const cef_string_t* url, struct _cef_v8context_t* context, - struct _cef_v8exception_t* exception, - struct _cef_v8stack_trace_t* stackTrace) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: context; type: refptr_diff - DCHECK(context); - if (!context) - return; - // Verify param: exception; type: refptr_diff - DCHECK(exception); - if (!exception) - return; - // Verify param: stackTrace; type: refptr_diff - DCHECK(stackTrace); - if (!stackTrace) - return; - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnWorkerUncaughtException( - worker_id, - CefString(url), - CefV8ContextCToCpp::Wrap(context), - CefV8ExceptionCToCpp::Wrap(exception), - CefV8StackTraceCToCpp::Wrap(stackTrace)); -} - -void CEF_CALLBACK render_process_handler_on_focused_node_changed( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_domnode_t* node) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Unverified params: frame, node - - // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnFocusedNodeChanged( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefDOMNodeCToCpp::Wrap(node)); -} - -int CEF_CALLBACK render_process_handler_on_process_message_received( - struct _cef_render_process_handler_t* self, cef_browser_t* browser, - enum cef_process_id_t source_process, cef_process_message_t* message) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: message; type: refptr_diff - DCHECK(message); - if (!message) - return 0; - - // Execute - bool _retval = CefRenderProcessHandlerCppToC::Get( - self)->OnProcessMessageReceived( - CefBrowserCToCpp::Wrap(browser), - source_process, - CefProcessMessageCToCpp::Wrap(message)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC( - CefRenderProcessHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_render_thread_created = - render_process_handler_on_render_thread_created; - struct_.struct_.on_web_kit_initialized = - render_process_handler_on_web_kit_initialized; - struct_.struct_.on_browser_created = - render_process_handler_on_browser_created; - struct_.struct_.on_browser_destroyed = - render_process_handler_on_browser_destroyed; - struct_.struct_.on_before_navigation = - render_process_handler_on_before_navigation; - struct_.struct_.on_context_created = - render_process_handler_on_context_created; - struct_.struct_.on_context_released = - render_process_handler_on_context_released; - struct_.struct_.on_uncaught_exception = - render_process_handler_on_uncaught_exception; - struct_.struct_.on_worker_context_created = - render_process_handler_on_worker_context_created; - struct_.struct_.on_worker_context_released = - render_process_handler_on_worker_context_released; - struct_.struct_.on_worker_uncaught_exception = - render_process_handler_on_worker_uncaught_exception; - struct_.struct_.on_focused_node_changed = - render_process_handler_on_focused_node_changed; - struct_.struct_.on_process_message_received = - render_process_handler_on_process_message_received; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h deleted file mode 100644 index 42ecf803b..000000000 --- a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_render_process_handler.h" -#include "include/capi/cef_render_process_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRenderProcessHandlerCppToC - : public CefCppToC { - public: - explicit CefRenderProcessHandlerCppToC(CefRenderProcessHandler* cls); - virtual ~CefRenderProcessHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/request_cpptoc.cc b/cef/libcef_dll/cpptoc/request_cpptoc.cc deleted file mode 100644 index 2d943d715..000000000 --- a/cef/libcef_dll/cpptoc/request_cpptoc.cc +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/post_data_cpptoc.h" -#include "libcef_dll/cpptoc/request_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_request_t* cef_request_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefRequest::Create(); - - // Return type: refptr_same - return CefRequestCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK request_is_read_only(struct _cef_request_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefRequestCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK request_get_url( - struct _cef_request_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefRequestCppToC::Get(self)->GetURL(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK request_set_url(struct _cef_request_t* self, - const cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - - // Execute - CefRequestCppToC::Get(self)->SetURL( - CefString(url)); -} - -cef_string_userfree_t CEF_CALLBACK request_get_method( - struct _cef_request_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefRequestCppToC::Get(self)->GetMethod(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK request_set_method(struct _cef_request_t* self, - const cef_string_t* method) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: method; type: string_byref_const - DCHECK(method); - if (!method) - return; - - // Execute - CefRequestCppToC::Get(self)->SetMethod( - CefString(method)); -} - -struct _cef_post_data_t* CEF_CALLBACK request_get_post_data( - struct _cef_request_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefRequestCppToC::Get(self)->GetPostData(); - - // Return type: refptr_same - return CefPostDataCppToC::Wrap(_retval); -} - -void CEF_CALLBACK request_set_post_data(struct _cef_request_t* self, - struct _cef_post_data_t* postData) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: postData; type: refptr_same - DCHECK(postData); - if (!postData) - return; - - // Execute - CefRequestCppToC::Get(self)->SetPostData( - CefPostDataCppToC::Unwrap(postData)); -} - -void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self, - cef_string_multimap_t headerMap) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: headerMap; type: string_map_multi_byref - DCHECK(headerMap); - if (!headerMap) - return; - - // Translate param: headerMap; type: string_map_multi_byref - std::multimap headerMapMultimap; - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - CefRequestCppToC::Get(self)->GetHeaderMap( - headerMapMultimap); - - // Restore param: headerMap; type: string_map_multi_byref - cef_string_multimap_clear(headerMap); - transfer_string_multimap_contents(headerMapMultimap, headerMap); -} - -void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self, - cef_string_multimap_t headerMap) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: headerMap; type: string_map_multi_byref_const - DCHECK(headerMap); - if (!headerMap) - return; - - // Translate param: headerMap; type: string_map_multi_byref_const - std::multimap headerMapMultimap; - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - CefRequestCppToC::Get(self)->SetHeaderMap( - headerMapMultimap); -} - -void CEF_CALLBACK request_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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: method; type: string_byref_const - DCHECK(method); - if (!method) - return; - // Verify param: headerMap; type: string_map_multi_byref_const - DCHECK(headerMap); - if (!headerMap) - return; - // Unverified params: postData - - // Translate param: headerMap; type: string_map_multi_byref_const - std::multimap headerMapMultimap; - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - CefRequestCppToC::Get(self)->Set( - CefString(url), - CefString(method), - CefPostDataCppToC::Unwrap(postData), - headerMapMultimap); -} - -int CEF_CALLBACK request_get_flags(struct _cef_request_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return UR_FLAG_NONE; - - // Execute - int _retval = CefRequestCppToC::Get(self)->GetFlags(); - - // Return type: simple - return _retval; -} - -void CEF_CALLBACK request_set_flags(struct _cef_request_t* self, int flags) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefRequestCppToC::Get(self)->SetFlags( - flags); -} - -cef_string_userfree_t CEF_CALLBACK request_get_first_party_for_cookies( - struct _cef_request_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefRequestCppToC::Get(self)->GetFirstPartyForCookies(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK request_set_first_party_for_cookies( - struct _cef_request_t* self, const cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - - // Execute - CefRequestCppToC::Get(self)->SetFirstPartyForCookies( - CefString(url)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestCppToC::CefRequestCppToC(CefRequest* cls) - : CefCppToC(cls) { - struct_.struct_.is_read_only = request_is_read_only; - struct_.struct_.get_url = request_get_url; - struct_.struct_.set_url = request_set_url; - struct_.struct_.get_method = request_get_method; - struct_.struct_.set_method = request_set_method; - struct_.struct_.get_post_data = request_get_post_data; - struct_.struct_.set_post_data = request_set_post_data; - struct_.struct_.get_header_map = request_get_header_map; - struct_.struct_.set_header_map = request_set_header_map; - struct_.struct_.set = request_set; - struct_.struct_.get_flags = request_get_flags; - struct_.struct_.set_flags = request_set_flags; - struct_.struct_.get_first_party_for_cookies = - request_get_first_party_for_cookies; - struct_.struct_.set_first_party_for_cookies = - request_set_first_party_for_cookies; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/request_cpptoc.h b/cef/libcef_dll/cpptoc/request_cpptoc.h deleted file mode 100644 index 00c9c2042..000000000 --- a/cef/libcef_dll/cpptoc/request_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefRequestCppToC - : public CefCppToC { - public: - explicit CefRequestCppToC(CefRequest* cls); - virtual ~CefRequestCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc deleted file mode 100644 index d64e9393d..000000000 --- a/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc +++ /dev/null @@ -1,319 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/request_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/quota_callback_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK request_handler_on_before_resource_load( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnBeforeResourceLoad( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request)); - - // Return type: bool - return _retval; -} - -struct _cef_resource_handler_t* CEF_CALLBACK request_handler_get_resource_handler( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, cef_request_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return NULL; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return NULL; - - // Execute - CefRefPtr _retval = CefRequestHandlerCppToC::Get( - self)->GetResourceHandler( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefRequestCToCpp::Wrap(request)); - - // Return type: refptr_same - return CefResourceHandlerCppToC::Wrap(_retval); -} - -void CEF_CALLBACK request_handler_on_resource_redirect( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, const cef_string_t* old_url, cef_string_t* new_url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return; - // Verify param: old_url; type: string_byref_const - DCHECK(old_url); - if (!old_url) - return; - // Verify param: new_url; type: string_byref - DCHECK(new_url); - if (!new_url) - return; - - // Translate param: new_url; type: string_byref - CefString new_urlStr(new_url); - - // Execute - CefRequestHandlerCppToC::Get(self)->OnResourceRedirect( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(old_url), - new_urlStr); -} - -int CEF_CALLBACK request_handler_get_auth_credentials( - struct _cef_request_handler_t* self, cef_browser_t* browser, - cef_frame_t* frame, int isProxy, const cef_string_t* host, int port, - const cef_string_t* realm, const cef_string_t* scheme, - cef_auth_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: frame; type: refptr_diff - DCHECK(frame); - if (!frame) - return 0; - // Verify param: host; type: string_byref_const - DCHECK(host); - if (!host) - return 0; - // Verify param: scheme; type: string_byref_const - DCHECK(scheme); - if (!scheme) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - // Unverified params: realm - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - isProxy?true:false, - CefString(host), - port, - CefString(realm), - CefString(scheme), - CefAuthCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK request_handler_on_quota_request( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* origin_url, int64 new_size, - cef_quota_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: origin_url; type: string_byref_const - DCHECK(origin_url); - if (!origin_url) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnQuotaRequest( - CefBrowserCToCpp::Wrap(browser), - CefString(origin_url), - new_size, - CefQuotaCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -cef_cookie_manager_t* CEF_CALLBACK request_handler_get_cookie_manager( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* main_url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return NULL; - // Verify param: main_url; type: string_byref_const - DCHECK(main_url); - if (!main_url) - return NULL; - - // Execute - CefRefPtr _retval = CefRequestHandlerCppToC::Get( - self)->GetCookieManager( - CefBrowserCToCpp::Wrap(browser), - CefString(main_url)); - - // Return type: refptr_diff - return CefCookieManagerCToCpp::Unwrap(_retval); -} - -void CEF_CALLBACK request_handler_on_protocol_execution( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* url, int* allow_os_execution) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return; - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return; - // Verify param: allow_os_execution; type: bool_byref - DCHECK(allow_os_execution); - if (!allow_os_execution) - return; - - // Translate param: allow_os_execution; type: bool_byref - bool allow_os_executionBool = ( - allow_os_execution && *allow_os_execution)?true:false; - - // Execute - CefRequestHandlerCppToC::Get(self)->OnProtocolExecution( - CefBrowserCToCpp::Wrap(browser), - CefString(url), - allow_os_executionBool); - - // Restore param: allow_os_execution; type: bool_byref - if (allow_os_execution) - *allow_os_execution = allow_os_executionBool?true:false; -} - -int CEF_CALLBACK request_handler_on_before_plugin_load( - struct _cef_request_handler_t* self, cef_browser_t* browser, - const cef_string_t* url, const cef_string_t* policy_url, - struct _cef_web_plugin_info_t* info) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: browser; type: refptr_diff - DCHECK(browser); - if (!browser) - return 0; - // Verify param: info; type: refptr_diff - DCHECK(info); - if (!info) - return 0; - // Unverified params: url, policy_url - - // Execute - bool _retval = CefRequestHandlerCppToC::Get(self)->OnBeforePluginLoad( - CefBrowserCToCpp::Wrap(browser), - CefString(url), - CefString(policy_url), - CefWebPluginInfoCToCpp::Wrap(info)); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls) - : CefCppToC(cls) { - struct_.struct_.on_before_resource_load = - request_handler_on_before_resource_load; - struct_.struct_.get_resource_handler = request_handler_get_resource_handler; - struct_.struct_.on_resource_redirect = request_handler_on_resource_redirect; - struct_.struct_.get_auth_credentials = request_handler_get_auth_credentials; - struct_.struct_.on_quota_request = request_handler_on_quota_request; - struct_.struct_.get_cookie_manager = request_handler_get_cookie_manager; - struct_.struct_.on_protocol_execution = request_handler_on_protocol_execution; - struct_.struct_.on_before_plugin_load = request_handler_on_before_plugin_load; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/request_handler_cpptoc.h b/cef/libcef_dll/cpptoc/request_handler_cpptoc.h deleted file mode 100644 index 866ef1152..000000000 --- a/cef/libcef_dll/cpptoc/request_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestHandlerCppToC - : public CefCppToC { - public: - explicit CefRequestHandlerCppToC(CefRequestHandler* cls); - virtual ~CefRequestHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc deleted file mode 100644 index 9a6bcd8e8..000000000 --- a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc +++ /dev/null @@ -1,98 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK resource_bundle_handler_get_localized_string( - struct _cef_resource_bundle_handler_t* self, int message_id, - cef_string_t* string) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: string; type: string_byref - DCHECK(string); - if (!string) - return 0; - - // Translate param: string; type: string_byref - CefString stringStr(string); - - // Execute - bool _retval = CefResourceBundleHandlerCppToC::Get(self)->GetLocalizedString( - message_id, - stringStr); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_bundle_handler_get_data_resource( - struct _cef_resource_bundle_handler_t* self, int resource_id, void** data, - size_t* data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: data; type: simple_byref - DCHECK(data); - if (!data) - return 0; - // Verify param: data_size; type: simple_byref - DCHECK(data_size); - if (!data_size) - return 0; - - // Translate param: data; type: simple_byref - void* dataVal = data?*data:NULL; - // Translate param: data_size; type: simple_byref - size_t data_sizeVal = data_size?*data_size:0; - - // Execute - bool _retval = CefResourceBundleHandlerCppToC::Get(self)->GetDataResource( - resource_id, - dataVal, - data_sizeVal); - - // Restore param: data; type: simple_byref - if (data) - *data = dataVal; - // Restore param: data_size; type: simple_byref - if (data_size) - *data_size = data_sizeVal; - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefResourceBundleHandlerCppToC::CefResourceBundleHandlerCppToC( - CefResourceBundleHandler* cls) - : CefCppToC(cls) { - struct_.struct_.get_localized_string = - resource_bundle_handler_get_localized_string; - struct_.struct_.get_data_resource = resource_bundle_handler_get_data_resource; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h deleted file mode 100644 index 8aefc1374..000000000 --- a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_resource_bundle_handler.h" -#include "include/capi/cef_resource_bundle_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefResourceBundleHandlerCppToC - : public CefCppToC { - public: - explicit CefResourceBundleHandlerCppToC(CefResourceBundleHandler* cls); - virtual ~CefResourceBundleHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc deleted file mode 100644 index c33b28c54..000000000 --- a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc +++ /dev/null @@ -1,203 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/ctocpp/callback_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/response_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK resource_handler_process_request( - struct _cef_resource_handler_t* self, cef_request_t* request, - cef_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->ProcessRequest( - CefRequestCToCpp::Wrap(request), - CefCallbackCToCpp::Wrap(callback)); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK resource_handler_get_response_headers( - struct _cef_resource_handler_t* self, struct _cef_response_t* response, - int64* response_length, cef_string_t* redirectUrl) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: response; type: refptr_diff - DCHECK(response); - if (!response) - return; - // Verify param: response_length; type: simple_byref - DCHECK(response_length); - if (!response_length) - return; - // Verify param: redirectUrl; type: string_byref - DCHECK(redirectUrl); - if (!redirectUrl) - return; - - // Translate param: response_length; type: simple_byref - int64 response_lengthVal = response_length?*response_length:0; - // Translate param: redirectUrl; type: string_byref - CefString redirectUrlStr(redirectUrl); - - // Execute - CefResourceHandlerCppToC::Get(self)->GetResponseHeaders( - CefResponseCToCpp::Wrap(response), - response_lengthVal, - redirectUrlStr); - - // Restore param: response_length; type: simple_byref - if (response_length) - *response_length = response_lengthVal; -} - -int CEF_CALLBACK resource_handler_read_response( - struct _cef_resource_handler_t* self, void* data_out, int bytes_to_read, - int* bytes_read, cef_callback_t* callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: data_out; type: simple_byaddr - DCHECK(data_out); - if (!data_out) - return 0; - // Verify param: bytes_read; type: simple_byref - DCHECK(bytes_read); - if (!bytes_read) - return 0; - // Verify param: callback; type: refptr_diff - DCHECK(callback); - if (!callback) - return 0; - - // Translate param: bytes_read; type: simple_byref - int bytes_readVal = bytes_read?*bytes_read:0; - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->ReadResponse( - data_out, - bytes_to_read, - bytes_readVal, - CefCallbackCToCpp::Wrap(callback)); - - // Restore param: bytes_read; type: simple_byref - if (bytes_read) - *bytes_read = bytes_readVal; - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_handler_can_get_cookie( - struct _cef_resource_handler_t* self, const struct _cef_cookie_t* cookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->CanGetCookie( - cookieObj); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK resource_handler_can_set_cookie( - struct _cef_resource_handler_t* self, const struct _cef_cookie_t* cookie) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: cookie; type: struct_byref_const - DCHECK(cookie); - if (!cookie) - return 0; - - // Translate param: cookie; type: struct_byref_const - CefCookie cookieObj; - if (cookie) - cookieObj.Set(*cookie, false); - - // Execute - bool _retval = CefResourceHandlerCppToC::Get(self)->CanSetCookie( - cookieObj); - - // Return type: bool - return _retval; -} - -void CEF_CALLBACK resource_handler_cancel( - struct _cef_resource_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefResourceHandlerCppToC::Get(self)->Cancel(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefResourceHandlerCppToC::CefResourceHandlerCppToC(CefResourceHandler* cls) - : CefCppToC(cls) { - struct_.struct_.process_request = resource_handler_process_request; - struct_.struct_.get_response_headers = resource_handler_get_response_headers; - struct_.struct_.read_response = resource_handler_read_response; - struct_.struct_.can_get_cookie = resource_handler_can_get_cookie; - struct_.struct_.can_set_cookie = resource_handler_can_set_cookie; - struct_.struct_.cancel = resource_handler_cancel; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h deleted file mode 100644 index 8c4972a44..000000000 --- a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_resource_handler.h" -#include "include/capi/cef_resource_handler_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefResourceHandlerCppToC - : public CefCppToC { - public: - explicit CefResourceHandlerCppToC(CefResourceHandler* cls); - virtual ~CefResourceHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/response_cpptoc.cc b/cef/libcef_dll/cpptoc/response_cpptoc.cc deleted file mode 100644 index 95bbe9223..000000000 --- a/cef/libcef_dll/cpptoc/response_cpptoc.cc +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/response_cpptoc.h" -#include "libcef_dll/transfer_util.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_response_t* cef_response_create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefResponse::Create(); - - // Return type: refptr_same - return CefResponseCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK response_is_read_only(struct _cef_response_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefResponseCppToC::Get(self)->IsReadOnly(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK response_get_status(struct _cef_response_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefResponseCppToC::Get(self)->GetStatus(); - - // Return type: simple - return _retval; -} - -void CEF_CALLBACK response_set_status(struct _cef_response_t* self, - int status) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefResponseCppToC::Get(self)->SetStatus( - status); -} - -cef_string_userfree_t CEF_CALLBACK response_get_status_text( - struct _cef_response_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefResponseCppToC::Get(self)->GetStatusText(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK response_set_status_text(struct _cef_response_t* self, - const cef_string_t* statusText) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: statusText; type: string_byref_const - DCHECK(statusText); - if (!statusText) - return; - - // Execute - CefResponseCppToC::Get(self)->SetStatusText( - CefString(statusText)); -} - -cef_string_userfree_t CEF_CALLBACK response_get_mime_type( - struct _cef_response_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefResponseCppToC::Get(self)->GetMimeType(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK response_set_mime_type(struct _cef_response_t* self, - const cef_string_t* mimeType) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: mimeType; type: string_byref_const - DCHECK(mimeType); - if (!mimeType) - return; - - // Execute - CefResponseCppToC::Get(self)->SetMimeType( - CefString(mimeType)); -} - -cef_string_userfree_t CEF_CALLBACK response_get_header( - struct _cef_response_t* self, const cef_string_t* name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return NULL; - - // Execute - CefString _retval = CefResponseCppToC::Get(self)->GetHeader( - CefString(name)); - - // Return type: string - return _retval.DetachToUserFree(); -} - -void CEF_CALLBACK response_get_header_map(struct _cef_response_t* self, - cef_string_multimap_t headerMap) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: headerMap; type: string_map_multi_byref - DCHECK(headerMap); - if (!headerMap) - return; - - // Translate param: headerMap; type: string_map_multi_byref - std::multimap headerMapMultimap; - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - CefResponseCppToC::Get(self)->GetHeaderMap( - headerMapMultimap); - - // Restore param: headerMap; type: string_map_multi_byref - cef_string_multimap_clear(headerMap); - transfer_string_multimap_contents(headerMapMultimap, headerMap); -} - -void CEF_CALLBACK response_set_header_map(struct _cef_response_t* self, - cef_string_multimap_t headerMap) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: headerMap; type: string_map_multi_byref_const - DCHECK(headerMap); - if (!headerMap) - return; - - // Translate param: headerMap; type: string_map_multi_byref_const - std::multimap headerMapMultimap; - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - CefResponseCppToC::Get(self)->SetHeaderMap( - headerMapMultimap); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefResponseCppToC::CefResponseCppToC(CefResponse* cls) - : CefCppToC(cls) { - struct_.struct_.is_read_only = response_is_read_only; - struct_.struct_.get_status = response_get_status; - struct_.struct_.set_status = response_set_status; - struct_.struct_.get_status_text = response_get_status_text; - struct_.struct_.set_status_text = response_set_status_text; - struct_.struct_.get_mime_type = response_get_mime_type; - struct_.struct_.set_mime_type = response_set_mime_type; - struct_.struct_.get_header = response_get_header; - struct_.struct_.get_header_map = response_get_header_map; - struct_.struct_.set_header_map = response_set_header_map; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/response_cpptoc.h b/cef/libcef_dll/cpptoc/response_cpptoc.h deleted file mode 100644 index 7397974e6..000000000 --- a/cef/libcef_dll/cpptoc/response_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_response.h" -#include "include/capi/cef_response_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefResponseCppToC - : public CefCppToC { - public: - explicit CefResponseCppToC(CefResponse* cls); - virtual ~CefResponseCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc deleted file mode 100644 index 5bafa8b42..000000000 --- a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc +++ /dev/null @@ -1,61 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK run_file_dialog_callback_cont( - struct _cef_run_file_dialog_callback_t* self, - struct _cef_browser_host_t* browser_host, cef_string_list_t file_paths) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: browser_host; type: refptr_diff - DCHECK(browser_host); - if (!browser_host) - return; - // Verify param: file_paths; type: string_vec_byref_const - DCHECK(file_paths); - if (!file_paths) - return; - - // Translate param: file_paths; type: string_vec_byref_const - std::vector file_pathsList; - transfer_string_list_contents(file_paths, file_pathsList); - - // Execute - CefRunFileDialogCallbackCppToC::Get(self)->OnFileDialogDismissed( - CefBrowserHostCToCpp::Wrap(browser_host), - file_pathsList); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefRunFileDialogCallbackCppToC::CefRunFileDialogCallbackCppToC( - CefRunFileDialogCallback* cls) - : CefCppToC(cls) { - struct_.struct_.cont = run_file_dialog_callback_cont; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h deleted file mode 100644 index 0302dc471..000000000 --- a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h +++ /dev/null @@ -1,39 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefRunFileDialogCallbackCppToC - : public CefCppToC { - public: - explicit CefRunFileDialogCallbackCppToC(CefRunFileDialogCallback* cls); - virtual ~CefRunFileDialogCallbackCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc deleted file mode 100644 index bf1a82e24..000000000 --- a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc +++ /dev/null @@ -1,67 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_resource_handler_t* CEF_CALLBACK scheme_handler_factory_create( - struct _cef_scheme_handler_factory_t* self, cef_browser_t* browser, - cef_frame_t* frame, const cef_string_t* scheme_name, - cef_request_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: scheme_name; type: string_byref_const - DCHECK(scheme_name); - if (!scheme_name) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return NULL; - // Unverified params: browser, frame - - // Execute - CefRefPtr _retval = CefSchemeHandlerFactoryCppToC::Get( - self)->Create( - CefBrowserCToCpp::Wrap(browser), - CefFrameCToCpp::Wrap(frame), - CefString(scheme_name), - CefRequestCToCpp::Wrap(request)); - - // Return type: refptr_same - return CefResourceHandlerCppToC::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC( - CefSchemeHandlerFactory* cls) - : CefCppToC(cls) { - struct_.struct_.create = scheme_handler_factory_create; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h deleted file mode 100644 index cb2f1472d..000000000 --- a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefSchemeHandlerFactoryCppToC - : public CefCppToC { - public: - explicit CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls); - virtual ~CefSchemeHandlerFactoryCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc b/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc deleted file mode 100644 index eb9de78c1..000000000 --- a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/scheme_registrar_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK scheme_registrar_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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: scheme_name; type: string_byref_const - DCHECK(scheme_name); - if (!scheme_name) - return 0; - - // Execute - bool _retval = CefSchemeRegistrarCppToC::Get(self)->AddCustomScheme( - CefString(scheme_name), - is_standard?true:false, - is_local?true:false, - is_display_isolated?true:false); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefSchemeRegistrarCppToC::CefSchemeRegistrarCppToC(CefSchemeRegistrar* cls) - : CefCppToC(cls) { - struct_.struct_.add_custom_scheme = scheme_registrar_add_custom_scheme; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h b/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h deleted file mode 100644 index cbcd2d6a5..000000000 --- a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefSchemeRegistrarCppToC - : public CefCppToC { - public: - explicit CefSchemeRegistrarCppToC(CefSchemeRegistrar* cls); - virtual ~CefSchemeRegistrarCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc b/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc deleted file mode 100644 index bfaf07f2b..000000000 --- a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/stream_reader_cpptoc.h" -#include "libcef_dll/ctocpp/read_handler_ctocpp.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file( - const cef_string_t* fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(fileName); - if (!fileName) - return NULL; - - // Execute - CefRefPtr _retval = CefStreamReader::CreateForFile( - CefString(fileName)); - - // Return type: refptr_same - return CefStreamReaderCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data, - size_t size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return NULL; - - // Execute - CefRefPtr _retval = CefStreamReader::CreateForData( - data, - size); - - // Return type: refptr_same - return CefStreamReaderCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler( - cef_read_handler_t* handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: handler; type: refptr_diff - DCHECK(handler); - if (!handler) - return NULL; - - // Execute - CefRefPtr _retval = CefStreamReader::CreateForHandler( - CefReadHandlerCToCpp::Wrap(handler)); - - // Return type: refptr_same - return CefStreamReaderCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -size_t CEF_CALLBACK stream_reader_read(struct _cef_stream_reader_t* self, - void* ptr, size_t size, size_t n) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = CefStreamReaderCppToC::Get(self)->Read( - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK stream_reader_seek(struct _cef_stream_reader_t* self, - int64 offset, int whence) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefStreamReaderCppToC::Get(self)->Seek( - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK stream_reader_tell(struct _cef_stream_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefStreamReaderCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK stream_reader_eof(struct _cef_stream_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefStreamReaderCppToC::Get(self)->Eof(); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefStreamReaderCppToC::CefStreamReaderCppToC(CefStreamReader* cls) - : CefCppToC( - cls) { - struct_.struct_.read = stream_reader_read; - struct_.struct_.seek = stream_reader_seek; - struct_.struct_.tell = stream_reader_tell; - struct_.struct_.eof = stream_reader_eof; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h b/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h deleted file mode 100644 index 3dee6cad0..000000000 --- a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefStreamReaderCppToC - : public CefCppToC { - public: - explicit CefStreamReaderCppToC(CefStreamReader* cls); - virtual ~CefStreamReaderCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc b/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc deleted file mode 100644 index 6c4c5b2dd..000000000 --- a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/stream_writer_cpptoc.h" -#include "libcef_dll/ctocpp/write_handler_ctocpp.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file( - const cef_string_t* fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(fileName); - if (!fileName) - return NULL; - - // Execute - CefRefPtr _retval = CefStreamWriter::CreateForFile( - CefString(fileName)); - - // Return type: refptr_same - return CefStreamWriterCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler( - cef_write_handler_t* handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: handler; type: refptr_diff - DCHECK(handler); - if (!handler) - return NULL; - - // Execute - CefRefPtr _retval = CefStreamWriter::CreateForHandler( - CefWriteHandlerCToCpp::Wrap(handler)); - - // Return type: refptr_same - return CefStreamWriterCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -size_t CEF_CALLBACK stream_writer_write(struct _cef_stream_writer_t* self, - const void* ptr, size_t size, size_t n) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = CefStreamWriterCppToC::Get(self)->Write( - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK stream_writer_seek(struct _cef_stream_writer_t* self, - int64 offset, int whence) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefStreamWriterCppToC::Get(self)->Seek( - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK stream_writer_tell(struct _cef_stream_writer_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefStreamWriterCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK stream_writer_flush(struct _cef_stream_writer_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefStreamWriterCppToC::Get(self)->Flush(); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefStreamWriterCppToC::CefStreamWriterCppToC(CefStreamWriter* cls) - : CefCppToC( - cls) { - struct_.struct_.write = stream_writer_write; - struct_.struct_.seek = stream_writer_seek; - struct_.struct_.tell = stream_writer_tell; - struct_.struct_.flush = stream_writer_flush; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h b/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h deleted file mode 100644 index b10d2f670..000000000 --- a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefStreamWriterCppToC - : public CefCppToC { - public: - explicit CefStreamWriterCppToC(CefStreamWriter* cls); - virtual ~CefStreamWriterCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc deleted file mode 100644 index 73edb9dfd..000000000 --- a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc +++ /dev/null @@ -1,48 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/string_visitor_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK string_visitor_visit(struct _cef_string_visitor_t* self, - const cef_string_t* string) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: string; type: string_byref_const - DCHECK(string); - if (!string) - return; - - // Execute - CefStringVisitorCppToC::Get(self)->Visit( - CefString(string)); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefStringVisitorCppToC::CefStringVisitorCppToC(CefStringVisitor* cls) - : CefCppToC( - cls) { - struct_.struct_.visit = string_visitor_visit; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h deleted file mode 100644 index 2cdd3b547..000000000 --- a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_string_visitor.h" -#include "include/capi/cef_string_visitor_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefStringVisitorCppToC - : public CefCppToC { - public: - explicit CefStringVisitorCppToC(CefStringVisitor* cls); - virtual ~CefStringVisitorCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/task_cpptoc.cc b/cef/libcef_dll/cpptoc/task_cpptoc.cc deleted file mode 100644 index f0de3a4f2..000000000 --- a/cef/libcef_dll/cpptoc/task_cpptoc.cc +++ /dev/null @@ -1,40 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/task_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK task_execute(struct _cef_task_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefTaskCppToC::Get(self)->Execute(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefTaskCppToC::CefTaskCppToC(CefTask* cls) - : CefCppToC(cls) { - struct_.struct_.execute = task_execute; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/task_cpptoc.h b/cef/libcef_dll/cpptoc/task_cpptoc.h deleted file mode 100644 index 495de4c60..000000000 --- a/cef/libcef_dll/cpptoc/task_cpptoc.h +++ /dev/null @@ -1,36 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefTaskCppToC - : public CefCppToC { - public: - explicit CefTaskCppToC(CefTask* cls); - virtual ~CefTaskCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc b/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc deleted file mode 100644 index 580d837ba..000000000 --- a/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc +++ /dev/null @@ -1,79 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/trace_client_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK trace_client_on_trace_data_collected( - struct _cef_trace_client_t* self, const char* fragment, - size_t fragment_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: fragment; type: simple_byaddr - DCHECK(fragment); - if (!fragment) - return; - - // Execute - CefTraceClientCppToC::Get(self)->OnTraceDataCollected( - fragment, - fragment_size); -} - -void CEF_CALLBACK trace_client_on_trace_buffer_percent_full_reply( - struct _cef_trace_client_t* self, float percent_full) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefTraceClientCppToC::Get(self)->OnTraceBufferPercentFullReply( - percent_full); -} - -void CEF_CALLBACK trace_client_on_end_tracing_complete( - struct _cef_trace_client_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefTraceClientCppToC::Get(self)->OnEndTracingComplete(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefTraceClientCppToC::CefTraceClientCppToC(CefTraceClient* cls) - : CefCppToC(cls) { - struct_.struct_.on_trace_data_collected = - trace_client_on_trace_data_collected; - struct_.struct_.on_trace_buffer_percent_full_reply = - trace_client_on_trace_buffer_percent_full_reply; - struct_.struct_.on_end_tracing_complete = - trace_client_on_end_tracing_complete; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/trace_client_cpptoc.h b/cef/libcef_dll/cpptoc/trace_client_cpptoc.h deleted file mode 100644 index f005ea9ed..000000000 --- a/cef/libcef_dll/cpptoc/trace_client_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_TRACE_CLIENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_TRACE_CLIENT_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_trace.h" -#include "include/capi/cef_trace_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefTraceClientCppToC - : public CefCppToC { - public: - explicit CefTraceClientCppToC(CefTraceClient* cls); - virtual ~CefTraceClientCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_TRACE_CLIENT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc deleted file mode 100644 index 086129203..000000000 --- a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc +++ /dev/null @@ -1,116 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" -#include "libcef_dll/ctocpp/urlrequest_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK urlrequest_client_on_request_complete( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnRequestComplete( - CefURLRequestCToCpp::Wrap(request)); -} - -void CEF_CALLBACK urlrequest_client_on_upload_progress( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - uint64 current, uint64 total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnUploadProgress( - CefURLRequestCToCpp::Wrap(request), - current, - total); -} - -void CEF_CALLBACK urlrequest_client_on_download_progress( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - uint64 current, uint64 total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnDownloadProgress( - CefURLRequestCToCpp::Wrap(request), - current, - total); -} - -void CEF_CALLBACK urlrequest_client_on_download_data( - struct _cef_urlrequest_client_t* self, cef_urlrequest_t* request, - const void* data, size_t data_length) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: request; type: refptr_diff - DCHECK(request); - if (!request) - return; - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return; - - // Execute - CefURLRequestClientCppToC::Get(self)->OnDownloadData( - CefURLRequestCToCpp::Wrap(request), - data, - data_length); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefURLRequestClientCppToC::CefURLRequestClientCppToC(CefURLRequestClient* cls) - : CefCppToC(cls) { - struct_.struct_.on_request_complete = urlrequest_client_on_request_complete; - struct_.struct_.on_upload_progress = urlrequest_client_on_upload_progress; - struct_.struct_.on_download_progress = urlrequest_client_on_download_progress; - struct_.struct_.on_download_data = urlrequest_client_on_download_data; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h deleted file mode 100644 index 6640749a8..000000000 --- a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_urlrequest.h" -#include "include/capi/cef_urlrequest_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefURLRequestClientCppToC - : public CefCppToC { - public: - explicit CefURLRequestClientCppToC(CefURLRequestClient* cls); - virtual ~CefURLRequestClientCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc b/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc deleted file mode 100644 index 506ee8085..000000000 --- a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/request_cpptoc.h" -#include "libcef_dll/cpptoc/response_cpptoc.h" -#include "libcef_dll/cpptoc/urlrequest_cpptoc.h" -#include "libcef_dll/ctocpp/urlrequest_client_ctocpp.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create(cef_request_t* request, - struct _cef_urlrequest_client_t* client) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_same - DCHECK(request); - if (!request) - return NULL; - // Verify param: client; type: refptr_diff - DCHECK(client); - if (!client) - return NULL; - - // Execute - CefRefPtr _retval = CefURLRequest::Create( - CefRequestCppToC::Unwrap(request), - CefURLRequestClientCToCpp::Wrap(client)); - - // Return type: refptr_same - return CefURLRequestCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_request_t* CEF_CALLBACK urlrequest_get_request( - struct _cef_urlrequest_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefURLRequestCppToC::Get(self)->GetRequest(); - - // Return type: refptr_same - return CefRequestCppToC::Wrap(_retval); -} - -struct _cef_urlrequest_client_t* CEF_CALLBACK urlrequest_get_client( - struct _cef_urlrequest_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefURLRequestCppToC::Get( - self)->GetClient(); - - // Return type: refptr_diff - return CefURLRequestClientCToCpp::Unwrap(_retval); -} - -enum cef_urlrequest_status_t CEF_CALLBACK urlrequest_get_request_status( - struct _cef_urlrequest_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return UR_UNKNOWN; - - // Execute - cef_urlrequest_status_t _retval = CefURLRequestCppToC::Get( - self)->GetRequestStatus(); - - // Return type: simple - return _retval; -} - -enum cef_errorcode_t CEF_CALLBACK urlrequest_get_request_error( - struct _cef_urlrequest_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return ERR_NONE; - - // Execute - cef_errorcode_t _retval = CefURLRequestCppToC::Get(self)->GetRequestError(); - - // Return type: simple - return _retval; -} - -cef_response_t* CEF_CALLBACK urlrequest_get_response( - struct _cef_urlrequest_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefURLRequestCppToC::Get(self)->GetResponse( - ); - - // Return type: refptr_same - return CefResponseCppToC::Wrap(_retval); -} - -void CEF_CALLBACK urlrequest_cancel(struct _cef_urlrequest_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - - // Execute - CefURLRequestCppToC::Get(self)->Cancel(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefURLRequestCppToC::CefURLRequestCppToC(CefURLRequest* cls) - : CefCppToC(cls) { - struct_.struct_.get_request = urlrequest_get_request; - struct_.struct_.get_client = urlrequest_get_client; - struct_.struct_.get_request_status = urlrequest_get_request_status; - struct_.struct_.get_request_error = urlrequest_get_request_error; - struct_.struct_.get_response = urlrequest_get_response; - struct_.struct_.cancel = urlrequest_cancel; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h b/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h deleted file mode 100644 index fc26a30c4..000000000 --- a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_urlrequest.h" -#include "include/capi/cef_urlrequest_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefURLRequestCppToC - : public CefCppToC { - public: - explicit CefURLRequestCppToC(CefURLRequest* cls); - virtual ~CefURLRequestCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc deleted file mode 100644 index cd92d6c9f..000000000 --- a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc +++ /dev/null @@ -1,126 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8accessor_cpptoc.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK v8accessor_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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - // Verify param: object; type: refptr_diff - DCHECK(object); - if (!object) - return 0; - // Verify param: retval; type: refptr_diff_byref - DCHECK(retval); - if (!retval) - return 0; - // Verify param: exception; type: string_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: retval; type: refptr_diff_byref - CefRefPtr retvalPtr; - if (retval && *retval) - retvalPtr = CefV8ValueCToCpp::Wrap(*retval); - CefV8Value* retvalOrig = retvalPtr.get(); - // Translate param: exception; type: string_byref - CefString exceptionStr(exception); - - // Execute - bool _retval = CefV8AccessorCppToC::Get(self)->Get( - CefString(name), - CefV8ValueCToCpp::Wrap(object), - retvalPtr, - exceptionStr); - - // Restore param: retval; type: refptr_diff_byref - if (retval) { - if (retvalPtr.get()) { - if (retvalPtr.get() != retvalOrig) { - *retval = CefV8ValueCToCpp::Unwrap(retvalPtr); - } - } else { - *retval = NULL; - } - } - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8accessor_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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - // Verify param: object; type: refptr_diff - DCHECK(object); - if (!object) - return 0; - // Verify param: value; type: refptr_diff - DCHECK(value); - if (!value) - return 0; - // Verify param: exception; type: string_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: exception; type: string_byref - CefString exceptionStr(exception); - - // Execute - bool _retval = CefV8AccessorCppToC::Get(self)->Set( - CefString(name), - CefV8ValueCToCpp::Wrap(object), - CefV8ValueCToCpp::Wrap(value), - exceptionStr); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8AccessorCppToC::CefV8AccessorCppToC(CefV8Accessor* cls) - : CefCppToC(cls) { - struct_.struct_.get = v8accessor_get; - struct_.struct_.set = v8accessor_set; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h deleted file mode 100644 index 80791a9a1..000000000 --- a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h +++ /dev/null @@ -1,36 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefV8AccessorCppToC - : public CefCppToC { - public: - explicit CefV8AccessorCppToC(CefV8Accessor* cls); - virtual ~CefV8AccessorCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/v8context_cpptoc.cc b/cef/libcef_dll/cpptoc/v8context_cpptoc.cc deleted file mode 100644 index 6aa3149ee..000000000 --- a/cef/libcef_dll/cpptoc/v8context_cpptoc.cc +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/v8context_cpptoc.h" -#include "libcef_dll/cpptoc/v8exception_cpptoc.h" -#include "libcef_dll/cpptoc/v8value_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Context::GetCurrentContext(); - - // Return type: refptr_same - return CefV8ContextCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Context::GetEnteredContext(); - - // Return type: refptr_same - return CefV8ContextCppToC::Wrap(_retval); -} - -CEF_EXPORT int cef_v8context_in_context() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - bool _retval = CefV8Context::InContext(); - - // Return type: bool - return _retval; -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_browser_t* CEF_CALLBACK v8context_get_browser( - struct _cef_v8context_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ContextCppToC::Get(self)->GetBrowser(); - - // Return type: refptr_same - return CefBrowserCppToC::Wrap(_retval); -} - -cef_frame_t* CEF_CALLBACK v8context_get_frame(struct _cef_v8context_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ContextCppToC::Get(self)->GetFrame(); - - // Return type: refptr_same - return CefFrameCppToC::Wrap(_retval); -} - -struct _cef_v8value_t* CEF_CALLBACK v8context_get_global( - struct _cef_v8context_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ContextCppToC::Get(self)->GetGlobal(); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -int CEF_CALLBACK v8context_enter(struct _cef_v8context_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ContextCppToC::Get(self)->Enter(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8context_exit(struct _cef_v8context_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ContextCppToC::Get(self)->Exit(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8context_is_same(struct _cef_v8context_t* self, - struct _cef_v8context_t* that) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: that; type: refptr_same - DCHECK(that); - if (!that) - return 0; - - // Execute - bool _retval = CefV8ContextCppToC::Get(self)->IsSame( - CefV8ContextCppToC::Unwrap(that)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8context_eval(struct _cef_v8context_t* self, - const cef_string_t* code, struct _cef_v8value_t** retval, - struct _cef_v8exception_t** exception) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: code; type: string_byref_const - DCHECK(code); - if (!code) - return 0; - // Verify param: retval; type: refptr_same_byref - DCHECK(retval); - if (!retval) - return 0; - // Verify param: exception; type: refptr_same_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: retval; type: refptr_same_byref - CefRefPtr retvalPtr; - if (retval && *retval) - retvalPtr = CefV8ValueCppToC::Unwrap(*retval); - CefV8Value* retvalOrig = retvalPtr.get(); - // Translate param: exception; type: refptr_same_byref - CefRefPtr exceptionPtr; - if (exception && *exception) - exceptionPtr = CefV8ExceptionCppToC::Unwrap(*exception); - CefV8Exception* exceptionOrig = exceptionPtr.get(); - - // Execute - bool _retval = CefV8ContextCppToC::Get(self)->Eval( - CefString(code), - retvalPtr, - exceptionPtr); - - // Restore param: retval; type: refptr_same_byref - if (retval) { - if (retvalPtr.get()) { - if (retvalPtr.get() != retvalOrig) { - *retval = CefV8ValueCppToC::Wrap(retvalPtr); - } - } else { - *retval = NULL; - } - } - // Restore param: exception; type: refptr_same_byref - if (exception) { - if (exceptionPtr.get()) { - if (exceptionPtr.get() != exceptionOrig) { - *exception = CefV8ExceptionCppToC::Wrap(exceptionPtr); - } - } else { - *exception = NULL; - } - } - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8ContextCppToC::CefV8ContextCppToC(CefV8Context* cls) - : CefCppToC(cls) { - struct_.struct_.get_browser = v8context_get_browser; - struct_.struct_.get_frame = v8context_get_frame; - struct_.struct_.get_global = v8context_get_global; - struct_.struct_.enter = v8context_enter; - struct_.struct_.exit = v8context_exit; - struct_.struct_.is_same = v8context_is_same; - struct_.struct_.eval = v8context_eval; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/v8context_cpptoc.h b/cef/libcef_dll/cpptoc/v8context_cpptoc.h deleted file mode 100644 index c19fff2ad..000000000 --- a/cef/libcef_dll/cpptoc/v8context_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefV8ContextCppToC - : public CefCppToC { - public: - explicit CefV8ContextCppToC(CefV8Context* cls); - virtual ~CefV8ContextCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc b/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc deleted file mode 100644 index 264fa8da9..000000000 --- a/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8exception_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_string_userfree_t CEF_CALLBACK v8exception_get_message( - struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefV8ExceptionCppToC::Get(self)->GetMessage(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK v8exception_get_source_line( - struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefV8ExceptionCppToC::Get(self)->GetSourceLine(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK v8exception_get_script_resource_name( - struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefV8ExceptionCppToC::Get(self)->GetScriptResourceName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK v8exception_get_line_number(struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ExceptionCppToC::Get(self)->GetLineNumber(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK v8exception_get_start_position( - struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ExceptionCppToC::Get(self)->GetStartPosition(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK v8exception_get_end_position(struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ExceptionCppToC::Get(self)->GetEndPosition(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK v8exception_get_start_column(struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ExceptionCppToC::Get(self)->GetStartColumn(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK v8exception_get_end_column(struct _cef_v8exception_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ExceptionCppToC::Get(self)->GetEndColumn(); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8ExceptionCppToC::CefV8ExceptionCppToC(CefV8Exception* cls) - : CefCppToC(cls) { - struct_.struct_.get_message = v8exception_get_message; - struct_.struct_.get_source_line = v8exception_get_source_line; - struct_.struct_.get_script_resource_name = - v8exception_get_script_resource_name; - struct_.struct_.get_line_number = v8exception_get_line_number; - struct_.struct_.get_start_position = v8exception_get_start_position; - struct_.struct_.get_end_position = v8exception_get_end_position; - struct_.struct_.get_start_column = v8exception_get_start_column; - struct_.struct_.get_end_column = v8exception_get_end_column; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/v8exception_cpptoc.h b/cef/libcef_dll/cpptoc/v8exception_cpptoc.h deleted file mode 100644 index 040d782a4..000000000 --- a/cef/libcef_dll/cpptoc/v8exception_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefV8ExceptionCppToC - : public CefCppToC { - public: - explicit CefV8ExceptionCppToC(CefV8Exception* cls); - virtual ~CefV8ExceptionCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc b/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc deleted file mode 100644 index 49c7c28cc..000000000 --- a/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc +++ /dev/null @@ -1,99 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8handler_cpptoc.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK v8handler_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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return 0; - // Verify param: object; type: refptr_diff - DCHECK(object); - if (!object) - return 0; - // Verify param: arguments; type: refptr_vec_diff_byref_const - DCHECK(argumentsCount == 0 || arguments); - if (argumentsCount > 0 && !arguments) - return 0; - // Verify param: retval; type: refptr_diff_byref - DCHECK(retval); - if (!retval) - return 0; - // Verify param: exception; type: string_byref - DCHECK(exception); - if (!exception) - return 0; - - // Translate param: arguments; type: refptr_vec_diff_byref_const - std::vector > argumentsList; - if (argumentsCount > 0) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList.push_back(CefV8ValueCToCpp::Wrap(arguments[i])); - } - } - // Translate param: retval; type: refptr_diff_byref - CefRefPtr retvalPtr; - if (retval && *retval) - retvalPtr = CefV8ValueCToCpp::Wrap(*retval); - CefV8Value* retvalOrig = retvalPtr.get(); - // Translate param: exception; type: string_byref - CefString exceptionStr(exception); - - // Execute - bool _retval = CefV8HandlerCppToC::Get(self)->Execute( - CefString(name), - CefV8ValueCToCpp::Wrap(object), - argumentsList, - retvalPtr, - exceptionStr); - - // Restore param: retval; type: refptr_diff_byref - if (retval) { - if (retvalPtr.get()) { - if (retvalPtr.get() != retvalOrig) { - *retval = CefV8ValueCToCpp::Unwrap(retvalPtr); - } - } else { - *retval = NULL; - } - } - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8HandlerCppToC::CefV8HandlerCppToC(CefV8Handler* cls) - : CefCppToC(cls) { - struct_.struct_.execute = v8handler_execute; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/v8handler_cpptoc.h b/cef/libcef_dll/cpptoc/v8handler_cpptoc.h deleted file mode 100644 index aab996c24..000000000 --- a/cef/libcef_dll/cpptoc/v8handler_cpptoc.h +++ /dev/null @@ -1,36 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefV8HandlerCppToC - : public CefCppToC { - public: - explicit CefV8HandlerCppToC(CefV8Handler* cls); - virtual ~CefV8HandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/v8value_cpptoc.cc b/cef/libcef_dll/cpptoc/v8value_cpptoc.cc deleted file mode 100644 index 0ebed8c85..000000000 --- a/cef/libcef_dll/cpptoc/v8value_cpptoc.cc +++ /dev/null @@ -1,973 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8context_cpptoc.h" -#include "libcef_dll/cpptoc/v8exception_cpptoc.h" -#include "libcef_dll/cpptoc/v8value_cpptoc.h" -#include "libcef_dll/ctocpp/base_ctocpp.h" -#include "libcef_dll/ctocpp/v8accessor_ctocpp.h" -#include "libcef_dll/ctocpp/v8handler_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateUndefined(); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_null() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateNull(); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateBool( - value?true:false); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int32 value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateInt( - value); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_uint(uint32 value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateUInt( - value); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateDouble( - value); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_date(const cef_time_t* date) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: date; type: simple_byref_const - DCHECK(date); - if (!date) - return NULL; - - // Translate param: date; type: simple_byref_const - CefTime dateVal = date?*date:CefTime(); - - // Execute - CefRefPtr _retval = CefV8Value::CreateDate( - dateVal); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: value - - // Execute - CefRefPtr _retval = CefV8Value::CreateString( - CefString(value)); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_object( - cef_v8accessor_t* accessor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: accessor - - // Execute - CefRefPtr _retval = CefV8Value::CreateObject( - CefV8AccessorCToCpp::Wrap(accessor)); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRefPtr _retval = CefV8Value::CreateArray( - length); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name, - cef_v8handler_t* handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(name); - if (!name) - return NULL; - // Verify param: handler; type: refptr_diff - DCHECK(handler); - if (!handler) - return NULL; - - // Execute - CefRefPtr _retval = CefV8Value::CreateFunction( - CefString(name), - CefV8HandlerCToCpp::Wrap(handler)); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK v8value_is_undefined(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsUndefined(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_null(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsNull(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_bool(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsBool(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_int(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsInt(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_uint(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsUInt(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_double(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsDouble(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_date(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsDate(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_string(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsString(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_object(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsObject(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_array(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsArray(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_function(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsFunction(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_is_same(struct _cef_v8value_t* self, - struct _cef_v8value_t* that) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: that; type: refptr_same - DCHECK(that); - if (!that) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsSame( - CefV8ValueCppToC::Unwrap(that)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_get_bool_value(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->GetBoolValue(); - - // Return type: bool - return _retval; -} - -int32 CEF_CALLBACK v8value_get_int_value(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int32 _retval = CefV8ValueCppToC::Get(self)->GetIntValue(); - - // Return type: simple - return _retval; -} - -uint32 CEF_CALLBACK v8value_get_uint_value(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - uint32 _retval = CefV8ValueCppToC::Get(self)->GetUIntValue(); - - // Return type: simple - return _retval; -} - -double CEF_CALLBACK v8value_get_double_value(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - double _retval = CefV8ValueCppToC::Get(self)->GetDoubleValue(); - - // Return type: simple - return _retval; -} - -cef_time_t CEF_CALLBACK v8value_get_date_value(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return CefTime(); - - // Execute - cef_time_t _retval = CefV8ValueCppToC::Get(self)->GetDateValue(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK v8value_get_string_value( - struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefV8ValueCppToC::Get(self)->GetStringValue(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK v8value_is_user_created(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->IsUserCreated(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_has_exception(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->HasException(); - - // Return type: bool - return _retval; -} - -cef_v8exception_t* CEF_CALLBACK v8value_get_exception( - struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get(self)->GetException( - ); - - // Return type: refptr_same - return CefV8ExceptionCppToC::Wrap(_retval); -} - -int CEF_CALLBACK v8value_clear_exception(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->ClearException(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_will_rethrow_exceptions(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->WillRethrowExceptions(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_set_rethrow_exceptions(struct _cef_v8value_t* self, - int rethrow) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->SetRethrowExceptions( - rethrow?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_has_value_bykey(struct _cef_v8value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->HasValue( - CefString(key)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_has_value_byindex(struct _cef_v8value_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->HasValue( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_delete_value_bykey(struct _cef_v8value_t* self, - const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->DeleteValue( - CefString(key)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_delete_value_byindex(struct _cef_v8value_t* self, - int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->DeleteValue( - index); - - // Return type: bool - return _retval; -} - -struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_bykey( - struct _cef_v8value_t* self, const cef_string_t* key) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get(self)->GetValue( - CefString(key)); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_byindex( - struct _cef_v8value_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get(self)->GetValue( - index); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -int CEF_CALLBACK v8value_set_value_bykey(struct _cef_v8value_t* self, - const cef_string_t* key, struct _cef_v8value_t* value, - enum cef_v8_propertyattribute_t attribute) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->SetValue( - CefString(key), - CefV8ValueCppToC::Unwrap(value), - attribute); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self, - int index, struct _cef_v8value_t* value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - // Verify param: value; type: refptr_same - DCHECK(value); - if (!value) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->SetValue( - index, - CefV8ValueCppToC::Unwrap(value)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: key; type: string_byref_const - DCHECK(key); - if (!key) - return 0; - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->SetValue( - CefString(key), - settings, - attribute); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_get_keys(struct _cef_v8value_t* self, - cef_string_list_t keys) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: keys; type: string_vec_byref - DCHECK(keys); - if (!keys) - return 0; - - // Translate param: keys; type: string_vec_byref - std::vector keysList; - transfer_string_list_contents(keys, keysList); - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->GetKeys( - keysList); - - // Restore param: keys; type: string_vec_byref - cef_string_list_clear(keys); - transfer_string_list_contents(keysList, keys); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK v8value_set_user_data(struct _cef_v8value_t* self, - cef_base_t* user_data) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Unverified params: user_data - - // Execute - bool _retval = CefV8ValueCppToC::Get(self)->SetUserData( - CefBaseCToCpp::Wrap(user_data)); - - // Return type: bool - return _retval; -} - -cef_base_t* CEF_CALLBACK v8value_get_user_data(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get(self)->GetUserData(); - - // Return type: refptr_diff - return CefBaseCToCpp::Unwrap(_retval); -} - -int CEF_CALLBACK v8value_get_externally_allocated_memory( - struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ValueCppToC::Get(self)->GetExternallyAllocatedMemory(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK v8value_adjust_externally_allocated_memory( - struct _cef_v8value_t* self, int change_in_bytes) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ValueCppToC::Get(self)->AdjustExternallyAllocatedMemory( - change_in_bytes); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK v8value_get_array_length(struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefV8ValueCppToC::Get(self)->GetArrayLength(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK v8value_get_function_name( - struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefV8ValueCppToC::Get(self)->GetFunctionName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_v8handler_t* CEF_CALLBACK v8value_get_function_handler( - struct _cef_v8value_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get( - self)->GetFunctionHandler(); - - // Return type: refptr_diff - return CefV8HandlerCToCpp::Unwrap(_retval); -} - -struct _cef_v8value_t* CEF_CALLBACK v8value_execute_function( - struct _cef_v8value_t* self, struct _cef_v8value_t* object, - size_t argumentsCount, struct _cef_v8value_t* const* arguments) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: arguments; type: refptr_vec_same_byref_const - DCHECK(argumentsCount == 0 || arguments); - if (argumentsCount > 0 && !arguments) - return NULL; - // Unverified params: object - - // Translate param: arguments; type: refptr_vec_same_byref_const - std::vector > argumentsList; - if (argumentsCount > 0) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList.push_back(CefV8ValueCppToC::Unwrap(arguments[i])); - } - } - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get(self)->ExecuteFunction( - CefV8ValueCppToC::Unwrap(object), - argumentsList); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - -struct _cef_v8value_t* CEF_CALLBACK v8value_execute_function_with_context( - struct _cef_v8value_t* self, cef_v8context_t* context, - struct _cef_v8value_t* object, size_t argumentsCount, - struct _cef_v8value_t* const* arguments) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: context; type: refptr_same - DCHECK(context); - if (!context) - return NULL; - // Verify param: arguments; type: refptr_vec_same_byref_const - DCHECK(argumentsCount == 0 || arguments); - if (argumentsCount > 0 && !arguments) - return NULL; - // Unverified params: object - - // Translate param: arguments; type: refptr_vec_same_byref_const - std::vector > argumentsList; - if (argumentsCount > 0) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList.push_back(CefV8ValueCppToC::Unwrap(arguments[i])); - } - } - - // Execute - CefRefPtr _retval = CefV8ValueCppToC::Get( - self)->ExecuteFunctionWithContext( - CefV8ContextCppToC::Unwrap(context), - CefV8ValueCppToC::Unwrap(object), - argumentsList); - - // Return type: refptr_same - return CefV8ValueCppToC::Wrap(_retval); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefV8ValueCppToC::CefV8ValueCppToC(CefV8Value* cls) - : CefCppToC(cls) { - struct_.struct_.is_undefined = v8value_is_undefined; - struct_.struct_.is_null = v8value_is_null; - struct_.struct_.is_bool = v8value_is_bool; - struct_.struct_.is_int = v8value_is_int; - struct_.struct_.is_uint = v8value_is_uint; - struct_.struct_.is_double = v8value_is_double; - struct_.struct_.is_date = v8value_is_date; - struct_.struct_.is_string = v8value_is_string; - struct_.struct_.is_object = v8value_is_object; - struct_.struct_.is_array = v8value_is_array; - struct_.struct_.is_function = v8value_is_function; - struct_.struct_.is_same = v8value_is_same; - struct_.struct_.get_bool_value = v8value_get_bool_value; - struct_.struct_.get_int_value = v8value_get_int_value; - struct_.struct_.get_uint_value = v8value_get_uint_value; - struct_.struct_.get_double_value = v8value_get_double_value; - struct_.struct_.get_date_value = v8value_get_date_value; - struct_.struct_.get_string_value = v8value_get_string_value; - struct_.struct_.is_user_created = v8value_is_user_created; - struct_.struct_.has_exception = v8value_has_exception; - struct_.struct_.get_exception = v8value_get_exception; - struct_.struct_.clear_exception = v8value_clear_exception; - struct_.struct_.will_rethrow_exceptions = v8value_will_rethrow_exceptions; - struct_.struct_.set_rethrow_exceptions = v8value_set_rethrow_exceptions; - struct_.struct_.has_value_bykey = v8value_has_value_bykey; - struct_.struct_.has_value_byindex = v8value_has_value_byindex; - struct_.struct_.delete_value_bykey = v8value_delete_value_bykey; - struct_.struct_.delete_value_byindex = v8value_delete_value_byindex; - struct_.struct_.get_value_bykey = v8value_get_value_bykey; - struct_.struct_.get_value_byindex = v8value_get_value_byindex; - struct_.struct_.set_value_bykey = v8value_set_value_bykey; - struct_.struct_.set_value_byindex = v8value_set_value_byindex; - struct_.struct_.set_value_byaccessor = v8value_set_value_byaccessor; - struct_.struct_.get_keys = v8value_get_keys; - struct_.struct_.set_user_data = v8value_set_user_data; - struct_.struct_.get_user_data = v8value_get_user_data; - struct_.struct_.get_externally_allocated_memory = - v8value_get_externally_allocated_memory; - struct_.struct_.adjust_externally_allocated_memory = - v8value_adjust_externally_allocated_memory; - struct_.struct_.get_array_length = v8value_get_array_length; - struct_.struct_.get_function_name = v8value_get_function_name; - struct_.struct_.get_function_handler = v8value_get_function_handler; - struct_.struct_.execute_function = v8value_execute_function; - struct_.struct_.execute_function_with_context = - v8value_execute_function_with_context; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/v8value_cpptoc.h b/cef/libcef_dll/cpptoc/v8value_cpptoc.h deleted file mode 100644 index 086bda36d..000000000 --- a/cef/libcef_dll/cpptoc/v8value_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefV8ValueCppToC - : public CefCppToC { - public: - explicit CefV8ValueCppToC(CefV8Value* cls); - virtual ~CefV8ValueCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc deleted file mode 100644 index 46caf75f6..000000000 --- a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -cef_string_userfree_t CEF_CALLBACK web_plugin_info_get_name( - struct _cef_web_plugin_info_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK web_plugin_info_get_path( - struct _cef_web_plugin_info_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetPath(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK web_plugin_info_get_version( - struct _cef_web_plugin_info_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetVersion(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK web_plugin_info_get_description( - struct _cef_web_plugin_info_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetDescription(); - - // Return type: string - return _retval.DetachToUserFree(); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefWebPluginInfoCppToC::CefWebPluginInfoCppToC(CefWebPluginInfo* cls) - : CefCppToC(cls) { - struct_.struct_.get_name = web_plugin_info_get_name; - struct_.struct_.get_path = web_plugin_info_get_path; - struct_.struct_.get_version = web_plugin_info_get_version; - struct_.struct_.get_description = web_plugin_info_get_description; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h deleted file mode 100644 index 9ede6a894..000000000 --- a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefWebPluginInfoCppToC - : public CefCppToC { - public: - explicit CefWebPluginInfoCppToC(CefWebPluginInfo* cls); - virtual ~CefWebPluginInfoCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc deleted file mode 100644 index 755223bd9..000000000 --- a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc +++ /dev/null @@ -1,56 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK web_plugin_info_visitor_visit( - struct _cef_web_plugin_info_visitor_t* self, cef_web_plugin_info_t* info, - int count, int total) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: info; type: refptr_diff - DCHECK(info); - if (!info) - return 0; - - // Execute - bool _retval = CefWebPluginInfoVisitorCppToC::Get(self)->Visit( - CefWebPluginInfoCToCpp::Wrap(info), - count, - total); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefWebPluginInfoVisitorCppToC::CefWebPluginInfoVisitorCppToC( - CefWebPluginInfoVisitor* cls) - : CefCppToC(cls) { - struct_.struct_.visit = web_plugin_info_visitor_visit; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h deleted file mode 100644 index c81f056ba..000000000 --- a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefWebPluginInfoVisitorCppToC - : public CefCppToC { - public: - explicit CefWebPluginInfoVisitorCppToC(CefWebPluginInfoVisitor* cls); - virtual ~CefWebPluginInfoVisitorCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc deleted file mode 100644 index a1e27f086..000000000 --- a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc +++ /dev/null @@ -1,53 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -void CEF_CALLBACK web_plugin_unstable_callback_is_unstable( - struct _cef_web_plugin_unstable_callback_t* self, const cef_string_t* path, - int unstable) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return; - // Verify param: path; type: string_byref_const - DCHECK(path); - if (!path) - return; - - // Execute - CefWebPluginUnstableCallbackCppToC::Get(self)->IsUnstable( - CefString(path), - unstable?true:false); -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC( - CefWebPluginUnstableCallback* cls) - : CefCppToC( - cls) { - struct_.struct_.is_unstable = web_plugin_unstable_callback_is_unstable; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h deleted file mode 100644 index 43f62a30d..000000000 --- a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h +++ /dev/null @@ -1,38 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefWebPluginUnstableCallbackCppToC - : public CefCppToC { - public: - explicit CefWebPluginUnstableCallbackCppToC( - CefWebPluginUnstableCallback* cls); - virtual ~CefWebPluginUnstableCallbackCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc deleted file mode 100644 index 001928442..000000000 --- a/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc +++ /dev/null @@ -1,101 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/write_handler_cpptoc.h" - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -size_t CEF_CALLBACK write_handler_write(struct _cef_write_handler_t* self, - const void* ptr, size_t size, size_t n) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = CefWriteHandlerCppToC::Get(self)->Write( - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK write_handler_seek(struct _cef_write_handler_t* self, - int64 offset, int whence) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefWriteHandlerCppToC::Get(self)->Seek( - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK write_handler_tell(struct _cef_write_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefWriteHandlerCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK write_handler_flush(struct _cef_write_handler_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefWriteHandlerCppToC::Get(self)->Flush(); - - // Return type: simple - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefWriteHandlerCppToC::CefWriteHandlerCppToC(CefWriteHandler* cls) - : CefCppToC( - cls) { - struct_.struct_.write = write_handler_write; - struct_.struct_.seek = write_handler_seek; - struct_.struct_.tell = write_handler_tell; - struct_.struct_.flush = write_handler_flush; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/write_handler_cpptoc.h b/cef/libcef_dll/cpptoc/write_handler_cpptoc.h deleted file mode 100644 index eda6ea830..000000000 --- a/cef/libcef_dll/cpptoc/write_handler_cpptoc.h +++ /dev/null @@ -1,37 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed wrapper-side only. -class CefWriteHandlerCppToC - : public CefCppToC { - public: - explicit CefWriteHandlerCppToC(CefWriteHandler* cls); - virtual ~CefWriteHandlerCppToC() {} -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc b/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc deleted file mode 100644 index a80c32b2e..000000000 --- a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/stream_reader_cpptoc.h" -#include "libcef_dll/cpptoc/xml_reader_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(cef_stream_reader_t* stream, - enum cef_xml_encoding_type_t encodingType, const cef_string_t* URI) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: stream; type: refptr_same - DCHECK(stream); - if (!stream) - return NULL; - // Verify param: URI; type: string_byref_const - DCHECK(URI); - if (!URI) - return NULL; - - // Execute - CefRefPtr _retval = CefXmlReader::Create( - CefStreamReaderCppToC::Unwrap(stream), - encodingType, - CefString(URI)); - - // Return type: refptr_same - return CefXmlReaderCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK xml_reader_move_to_next_node(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToNextNode(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_close(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->Close(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_has_error(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->HasError(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_error( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetError(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -enum cef_xml_node_type_t CEF_CALLBACK xml_reader_get_type( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return XML_NODE_UNSUPPORTED; - - // Execute - cef_xml_node_type_t _retval = CefXmlReaderCppToC::Get(self)->GetType(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK xml_reader_get_depth(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefXmlReaderCppToC::Get(self)->GetDepth(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_local_name( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetLocalName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_prefix( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetPrefix(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_qualified_name( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetQualifiedName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_namespace_uri( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetNamespaceURI(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_base_uri( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetBaseURI(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_xml_lang( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetXmlLang(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK xml_reader_is_empty_element(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->IsEmptyElement(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_has_value(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->HasValue(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_value( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetValue(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK xml_reader_has_attributes(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->HasAttributes(); - - // Return type: bool - return _retval; -} - -size_t CEF_CALLBACK xml_reader_get_attribute_count( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - size_t _retval = CefXmlReaderCppToC::Get(self)->GetAttributeCount(); - - // Return type: simple - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_byindex( - struct _cef_xml_reader_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute( - index); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_byqname( - struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: qualifiedName; type: string_byref_const - DCHECK(qualifiedName); - if (!qualifiedName) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute( - CefString(qualifiedName)); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_bylname( - struct _cef_xml_reader_t* self, const cef_string_t* localName, - const cef_string_t* namespaceURI) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - // Verify param: localName; type: string_byref_const - DCHECK(localName); - if (!localName) - return NULL; - // Verify param: namespaceURI; type: string_byref_const - DCHECK(namespaceURI); - if (!namespaceURI) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute( - CefString(localName), - CefString(namespaceURI)); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_inner_xml( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetInnerXml(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -cef_string_userfree_t CEF_CALLBACK xml_reader_get_outer_xml( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefXmlReaderCppToC::Get(self)->GetOuterXml(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int CEF_CALLBACK xml_reader_get_line_number(struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int _retval = CefXmlReaderCppToC::Get(self)->GetLineNumber(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK xml_reader_move_to_attribute_byindex( - struct _cef_xml_reader_t* self, int index) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute( - index); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_move_to_attribute_byqname( - struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: qualifiedName; type: string_byref_const - DCHECK(qualifiedName); - if (!qualifiedName) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute( - CefString(qualifiedName)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_move_to_attribute_bylname( - struct _cef_xml_reader_t* self, const cef_string_t* localName, - const cef_string_t* namespaceURI) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: localName; type: string_byref_const - DCHECK(localName); - if (!localName) - return 0; - // Verify param: namespaceURI; type: string_byref_const - DCHECK(namespaceURI); - if (!namespaceURI) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute( - CefString(localName), - CefString(namespaceURI)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_move_to_first_attribute( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToFirstAttribute(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_move_to_next_attribute( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToNextAttribute(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK xml_reader_move_to_carrying_element( - struct _cef_xml_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefXmlReaderCppToC::Get(self)->MoveToCarryingElement(); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefXmlReaderCppToC::CefXmlReaderCppToC(CefXmlReader* cls) - : CefCppToC(cls) { - struct_.struct_.move_to_next_node = xml_reader_move_to_next_node; - struct_.struct_.close = xml_reader_close; - struct_.struct_.has_error = xml_reader_has_error; - struct_.struct_.get_error = xml_reader_get_error; - struct_.struct_.get_type = xml_reader_get_type; - struct_.struct_.get_depth = xml_reader_get_depth; - struct_.struct_.get_local_name = xml_reader_get_local_name; - struct_.struct_.get_prefix = xml_reader_get_prefix; - struct_.struct_.get_qualified_name = xml_reader_get_qualified_name; - struct_.struct_.get_namespace_uri = xml_reader_get_namespace_uri; - struct_.struct_.get_base_uri = xml_reader_get_base_uri; - struct_.struct_.get_xml_lang = xml_reader_get_xml_lang; - struct_.struct_.is_empty_element = xml_reader_is_empty_element; - struct_.struct_.has_value = xml_reader_has_value; - struct_.struct_.get_value = xml_reader_get_value; - struct_.struct_.has_attributes = xml_reader_has_attributes; - struct_.struct_.get_attribute_count = xml_reader_get_attribute_count; - struct_.struct_.get_attribute_byindex = xml_reader_get_attribute_byindex; - struct_.struct_.get_attribute_byqname = xml_reader_get_attribute_byqname; - struct_.struct_.get_attribute_bylname = xml_reader_get_attribute_bylname; - struct_.struct_.get_inner_xml = xml_reader_get_inner_xml; - struct_.struct_.get_outer_xml = xml_reader_get_outer_xml; - struct_.struct_.get_line_number = xml_reader_get_line_number; - struct_.struct_.move_to_attribute_byindex = - xml_reader_move_to_attribute_byindex; - struct_.struct_.move_to_attribute_byqname = - xml_reader_move_to_attribute_byqname; - struct_.struct_.move_to_attribute_bylname = - xml_reader_move_to_attribute_bylname; - struct_.struct_.move_to_first_attribute = xml_reader_move_to_first_attribute; - struct_.struct_.move_to_next_attribute = xml_reader_move_to_next_attribute; - struct_.struct_.move_to_carrying_element = - xml_reader_move_to_carrying_element; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h b/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h deleted file mode 100644 index 1674b2faf..000000000 --- a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_xml_reader.h" -#include "include/capi/cef_xml_reader_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefXmlReaderCppToC - : public CefCppToC { - public: - explicit CefXmlReaderCppToC(CefXmlReader* cls); - virtual ~CefXmlReaderCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ - diff --git a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc b/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc deleted file mode 100644 index 57335e96f..000000000 --- a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/stream_reader_cpptoc.h" -#include "libcef_dll/cpptoc/zip_reader_cpptoc.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT cef_zip_reader_t* cef_zip_reader_create( - cef_stream_reader_t* stream) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: stream; type: refptr_same - DCHECK(stream); - if (!stream) - return NULL; - - // Execute - CefRefPtr _retval = CefZipReader::Create( - CefStreamReaderCppToC::Unwrap(stream)); - - // Return type: refptr_same - return CefZipReaderCppToC::Wrap(_retval); -} - - -// MEMBER FUNCTIONS - Body may be edited by hand. - -int CEF_CALLBACK zip_reader_move_to_first_file(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->MoveToFirstFile(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK zip_reader_move_to_next_file(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->MoveToNextFile(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK zip_reader_move_to_file(struct _cef_zip_reader_t* self, - const cef_string_t* fileName, int caseSensitive) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: fileName; type: string_byref_const - DCHECK(fileName); - if (!fileName) - return 0; - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->MoveToFile( - CefString(fileName), - caseSensitive?true:false); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK zip_reader_close(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->Close(); - - // Return type: bool - return _retval; -} - -cef_string_userfree_t CEF_CALLBACK zip_reader_get_file_name( - struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return NULL; - - // Execute - CefString _retval = CefZipReaderCppToC::Get(self)->GetFileName(); - - // Return type: string - return _retval.DetachToUserFree(); -} - -int64 CEF_CALLBACK zip_reader_get_file_size(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefZipReaderCppToC::Get(self)->GetFileSize(); - - // Return type: simple - return _retval; -} - -time_t CEF_CALLBACK zip_reader_get_file_last_modified( - struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - time_t _retval = CefZipReaderCppToC::Get(self)->GetFileLastModified(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK zip_reader_open_file(struct _cef_zip_reader_t* self, - const cef_string_t* password) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Unverified params: password - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->OpenFile( - CefString(password)); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK zip_reader_close_file(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->CloseFile(); - - // Return type: bool - return _retval; -} - -int CEF_CALLBACK zip_reader_read_file(struct _cef_zip_reader_t* self, - void* buffer, size_t bufferSize) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return 0; - - // Execute - int _retval = CefZipReaderCppToC::Get(self)->ReadFile( - buffer, - bufferSize); - - // Return type: simple - return _retval; -} - -int64 CEF_CALLBACK zip_reader_tell(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - int64 _retval = CefZipReaderCppToC::Get(self)->Tell(); - - // Return type: simple - return _retval; -} - -int CEF_CALLBACK zip_reader_eof(struct _cef_zip_reader_t* self) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefZipReaderCppToC::Get(self)->Eof(); - - // Return type: bool - return _retval; -} - - -// CONSTRUCTOR - Do not edit by hand. - -CefZipReaderCppToC::CefZipReaderCppToC(CefZipReader* cls) - : CefCppToC(cls) { - struct_.struct_.move_to_first_file = zip_reader_move_to_first_file; - struct_.struct_.move_to_next_file = zip_reader_move_to_next_file; - struct_.struct_.move_to_file = zip_reader_move_to_file; - struct_.struct_.close = zip_reader_close; - struct_.struct_.get_file_name = zip_reader_get_file_name; - struct_.struct_.get_file_size = zip_reader_get_file_size; - struct_.struct_.get_file_last_modified = zip_reader_get_file_last_modified; - struct_.struct_.open_file = zip_reader_open_file; - struct_.struct_.close_file = zip_reader_close_file; - struct_.struct_.read_file = zip_reader_read_file; - struct_.struct_.tell = zip_reader_tell; - struct_.struct_.eof = zip_reader_eof; -} - -#ifndef NDEBUG -template<> long CefCppToC::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h b/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h deleted file mode 100644 index 2bfbbada8..000000000 --- a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ -#define CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_zip_reader.h" -#include "include/capi/cef_zip_reader_capi.h" -#include "libcef_dll/cpptoc/cpptoc.h" - -// Wrap a C++ class with a C structure. -// This class may be instantiated and accessed DLL-side only. -class CefZipReaderCppToC - : public CefCppToC { - public: - explicit CefZipReaderCppToC(CefZipReader* cls); - virtual ~CefZipReaderCppToC() {} -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ - diff --git a/cef/libcef_dll/ctocpp/app_ctocpp.cc b/cef/libcef_dll/ctocpp/app_ctocpp.cc deleted file mode 100644 index 0b3ea5405..000000000 --- a/cef/libcef_dll/ctocpp/app_ctocpp.cc +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/command_line_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_registrar_cpptoc.h" -#include "libcef_dll/ctocpp/app_ctocpp.h" -#include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h" -#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h" -#include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefAppCToCpp::OnBeforeCommandLineProcessing(const CefString& process_type, - CefRefPtr command_line) { - if (CEF_MEMBER_MISSING(struct_, on_before_command_line_processing)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: command_line; type: refptr_diff - DCHECK(command_line.get()); - if (!command_line.get()) - return; - // Unverified params: process_type - - // Execute - struct_->on_before_command_line_processing(struct_, - process_type.GetStruct(), - CefCommandLineCppToC::Wrap(command_line)); -} - -void CefAppCToCpp::OnRegisterCustomSchemes( - CefRefPtr registrar) { - if (CEF_MEMBER_MISSING(struct_, on_register_custom_schemes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: registrar; type: refptr_diff - DCHECK(registrar.get()); - if (!registrar.get()) - return; - - // Execute - struct_->on_register_custom_schemes(struct_, - CefSchemeRegistrarCppToC::Wrap(registrar)); -} - -CefRefPtr CefAppCToCpp::GetResourceBundleHandler() { - if (CEF_MEMBER_MISSING(struct_, get_resource_bundle_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_resource_bundle_handler_t* _retval = struct_->get_resource_bundle_handler( - struct_); - - // Return type: refptr_same - return CefResourceBundleHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefAppCToCpp::GetBrowserProcessHandler() { - if (CEF_MEMBER_MISSING(struct_, get_browser_process_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_process_handler_t* _retval = struct_->get_browser_process_handler( - struct_); - - // Return type: refptr_same - return CefBrowserProcessHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefAppCToCpp::GetRenderProcessHandler() { - if (CEF_MEMBER_MISSING(struct_, get_render_process_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_render_process_handler_t* _retval = struct_->get_render_process_handler( - struct_); - - // Return type: refptr_same - return CefRenderProcessHandlerCToCpp::Wrap(_retval); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/app_ctocpp.h b/cef/libcef_dll/ctocpp/app_ctocpp.h deleted file mode 100644 index 8707addca..000000000 --- a/cef/libcef_dll/ctocpp/app_ctocpp.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_app.h" -#include "include/capi/cef_app_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefAppCToCpp - : public CefCToCpp { - public: - explicit CefAppCToCpp(cef_app_t* str) - : CefCToCpp(str) {} - virtual ~CefAppCToCpp() {} - - // CefApp methods - virtual void OnBeforeCommandLineProcessing(const CefString& process_type, - CefRefPtr command_line) OVERRIDE; - virtual void OnRegisterCustomSchemes( - CefRefPtr registrar) OVERRIDE; - virtual CefRefPtr GetResourceBundleHandler( - ) OVERRIDE; - virtual CefRefPtr GetBrowserProcessHandler( - ) OVERRIDE; - virtual CefRefPtr GetRenderProcessHandler() OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc deleted file mode 100644 index 736f2ca3d..000000000 --- a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc +++ /dev/null @@ -1,55 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefAuthCallbackCToCpp::Continue(const CefString& username, - const CefString& password) { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: username; type: string_byref_const - DCHECK(!username.empty()); - if (username.empty()) - return; - // Verify param: password; type: string_byref_const - DCHECK(!password.empty()); - if (password.empty()) - return; - - // Execute - struct_->cont(struct_, - username.GetStruct(), - password.GetStruct()); -} - -void CefAuthCallbackCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h deleted file mode 100644 index 08ae159c9..000000000 --- a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h +++ /dev/null @@ -1,44 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefAuthCallbackCToCpp - : public CefCToCpp { - public: - explicit CefAuthCallbackCToCpp(cef_auth_callback_t* str) - : CefCToCpp( - str) {} - virtual ~CefAuthCallbackCToCpp() {} - - // CefAuthCallback methods - virtual void Continue(const CefString& username, - const CefString& password) OVERRIDE; - virtual void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/base_ctocpp.h b/cef/libcef_dll/ctocpp/base_ctocpp.h deleted file mode 100644 index 650c08e33..000000000 --- a/cef/libcef_dll/ctocpp/base_ctocpp.h +++ /dev/null @@ -1,98 +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. - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/cef_logging.h" - - -// CefCToCpp implementation for CefBase. -class CefBaseCToCpp : public CefBase { - public: - // Use this method to create a wrapper class instance for a structure - // received from the other side. - static CefRefPtr Wrap(cef_base_t* s) { - if (!s) - return NULL; - - // Wrap their structure with the CefCToCpp object. - CefBaseCToCpp* wrapper = new CefBaseCToCpp(s); - // Put the wrapper object in a smart pointer. - CefRefPtr wrapperPtr(wrapper); - // Release the reference that was added to the CefCppToC wrapper object on - // the other side before their structure was passed to us. - wrapper->UnderlyingRelease(); - // Return the smart pointer. - return wrapperPtr; - } - - // Use this method to retrieve the underlying structure from a wrapper class - // instance for return back to the other side. - static cef_base_t* Unwrap(CefRefPtr c) { - if (!c.get()) - return NULL; - - // Cast the object to our wrapper class type. - CefBaseCToCpp* wrapper = static_cast(c.get()); - // Add a reference to the CefCppToC wrapper object on the other side that - // will be released once the structure is received. - wrapper->UnderlyingAddRef(); - // Return their original structure. - return wrapper->GetStruct(); - } - - explicit CefBaseCToCpp(cef_base_t* str) - : struct_(str) { - DCHECK(str); - } - virtual ~CefBaseCToCpp() {} - - // If returning the structure across the DLL boundary you should call - // UnderlyingAddRef() on this wrapping CefCToCpp object. On the other side of - // the DLL boundary, call Release() on the CefCppToC object. - cef_base_t* GetStruct() { return struct_; } - - // CefBase methods increment/decrement reference counts on both this object - // and the underlying wrapped structure. - int AddRef() { - UnderlyingAddRef(); - return refct_.AddRef(); - } - int Release() { - UnderlyingRelease(); - int retval = refct_.Release(); - if (retval == 0) - delete this; - return retval; - } - int GetRefCt() { return refct_.GetRefCt(); } - - // Increment/decrement reference counts on only the underlying class. - int UnderlyingAddRef() { - if (!struct_->add_ref) - return 0; - return struct_->add_ref(struct_); - } - int UnderlyingRelease() { - if (!struct_->release) - return 0; - return struct_->release(struct_); - } - int UnderlyingGetRefCt() { - if (!struct_->get_refct) - return 0; - return struct_->get_refct(struct_); - } - - protected: - CefRefCount refct_; - cef_base_t* struct_; -}; - - -#endif // CEF_LIBCEF_DLL_CTOCPP_BASE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc deleted file mode 100644 index 157debb03..000000000 --- a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc +++ /dev/null @@ -1,39 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefBeforeDownloadCallbackCToCpp::Continue(const CefString& download_path, - bool show_dialog) { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: download_path - - // Execute - struct_->cont(struct_, - download_path.GetStruct(), - show_dialog); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = - 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h deleted file mode 100644 index 4d7944d3e..000000000 --- a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h +++ /dev/null @@ -1,43 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBeforeDownloadCallbackCToCpp - : public CefCToCpp { - public: - explicit CefBeforeDownloadCallbackCToCpp(cef_before_download_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefBeforeDownloadCallbackCToCpp() {} - - // CefBeforeDownloadCallback methods - virtual void Continue(const CefString& download_path, - bool show_dialog) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc b/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc deleted file mode 100644 index e9ad6d39f..000000000 --- a/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc +++ /dev/null @@ -1,118 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefBinaryValue::Create(const void* data, - size_t data_size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return NULL; - - // Execute - cef_binary_value_t* _retval = cef_binary_value_create( - data, - data_size); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefBinaryValueCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefBinaryValueCToCpp::IsOwned() { - if (CEF_MEMBER_MISSING(struct_, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_owned(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefBinaryValueCToCpp::Copy() { - if (CEF_MEMBER_MISSING(struct_, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_binary_value_t* _retval = struct_->copy(struct_); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -size_t CefBinaryValueCToCpp::GetSize() { - if (CEF_MEMBER_MISSING(struct_, get_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_size(struct_); - - // Return type: simple - return _retval; -} - -size_t CefBinaryValueCToCpp::GetData(void* buffer, size_t buffer_size, - size_t data_offset) { - if (CEF_MEMBER_MISSING(struct_, get_data)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return 0; - - // Execute - size_t _retval = struct_->get_data(struct_, - buffer, - buffer_size, - data_offset); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/binary_value_ctocpp.h b/cef/libcef_dll/ctocpp/binary_value_ctocpp.h deleted file mode 100644 index 6eb440767..000000000 --- a/cef/libcef_dll/ctocpp/binary_value_ctocpp.h +++ /dev/null @@ -1,47 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBinaryValueCToCpp - : public CefCToCpp { - public: - explicit CefBinaryValueCToCpp(cef_binary_value_t* str) - : CefCToCpp( - str) {} - virtual ~CefBinaryValueCToCpp() {} - - // CefBinaryValue methods - virtual bool IsValid() OVERRIDE; - virtual bool IsOwned() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual size_t GetSize() OVERRIDE; - virtual size_t GetData(void* buffer, size_t buffer_size, - size_t data_offset) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/browser_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_ctocpp.cc deleted file mode 100644 index 4b99d471b..000000000 --- a/cef/libcef_dll/ctocpp/browser_ctocpp.cc +++ /dev/null @@ -1,342 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefBrowserCToCpp::GetHost() { - if (CEF_MEMBER_MISSING(struct_, get_host)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_host_t* _retval = struct_->get_host(struct_); - - // Return type: refptr_same - return CefBrowserHostCToCpp::Wrap(_retval); -} - -bool CefBrowserCToCpp::CanGoBack() { - if (CEF_MEMBER_MISSING(struct_, can_go_back)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->can_go_back(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserCToCpp::GoBack() { - if (CEF_MEMBER_MISSING(struct_, go_back)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->go_back(struct_); -} - -bool CefBrowserCToCpp::CanGoForward() { - if (CEF_MEMBER_MISSING(struct_, can_go_forward)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->can_go_forward(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserCToCpp::GoForward() { - if (CEF_MEMBER_MISSING(struct_, go_forward)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->go_forward(struct_); -} - -bool CefBrowserCToCpp::IsLoading() { - if (CEF_MEMBER_MISSING(struct_, is_loading)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_loading(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserCToCpp::Reload() { - if (CEF_MEMBER_MISSING(struct_, reload)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->reload(struct_); -} - -void CefBrowserCToCpp::ReloadIgnoreCache() { - if (CEF_MEMBER_MISSING(struct_, reload_ignore_cache)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->reload_ignore_cache(struct_); -} - -void CefBrowserCToCpp::StopLoad() { - if (CEF_MEMBER_MISSING(struct_, stop_load)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->stop_load(struct_); -} - -int CefBrowserCToCpp::GetIdentifier() { - if (CEF_MEMBER_MISSING(struct_, get_identifier)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_identifier(struct_); - - // Return type: simple - return _retval; -} - -bool CefBrowserCToCpp::IsSame(CefRefPtr that) { - if (CEF_MEMBER_MISSING(struct_, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = struct_->is_same(struct_, - CefBrowserCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefBrowserCToCpp::IsPopup() { - if (CEF_MEMBER_MISSING(struct_, is_popup)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_popup(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefBrowserCToCpp::HasDocument() { - if (CEF_MEMBER_MISSING(struct_, has_document)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_document(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefBrowserCToCpp::GetMainFrame() { - if (CEF_MEMBER_MISSING(struct_, get_main_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = struct_->get_main_frame(struct_); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefBrowserCToCpp::GetFocusedFrame() { - if (CEF_MEMBER_MISSING(struct_, get_focused_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = struct_->get_focused_frame(struct_); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefBrowserCToCpp::GetFrame(int64 identifier) { - if (CEF_MEMBER_MISSING(struct_, get_frame_byident)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = struct_->get_frame_byident(struct_, - identifier); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefBrowserCToCpp::GetFrame(const CefString& name) { - if (CEF_MEMBER_MISSING(struct_, get_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - - // Execute - cef_frame_t* _retval = struct_->get_frame(struct_, - name.GetStruct()); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -size_t CefBrowserCToCpp::GetFrameCount() { - if (CEF_MEMBER_MISSING(struct_, get_frame_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_frame_count(struct_); - - // Return type: simple - return _retval; -} - -void CefBrowserCToCpp::GetFrameIdentifiers(std::vector& identifiers) { - if (CEF_MEMBER_MISSING(struct_, get_frame_identifiers)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: identifiers; type: simple_vec_byref - size_t identifiersSize = identifiers.size(); - size_t identifiersCount = std::max(GetFrameCount(), identifiersSize); - int64* identifiersList = NULL; - if (identifiersCount > 0) { - identifiersList = new int64[identifiersCount]; - DCHECK(identifiersList); - if (identifiersList) { - memset(identifiersList, 0, sizeof(int64)*identifiersCount); - } - if (identifiersList && identifiersSize > 0) { - for (size_t i = 0; i < identifiersSize; ++i) { - identifiersList[i] = identifiers[i]; - } - } - } - - // Execute - struct_->get_frame_identifiers(struct_, - &identifiersCount, - identifiersList); - - // Restore param:identifiers; type: simple_vec_byref - identifiers.clear(); - if (identifiersCount > 0 && identifiersList) { - for (size_t i = 0; i < identifiersCount; ++i) { - identifiers.push_back(identifiersList[i]); - } - delete [] identifiersList; - } -} - -void CefBrowserCToCpp::GetFrameNames(std::vector& names) { - if (CEF_MEMBER_MISSING(struct_, get_frame_names)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: names; type: string_vec_byref - cef_string_list_t namesList = cef_string_list_alloc(); - DCHECK(namesList); - if (namesList) - transfer_string_list_contents(names, namesList); - - // Execute - struct_->get_frame_names(struct_, - namesList); - - // Restore param:names; type: string_vec_byref - if (namesList) { - names.clear(); - transfer_string_list_contents(namesList, names); - cef_string_list_free(namesList); - } -} - -bool CefBrowserCToCpp::SendProcessMessage(CefProcessId target_process, - CefRefPtr message) { - if (CEF_MEMBER_MISSING(struct_, send_process_message)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: message; type: refptr_same - DCHECK(message.get()); - if (!message.get()) - return false; - - // Execute - int _retval = struct_->send_process_message(struct_, - target_process, - CefProcessMessageCToCpp::Unwrap(message)); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/browser_ctocpp.h b/cef/libcef_dll/ctocpp/browser_ctocpp.h deleted file mode 100644 index c836e74db..000000000 --- a/cef/libcef_dll/ctocpp/browser_ctocpp.h +++ /dev/null @@ -1,64 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBrowserCToCpp - : public CefCToCpp { - public: - explicit CefBrowserCToCpp(cef_browser_t* str) - : CefCToCpp(str) {} - virtual ~CefBrowserCToCpp() {} - - // CefBrowser methods - virtual CefRefPtr GetHost() OVERRIDE; - virtual bool CanGoBack() OVERRIDE; - virtual void GoBack() OVERRIDE; - virtual bool CanGoForward() OVERRIDE; - virtual void GoForward() OVERRIDE; - virtual bool IsLoading() OVERRIDE; - virtual void Reload() OVERRIDE; - virtual void ReloadIgnoreCache() OVERRIDE; - virtual void StopLoad() OVERRIDE; - virtual int GetIdentifier() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool IsPopup() OVERRIDE; - virtual bool HasDocument() OVERRIDE; - virtual CefRefPtr GetMainFrame() OVERRIDE; - virtual CefRefPtr GetFocusedFrame() OVERRIDE; - virtual CefRefPtr GetFrame(int64 identifier) OVERRIDE; - virtual CefRefPtr GetFrame(const CefString& name) OVERRIDE; - virtual size_t GetFrameCount() OVERRIDE; - virtual void GetFrameIdentifiers(std::vector& identifiers) OVERRIDE; - virtual void GetFrameNames(std::vector& names) OVERRIDE; - virtual bool SendProcessMessage(CefProcessId target_process, - CefRefPtr message) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc deleted file mode 100644 index 63f1849a1..000000000 --- a/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc +++ /dev/null @@ -1,333 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/client_cpptoc.h" -#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo, - CefRefPtr client, const CefString& url, - const CefBrowserSettings& settings) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: client, url - - // Execute - int _retval = cef_browser_host_create_browser( - &windowInfo, - CefClientCppToC::Wrap(client), - url.GetStruct(), - &settings); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefBrowserHost::CreateBrowserSync( - const CefWindowInfo& windowInfo, CefRefPtr client, - const CefString& url, const CefBrowserSettings& settings) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: client, url - - // Execute - cef_browser_t* _retval = cef_browser_host_create_browser_sync( - &windowInfo, - CefClientCppToC::Wrap(client), - url.GetStruct(), - &settings); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefBrowserHostCToCpp::GetBrowser() { - if (CEF_MEMBER_MISSING(struct_, get_browser)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_t* _retval = struct_->get_browser(struct_); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - -void CefBrowserHostCToCpp::ParentWindowWillClose() { - if (CEF_MEMBER_MISSING(struct_, parent_window_will_close)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->parent_window_will_close(struct_); -} - -void CefBrowserHostCToCpp::CloseBrowser() { - if (CEF_MEMBER_MISSING(struct_, close_browser)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->close_browser(struct_); -} - -void CefBrowserHostCToCpp::SetFocus(bool enable) { - if (CEF_MEMBER_MISSING(struct_, set_focus)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->set_focus(struct_, - enable); -} - -CefWindowHandle CefBrowserHostCToCpp::GetWindowHandle() { - if (CEF_MEMBER_MISSING(struct_, get_window_handle)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_window_handle_t _retval = struct_->get_window_handle(struct_); - - // Return type: simple - return _retval; -} - -CefWindowHandle CefBrowserHostCToCpp::GetOpenerWindowHandle() { - if (CEF_MEMBER_MISSING(struct_, get_opener_window_handle)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_window_handle_t _retval = struct_->get_opener_window_handle(struct_); - - // Return type: simple - return _retval; -} - -CefRefPtr CefBrowserHostCToCpp::GetClient() { - if (CEF_MEMBER_MISSING(struct_, get_client)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_client_t* _retval = struct_->get_client(struct_); - - // Return type: refptr_diff - return CefClientCppToC::Unwrap(_retval); -} - -CefString CefBrowserHostCToCpp::GetDevToolsURL(bool http_scheme) { - if (CEF_MEMBER_MISSING(struct_, get_dev_tools_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_dev_tools_url(struct_, - http_scheme); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -double CefBrowserHostCToCpp::GetZoomLevel() { - if (CEF_MEMBER_MISSING(struct_, get_zoom_level)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - double _retval = struct_->get_zoom_level(struct_); - - // Return type: simple - return _retval; -} - -void CefBrowserHostCToCpp::SetZoomLevel(double zoomLevel) { - if (CEF_MEMBER_MISSING(struct_, set_zoom_level)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->set_zoom_level(struct_, - zoomLevel); -} - -void CefBrowserHostCToCpp::RunFileDialog(FileDialogMode mode, - const CefString& title, const CefString& default_file_name, - const std::vector& accept_types, - CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, run_file_dialog)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - // Unverified params: title, default_file_name, accept_types - - // Translate param: accept_types; type: string_vec_byref_const - cef_string_list_t accept_typesList = cef_string_list_alloc(); - DCHECK(accept_typesList); - if (accept_typesList) - transfer_string_list_contents(accept_types, accept_typesList); - - // Execute - struct_->run_file_dialog(struct_, - mode, - title.GetStruct(), - default_file_name.GetStruct(), - accept_typesList, - CefRunFileDialogCallbackCppToC::Wrap(callback)); - - // Restore param:accept_types; type: string_vec_byref_const - if (accept_typesList) - cef_string_list_free(accept_typesList); -} - -bool CefBrowserHostCToCpp::IsWindowRenderingDisabled() { - if (CEF_MEMBER_MISSING(struct_, is_window_rendering_disabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_window_rendering_disabled(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefBrowserHostCToCpp::WasResized() { - if (CEF_MEMBER_MISSING(struct_, was_resized)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->was_resized(struct_); -} - -void CefBrowserHostCToCpp::Invalidate(const CefRect& dirtyRect, - PaintElementType type) { - if (CEF_MEMBER_MISSING(struct_, invalidate)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->invalidate(struct_, - &dirtyRect, - type); -} - -void CefBrowserHostCToCpp::SendKeyEvent(const CefKeyEvent& event) { - if (CEF_MEMBER_MISSING(struct_, send_key_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->send_key_event(struct_, - &event); -} - -void CefBrowserHostCToCpp::SendMouseClickEvent(const CefMouseEvent& event, - MouseButtonType type, bool mouseUp, int clickCount) { - if (CEF_MEMBER_MISSING(struct_, send_mouse_click_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->send_mouse_click_event(struct_, - &event, - type, - mouseUp, - clickCount); -} - -void CefBrowserHostCToCpp::SendMouseMoveEvent(const CefMouseEvent& event, - bool mouseLeave) { - if (CEF_MEMBER_MISSING(struct_, send_mouse_move_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->send_mouse_move_event(struct_, - &event, - mouseLeave); -} - -void CefBrowserHostCToCpp::SendMouseWheelEvent(const CefMouseEvent& event, - int deltaX, int deltaY) { - if (CEF_MEMBER_MISSING(struct_, send_mouse_wheel_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->send_mouse_wheel_event(struct_, - &event, - deltaX, - deltaY); -} - -void CefBrowserHostCToCpp::SendFocusEvent(bool setFocus) { - if (CEF_MEMBER_MISSING(struct_, send_focus_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->send_focus_event(struct_, - setFocus); -} - -void CefBrowserHostCToCpp::SendCaptureLostEvent() { - if (CEF_MEMBER_MISSING(struct_, send_capture_lost_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->send_capture_lost_event(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/browser_host_ctocpp.h b/cef/libcef_dll/ctocpp/browser_host_ctocpp.h deleted file mode 100644 index 2b0c9cb85..000000000 --- a/cef/libcef_dll/ctocpp/browser_host_ctocpp.h +++ /dev/null @@ -1,71 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefBrowserHostCToCpp - : public CefCToCpp { - public: - explicit CefBrowserHostCToCpp(cef_browser_host_t* str) - : CefCToCpp( - str) {} - virtual ~CefBrowserHostCToCpp() {} - - // CefBrowserHost methods - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual void ParentWindowWillClose() OVERRIDE; - virtual void CloseBrowser() OVERRIDE; - virtual void SetFocus(bool enable) OVERRIDE; - virtual CefWindowHandle GetWindowHandle() OVERRIDE; - virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE; - virtual CefRefPtr GetClient() OVERRIDE; - virtual CefString GetDevToolsURL(bool http_scheme) OVERRIDE; - virtual double GetZoomLevel() OVERRIDE; - virtual void SetZoomLevel(double zoomLevel) OVERRIDE; - virtual void RunFileDialog(FileDialogMode mode, const CefString& title, - const CefString& default_file_name, - const std::vector& accept_types, - CefRefPtr callback) OVERRIDE; - virtual bool IsWindowRenderingDisabled() OVERRIDE; - virtual void WasResized() OVERRIDE; - virtual void Invalidate(const CefRect& dirtyRect, - PaintElementType type) OVERRIDE; - virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE; - virtual void SendMouseClickEvent(const CefMouseEvent& event, - MouseButtonType type, bool mouseUp, int clickCount) OVERRIDE; - virtual void SendMouseMoveEvent(const CefMouseEvent& event, - bool mouseLeave) OVERRIDE; - virtual void SendMouseWheelEvent(const CefMouseEvent& event, int deltaX, - int deltaY) OVERRIDE; - virtual void SendFocusEvent(bool setFocus) OVERRIDE; - virtual void SendCaptureLostEvent() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc deleted file mode 100644 index 4f51ae702..000000000 --- a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h" -#include "libcef_dll/ctocpp/proxy_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefBrowserProcessHandlerCToCpp::GetProxyHandler() { - if (CEF_MEMBER_MISSING(struct_, get_proxy_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_proxy_handler_t* _retval = struct_->get_proxy_handler(struct_); - - // Return type: refptr_same - return CefProxyHandlerCToCpp::Wrap(_retval); -} - -void CefBrowserProcessHandlerCToCpp::OnContextInitialized() { - if (CEF_MEMBER_MISSING(struct_, on_context_initialized)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->on_context_initialized(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h b/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h deleted file mode 100644 index 25913aa3b..000000000 --- a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_PROCESS_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_PROCESS_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_browser_process_handler.h" -#include "include/capi/cef_browser_process_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefBrowserProcessHandlerCToCpp - : public CefCToCpp { - public: - explicit CefBrowserProcessHandlerCToCpp(cef_browser_process_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefBrowserProcessHandlerCToCpp() {} - - // CefBrowserProcessHandler methods - virtual CefRefPtr GetProxyHandler() OVERRIDE; - virtual void OnContextInitialized() OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_PROCESS_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/callback_ctocpp.cc b/cef/libcef_dll/ctocpp/callback_ctocpp.cc deleted file mode 100644 index e6cd4799e..000000000 --- a/cef/libcef_dll/ctocpp/callback_ctocpp.cc +++ /dev/null @@ -1,43 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefCallbackCToCpp::Continue() { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cont(struct_); -} - -void CefCallbackCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/callback_ctocpp.h b/cef/libcef_dll/ctocpp/callback_ctocpp.h deleted file mode 100644 index 9cbe99593..000000000 --- a/cef/libcef_dll/ctocpp/callback_ctocpp.h +++ /dev/null @@ -1,41 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_callback.h" -#include "include/capi/cef_callback_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefCallbackCToCpp - : public CefCToCpp { - public: - explicit CefCallbackCToCpp(cef_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefCallbackCToCpp() {} - - // CefCallback methods - virtual void Continue() OVERRIDE; - virtual void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/client_ctocpp.cc b/cef/libcef_dll/ctocpp/client_ctocpp.cc deleted file mode 100644 index 2d3b7a60c..000000000 --- a/cef/libcef_dll/ctocpp/client_ctocpp.cc +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/process_message_cpptoc.h" -#include "libcef_dll/ctocpp/client_ctocpp.h" -#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" -#include "libcef_dll/ctocpp/display_handler_ctocpp.h" -#include "libcef_dll/ctocpp/download_handler_ctocpp.h" -#include "libcef_dll/ctocpp/focus_handler_ctocpp.h" -#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h" -#include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h" -#include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h" -#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h" -#include "libcef_dll/ctocpp/load_handler_ctocpp.h" -#include "libcef_dll/ctocpp/request_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefClientCToCpp::GetContextMenuHandler() { - if (CEF_MEMBER_MISSING(struct_, get_context_menu_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_handler_t* _retval = struct_->get_context_menu_handler( - struct_); - - // Return type: refptr_same - return CefContextMenuHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetDisplayHandler() { - if (CEF_MEMBER_MISSING(struct_, get_display_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_display_handler_t* _retval = struct_->get_display_handler(struct_); - - // Return type: refptr_same - return CefDisplayHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetDownloadHandler() { - if (CEF_MEMBER_MISSING(struct_, get_download_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_download_handler_t* _retval = struct_->get_download_handler(struct_); - - // Return type: refptr_same - return CefDownloadHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetFocusHandler() { - if (CEF_MEMBER_MISSING(struct_, get_focus_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_focus_handler_t* _retval = struct_->get_focus_handler(struct_); - - // Return type: refptr_same - return CefFocusHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetGeolocationHandler() { - if (CEF_MEMBER_MISSING(struct_, get_geolocation_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_geolocation_handler_t* _retval = struct_->get_geolocation_handler( - struct_); - - // Return type: refptr_same - return CefGeolocationHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetJSDialogHandler() { - if (CEF_MEMBER_MISSING(struct_, get_jsdialog_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_jsdialog_handler_t* _retval = struct_->get_jsdialog_handler(struct_); - - // Return type: refptr_same - return CefJSDialogHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetKeyboardHandler() { - if (CEF_MEMBER_MISSING(struct_, get_keyboard_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_keyboard_handler_t* _retval = struct_->get_keyboard_handler(struct_); - - // Return type: refptr_same - return CefKeyboardHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetLifeSpanHandler() { - if (CEF_MEMBER_MISSING(struct_, get_life_span_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_life_span_handler_t* _retval = struct_->get_life_span_handler(struct_); - - // Return type: refptr_same - return CefLifeSpanHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetLoadHandler() { - if (CEF_MEMBER_MISSING(struct_, get_load_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_load_handler_t* _retval = struct_->get_load_handler(struct_); - - // Return type: refptr_same - return CefLoadHandlerCToCpp::Wrap(_retval); -} - -CefRefPtr CefClientCToCpp::GetRequestHandler() { - if (CEF_MEMBER_MISSING(struct_, get_request_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_handler_t* _retval = struct_->get_request_handler(struct_); - - // Return type: refptr_same - return CefRequestHandlerCToCpp::Wrap(_retval); -} - -bool CefClientCToCpp::OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, CefRefPtr message) { - if (CEF_MEMBER_MISSING(struct_, on_process_message_received)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: message; type: refptr_diff - DCHECK(message.get()); - if (!message.get()) - return false; - - // Execute - int _retval = struct_->on_process_message_received(struct_, - CefBrowserCppToC::Wrap(browser), - source_process, - CefProcessMessageCppToC::Wrap(message)); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/client_ctocpp.h b/cef/libcef_dll/ctocpp/client_ctocpp.h deleted file mode 100644 index c2cf17c8e..000000000 --- a/cef/libcef_dll/ctocpp/client_ctocpp.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefClientCToCpp - : public CefCToCpp { - public: - explicit CefClientCToCpp(cef_client_t* str) - : CefCToCpp(str) {} - virtual ~CefClientCToCpp() {} - - // CefClient methods - virtual CefRefPtr GetContextMenuHandler() OVERRIDE; - virtual CefRefPtr GetDisplayHandler() OVERRIDE; - virtual CefRefPtr GetDownloadHandler() OVERRIDE; - virtual CefRefPtr GetFocusHandler() OVERRIDE; - virtual CefRefPtr GetGeolocationHandler() OVERRIDE; - virtual CefRefPtr GetJSDialogHandler() OVERRIDE; - virtual CefRefPtr GetKeyboardHandler() OVERRIDE; - virtual CefRefPtr GetLifeSpanHandler() OVERRIDE; - virtual CefRefPtr GetLoadHandler() OVERRIDE; - virtual CefRefPtr GetRequestHandler() OVERRIDE; - virtual bool OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/command_line_ctocpp.cc b/cef/libcef_dll/ctocpp/command_line_ctocpp.cc deleted file mode 100644 index 8ab94a0cf..000000000 --- a/cef/libcef_dll/ctocpp/command_line_ctocpp.cc +++ /dev/null @@ -1,398 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "include/cef_version.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefCommandLine::CreateCommandLine() { - int build_revision = cef_build_revision(); - if (build_revision != CEF_REVISION) { - // The libcef build revision does not match the CEF API revision. - DCHECK(false); - return NULL; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_command_line_t* _retval = cef_command_line_create(); - - // Return type: refptr_same - return CefCommandLineCToCpp::Wrap(_retval); -} - -CefRefPtr CefCommandLine::GetGlobalCommandLine() { - int build_revision = cef_build_revision(); - if (build_revision != CEF_REVISION) { - // The libcef build revision does not match the CEF API revision. - DCHECK(false); - return NULL; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_command_line_t* _retval = cef_command_line_get_global(); - - // Return type: refptr_same - return CefCommandLineCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefCommandLineCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefCommandLineCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefCommandLineCToCpp::Copy() { - if (CEF_MEMBER_MISSING(struct_, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_command_line_t* _retval = struct_->copy(struct_); - - // Return type: refptr_same - return CefCommandLineCToCpp::Wrap(_retval); -} - -void CefCommandLineCToCpp::InitFromArgv(int argc, const char* const* argv) { - if (CEF_MEMBER_MISSING(struct_, init_from_argv)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: argv; type: simple_byaddr - DCHECK(argv); - if (!argv) - return; - - // Execute - struct_->init_from_argv(struct_, - argc, - argv); -} - -void CefCommandLineCToCpp::InitFromString(const CefString& command_line) { - if (CEF_MEMBER_MISSING(struct_, init_from_string)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: command_line; type: string_byref_const - DCHECK(!command_line.empty()); - if (command_line.empty()) - return; - - // Execute - struct_->init_from_string(struct_, - command_line.GetStruct()); -} - -void CefCommandLineCToCpp::Reset() { - if (CEF_MEMBER_MISSING(struct_, reset)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->reset(struct_); -} - -void CefCommandLineCToCpp::GetArgv(std::vector& argv) { - if (CEF_MEMBER_MISSING(struct_, get_argv)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: argv; type: string_vec_byref - cef_string_list_t argvList = cef_string_list_alloc(); - DCHECK(argvList); - if (argvList) - transfer_string_list_contents(argv, argvList); - - // Execute - struct_->get_argv(struct_, - argvList); - - // Restore param:argv; type: string_vec_byref - if (argvList) { - argv.clear(); - transfer_string_list_contents(argvList, argv); - cef_string_list_free(argvList); - } -} - -CefString CefCommandLineCToCpp::GetCommandLineString() { - if (CEF_MEMBER_MISSING(struct_, get_command_line_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_command_line_string(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefCommandLineCToCpp::GetProgram() { - if (CEF_MEMBER_MISSING(struct_, get_program)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_program(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefCommandLineCToCpp::SetProgram(const CefString& program) { - if (CEF_MEMBER_MISSING(struct_, set_program)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: program; type: string_byref_const - DCHECK(!program.empty()); - if (program.empty()) - return; - - // Execute - struct_->set_program(struct_, - program.GetStruct()); -} - -bool CefCommandLineCToCpp::HasSwitches() { - if (CEF_MEMBER_MISSING(struct_, has_switches)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_switches(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefCommandLineCToCpp::HasSwitch(const CefString& name) { - if (CEF_MEMBER_MISSING(struct_, has_switch)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - - // Execute - int _retval = struct_->has_switch(struct_, - name.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefCommandLineCToCpp::GetSwitchValue(const CefString& name) { - if (CEF_MEMBER_MISSING(struct_, get_switch_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_switch_value(struct_, - name.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefCommandLineCToCpp::GetSwitches(SwitchMap& switches) { - if (CEF_MEMBER_MISSING(struct_, get_switches)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: switches; type: string_map_single_byref - cef_string_map_t switchesMap = cef_string_map_alloc(); - DCHECK(switchesMap); - if (switchesMap) - transfer_string_map_contents(switches, switchesMap); - - // Execute - struct_->get_switches(struct_, - switchesMap); - - // Restore param:switches; type: string_map_single_byref - if (switchesMap) { - switches.clear(); - transfer_string_map_contents(switchesMap, switches); - cef_string_map_free(switchesMap); - } -} - -void CefCommandLineCToCpp::AppendSwitch(const CefString& name) { - if (CEF_MEMBER_MISSING(struct_, append_switch)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return; - - // Execute - struct_->append_switch(struct_, - name.GetStruct()); -} - -void CefCommandLineCToCpp::AppendSwitchWithValue(const CefString& name, - const CefString& value) { - if (CEF_MEMBER_MISSING(struct_, append_switch_with_value)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return; - // Verify param: value; type: string_byref_const - DCHECK(!value.empty()); - if (value.empty()) - return; - - // Execute - struct_->append_switch_with_value(struct_, - name.GetStruct(), - value.GetStruct()); -} - -bool CefCommandLineCToCpp::HasArguments() { - if (CEF_MEMBER_MISSING(struct_, has_arguments)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_arguments(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefCommandLineCToCpp::GetArguments(ArgumentList& arguments) { - if (CEF_MEMBER_MISSING(struct_, get_arguments)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: arguments; type: string_vec_byref - cef_string_list_t argumentsList = cef_string_list_alloc(); - DCHECK(argumentsList); - if (argumentsList) - transfer_string_list_contents(arguments, argumentsList); - - // Execute - struct_->get_arguments(struct_, - argumentsList); - - // Restore param:arguments; type: string_vec_byref - if (argumentsList) { - arguments.clear(); - transfer_string_list_contents(argumentsList, arguments); - cef_string_list_free(argumentsList); - } -} - -void CefCommandLineCToCpp::AppendArgument(const CefString& argument) { - if (CEF_MEMBER_MISSING(struct_, append_argument)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: argument; type: string_byref_const - DCHECK(!argument.empty()); - if (argument.empty()) - return; - - // Execute - struct_->append_argument(struct_, - argument.GetStruct()); -} - -void CefCommandLineCToCpp::PrependWrapper(const CefString& wrapper) { - if (CEF_MEMBER_MISSING(struct_, prepend_wrapper)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: wrapper; type: string_byref_const - DCHECK(!wrapper.empty()); - if (wrapper.empty()) - return; - - // Execute - struct_->prepend_wrapper(struct_, - wrapper.GetStruct()); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/command_line_ctocpp.h b/cef/libcef_dll/ctocpp/command_line_ctocpp.h deleted file mode 100644 index 723885683..000000000 --- a/cef/libcef_dll/ctocpp/command_line_ctocpp.h +++ /dev/null @@ -1,63 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_command_line.h" -#include "include/capi/cef_command_line_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefCommandLineCToCpp - : public CefCToCpp { - public: - explicit CefCommandLineCToCpp(cef_command_line_t* str) - : CefCToCpp( - str) {} - virtual ~CefCommandLineCToCpp() {} - - // CefCommandLine methods - virtual bool IsValid() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual void InitFromArgv(int argc, const char* const* argv) OVERRIDE; - virtual void InitFromString(const CefString& command_line) OVERRIDE; - virtual void Reset() OVERRIDE; - virtual void GetArgv(std::vector& argv) OVERRIDE; - virtual CefString GetCommandLineString() OVERRIDE; - virtual CefString GetProgram() OVERRIDE; - virtual void SetProgram(const CefString& program) OVERRIDE; - virtual bool HasSwitches() OVERRIDE; - virtual bool HasSwitch(const CefString& name) OVERRIDE; - virtual CefString GetSwitchValue(const CefString& name) OVERRIDE; - virtual void GetSwitches(SwitchMap& switches) OVERRIDE; - virtual void AppendSwitch(const CefString& name) OVERRIDE; - virtual void AppendSwitchWithValue(const CefString& name, - const CefString& value) OVERRIDE; - virtual bool HasArguments() OVERRIDE; - virtual void GetArguments(ArgumentList& arguments) OVERRIDE; - virtual void AppendArgument(const CefString& argument) OVERRIDE; - virtual void PrependWrapper(const CefString& wrapper) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc deleted file mode 100644 index e4bd6c3af..000000000 --- a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/context_menu_params_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/menu_model_cpptoc.h" -#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefContextMenuHandlerCToCpp::OnBeforeContextMenu( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr params, CefRefPtr model) { - if (CEF_MEMBER_MISSING(struct_, on_before_context_menu)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - // Verify param: params; type: refptr_diff - DCHECK(params.get()); - if (!params.get()) - return; - // Verify param: model; type: refptr_diff - DCHECK(model.get()); - if (!model.get()) - return; - - // Execute - struct_->on_before_context_menu(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefContextMenuParamsCppToC::Wrap(params), - CefMenuModelCppToC::Wrap(model)); -} - -bool CefContextMenuHandlerCToCpp::OnContextMenuCommand( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr params, int command_id, - EventFlags event_flags) { - if (CEF_MEMBER_MISSING(struct_, on_context_menu_command)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return false; - // Verify param: params; type: refptr_diff - DCHECK(params.get()); - if (!params.get()) - return false; - - // Execute - int _retval = struct_->on_context_menu_command(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefContextMenuParamsCppToC::Wrap(params), - command_id, - event_flags); - - // Return type: bool - return _retval?true:false; -} - -void CefContextMenuHandlerCToCpp::OnContextMenuDismissed( - CefRefPtr browser, CefRefPtr frame) { - if (CEF_MEMBER_MISSING(struct_, on_context_menu_dismissed)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - - // Execute - struct_->on_context_menu_dismissed(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h b/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h deleted file mode 100644 index a3f1b8a74..000000000 --- a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefContextMenuHandlerCToCpp - : public CefCToCpp { - public: - explicit CefContextMenuHandlerCToCpp(cef_context_menu_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefContextMenuHandlerCToCpp() {} - - // CefContextMenuHandler methods - virtual void OnBeforeContextMenu(CefRefPtr browser, - CefRefPtr frame, CefRefPtr params, - CefRefPtr model) OVERRIDE; - virtual bool OnContextMenuCommand(CefRefPtr browser, - CefRefPtr frame, CefRefPtr params, - int command_id, EventFlags event_flags) OVERRIDE; - virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc deleted file mode 100644 index 5fcbf3b47..000000000 --- a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc +++ /dev/null @@ -1,249 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -int CefContextMenuParamsCToCpp::GetXCoord() { - if (CEF_MEMBER_MISSING(struct_, get_xcoord)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_xcoord(struct_); - - // Return type: simple - return _retval; -} - -int CefContextMenuParamsCToCpp::GetYCoord() { - if (CEF_MEMBER_MISSING(struct_, get_ycoord)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_ycoord(struct_); - - // Return type: simple - return _retval; -} - -CefContextMenuParams::TypeFlags CefContextMenuParamsCToCpp::GetTypeFlags() { - if (CEF_MEMBER_MISSING(struct_, get_type_flags)) - return CM_TYPEFLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_type_flags_t _retval = struct_->get_type_flags(struct_); - - // Return type: simple - return _retval; -} - -CefString CefContextMenuParamsCToCpp::GetLinkUrl() { - if (CEF_MEMBER_MISSING(struct_, get_link_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_link_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetUnfilteredLinkUrl() { - if (CEF_MEMBER_MISSING(struct_, get_unfiltered_link_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_unfiltered_link_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetSourceUrl() { - if (CEF_MEMBER_MISSING(struct_, get_source_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_source_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefContextMenuParamsCToCpp::IsImageBlocked() { - if (CEF_MEMBER_MISSING(struct_, is_image_blocked)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_image_blocked(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefContextMenuParamsCToCpp::GetPageUrl() { - if (CEF_MEMBER_MISSING(struct_, get_page_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_page_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetFrameUrl() { - if (CEF_MEMBER_MISSING(struct_, get_frame_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_frame_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefContextMenuParamsCToCpp::GetFrameCharset() { - if (CEF_MEMBER_MISSING(struct_, get_frame_charset)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_frame_charset(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefContextMenuParams::MediaType CefContextMenuParamsCToCpp::GetMediaType() { - if (CEF_MEMBER_MISSING(struct_, get_media_type)) - return CM_MEDIATYPE_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_media_type_t _retval = struct_->get_media_type(struct_); - - // Return type: simple - return _retval; -} - -CefContextMenuParams::MediaStateFlags CefContextMenuParamsCToCpp::GetMediaStateFlags( - ) { - if (CEF_MEMBER_MISSING(struct_, get_media_state_flags)) - return CM_MEDIAFLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_media_state_flags_t _retval = struct_->get_media_state_flags( - struct_); - - // Return type: simple - return _retval; -} - -CefString CefContextMenuParamsCToCpp::GetSelectionText() { - if (CEF_MEMBER_MISSING(struct_, get_selection_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_selection_text(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefContextMenuParamsCToCpp::IsEditable() { - if (CEF_MEMBER_MISSING(struct_, is_editable)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_editable(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefContextMenuParamsCToCpp::IsSpeechInputEnabled() { - if (CEF_MEMBER_MISSING(struct_, is_speech_input_enabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_speech_input_enabled(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefContextMenuParams::EditStateFlags CefContextMenuParamsCToCpp::GetEditStateFlags( - ) { - if (CEF_MEMBER_MISSING(struct_, get_edit_state_flags)) - return CM_EDITFLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_context_menu_edit_state_flags_t _retval = struct_->get_edit_state_flags( - struct_); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h deleted file mode 100644 index bcbebc9b5..000000000 --- a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h +++ /dev/null @@ -1,57 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_context_menu_handler.h" -#include "include/capi/cef_context_menu_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefContextMenuParamsCToCpp - : public CefCToCpp { - public: - explicit CefContextMenuParamsCToCpp(cef_context_menu_params_t* str) - : CefCToCpp(str) {} - virtual ~CefContextMenuParamsCToCpp() {} - - // CefContextMenuParams methods - virtual int GetXCoord() OVERRIDE; - virtual int GetYCoord() OVERRIDE; - virtual TypeFlags GetTypeFlags() OVERRIDE; - virtual CefString GetLinkUrl() OVERRIDE; - virtual CefString GetUnfilteredLinkUrl() OVERRIDE; - virtual CefString GetSourceUrl() OVERRIDE; - virtual bool IsImageBlocked() OVERRIDE; - virtual CefString GetPageUrl() OVERRIDE; - virtual CefString GetFrameUrl() OVERRIDE; - virtual CefString GetFrameCharset() OVERRIDE; - virtual MediaType GetMediaType() OVERRIDE; - virtual MediaStateFlags GetMediaStateFlags() OVERRIDE; - virtual CefString GetSelectionText() OVERRIDE; - virtual bool IsEditable() OVERRIDE; - virtual bool IsSpeechInputEnabled() OVERRIDE; - virtual EditStateFlags GetEditStateFlags() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc deleted file mode 100644 index 4db768d76..000000000 --- a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc +++ /dev/null @@ -1,175 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" -#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefCookieManager::GetGlobalManager() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_cookie_manager_t* _retval = cef_cookie_manager_get_global_manager(); - - // Return type: refptr_same - return CefCookieManagerCToCpp::Wrap(_retval); -} - -CefRefPtr CefCookieManager::CreateManager( - const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: path - - // Execute - cef_cookie_manager_t* _retval = cef_cookie_manager_create_manager( - path.GetStruct()); - - // Return type: refptr_same - return CefCookieManagerCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefCookieManagerCToCpp::SetSupportedSchemes( - const std::vector& schemes) { - if (CEF_MEMBER_MISSING(struct_, set_supported_schemes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: schemes; type: string_vec_byref_const - cef_string_list_t schemesList = cef_string_list_alloc(); - DCHECK(schemesList); - if (schemesList) - transfer_string_list_contents(schemes, schemesList); - - // Execute - struct_->set_supported_schemes(struct_, - schemesList); - - // Restore param:schemes; type: string_vec_byref_const - if (schemesList) - cef_string_list_free(schemesList); -} - -bool CefCookieManagerCToCpp::VisitAllCookies( - CefRefPtr visitor) { - if (CEF_MEMBER_MISSING(struct_, visit_all_cookies)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return false; - - // Execute - int _retval = struct_->visit_all_cookies(struct_, - CefCookieVisitorCppToC::Wrap(visitor)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::VisitUrlCookies(const CefString& url, - bool includeHttpOnly, CefRefPtr visitor) { - if (CEF_MEMBER_MISSING(struct_, visit_url_cookies)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return false; - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return false; - - // Execute - int _retval = struct_->visit_url_cookies(struct_, - url.GetStruct(), - includeHttpOnly, - CefCookieVisitorCppToC::Wrap(visitor)); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::SetCookie(const CefString& url, - const CefCookie& cookie) { - if (CEF_MEMBER_MISSING(struct_, set_cookie)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return false; - - // Execute - int _retval = struct_->set_cookie(struct_, - url.GetStruct(), - &cookie); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::DeleteCookies(const CefString& url, - const CefString& cookie_name) { - if (CEF_MEMBER_MISSING(struct_, delete_cookies)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: url, cookie_name - - // Execute - int _retval = struct_->delete_cookies(struct_, - url.GetStruct(), - cookie_name.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefCookieManagerCToCpp::SetStoragePath(const CefString& path) { - if (CEF_MEMBER_MISSING(struct_, set_storage_path)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: path - - // Execute - int _retval = struct_->set_storage_path(struct_, - path.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h deleted file mode 100644 index 760021ba0..000000000 --- a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h +++ /dev/null @@ -1,52 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefCookieManagerCToCpp - : public CefCToCpp { - public: - explicit CefCookieManagerCToCpp(cef_cookie_manager_t* str) - : CefCToCpp(str) {} - virtual ~CefCookieManagerCToCpp() {} - - // CefCookieManager methods - virtual void SetSupportedSchemes( - const std::vector& schemes) OVERRIDE; - virtual bool VisitAllCookies(CefRefPtr visitor) OVERRIDE; - virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, - CefRefPtr visitor) OVERRIDE; - virtual bool SetCookie(const CefString& url, - const CefCookie& cookie) OVERRIDE; - virtual bool DeleteCookies(const CefString& url, - const CefString& cookie_name) OVERRIDE; - virtual bool SetStoragePath(const CefString& path) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc deleted file mode 100644 index e5d9e4072..000000000 --- a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefCookieVisitorCToCpp::Visit(const CefCookie& cookie, int count, - int total, bool& deleteCookie) { - if (CEF_MEMBER_MISSING(struct_, visit)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: deleteCookie; type: bool_byref - int deleteCookieInt = deleteCookie; - - // Execute - int _retval = struct_->visit(struct_, - &cookie, - count, - total, - &deleteCookieInt); - - // Restore param:deleteCookie; type: bool_byref - deleteCookie = deleteCookieInt?true:false; - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h deleted file mode 100644 index 41969281f..000000000 --- a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_cookie.h" -#include "include/capi/cef_cookie_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefCookieVisitorCToCpp - : public CefCToCpp { - public: - explicit CefCookieVisitorCToCpp(cef_cookie_visitor_t* str) - : CefCToCpp(str) {} - virtual ~CefCookieVisitorCToCpp() {} - - // CefCookieVisitor methods - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/ctocpp.h b/cef/libcef_dll/ctocpp/ctocpp.h deleted file mode 100644 index 3697647c4..000000000 --- a/cef/libcef_dll/ctocpp/ctocpp.h +++ /dev/null @@ -1,113 +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. - -#ifndef CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_ -#pragma once - -#include "include/cef_base.h" -#include "include/capi/cef_base_capi.h" -#include "libcef_dll/cef_logging.h" - - -// Wrap a C structure with a C++ class. This is used when the implementation -// exists on the other side of the DLL boundary but will have methods called on -// this side of the DLL boundary. -template -class CefCToCpp : public BaseName { - public: - // Use this method to create a wrapper class instance for a structure - // received from the other side. - static CefRefPtr Wrap(StructName* s) { - if (!s) - return NULL; - - // Wrap their structure with the CefCToCpp object. - ClassName* wrapper = new ClassName(s); - // Put the wrapper object in a smart pointer. - CefRefPtr wrapperPtr(wrapper); - // Release the reference that was added to the CefCppToC wrapper object on - // the other side before their structure was passed to us. - wrapper->UnderlyingRelease(); - // Return the smart pointer. - return wrapperPtr; - } - - // Use this method to retrieve the underlying structure from a wrapper class - // instance for return back to the other side. - static StructName* Unwrap(CefRefPtr c) { - if (!c.get()) - return NULL; - - // Cast the object to our wrapper class type. - ClassName* wrapper = static_cast(c.get()); - // Add a reference to the CefCppToC wrapper object on the other side that - // will be released once the structure is received. - wrapper->UnderlyingAddRef(); - // Return their original structure. - return wrapper->GetStruct(); - } - - explicit CefCToCpp(StructName* str) - : struct_(str) { - DCHECK(str); - -#ifndef NDEBUG - CefAtomicIncrement(&DebugObjCt); -#endif - } - virtual ~CefCToCpp() { -#ifndef NDEBUG - CefAtomicDecrement(&DebugObjCt); -#endif - } - - // If returning the structure across the DLL boundary you should call - // UnderlyingAddRef() on this wrapping CefCToCpp object. On the other side of - // the DLL boundary, call Release() on the CefCppToC object. - StructName* GetStruct() { return struct_; } - - // CefBase methods increment/decrement reference counts on both this object - // and the underlying wrapped structure. - int AddRef() { - UnderlyingAddRef(); - return refct_.AddRef(); - } - int Release() { - UnderlyingRelease(); - int retval = refct_.Release(); - if (retval == 0) - delete this; - return retval; - } - int GetRefCt() { return refct_.GetRefCt(); } - - // Increment/decrement reference counts on only the underlying class. - int UnderlyingAddRef() { - if (!struct_->base.add_ref) - return 0; - return struct_->base.add_ref(&struct_->base); - } - int UnderlyingRelease() { - if (!struct_->base.release) - return 0; - return struct_->base.release(&struct_->base); - } - int UnderlyingGetRefCt() { - if (!struct_->base.get_refct) - return 0; - return struct_->base.get_refct(&struct_->base); - } - -#ifndef NDEBUG - // Simple tracking of allocated objects. - static long DebugObjCt; // NOLINT(runtime/int) -#endif - - protected: - CefRefCount refct_; - StructName* struct_; -}; - -#endif // CEF_LIBCEF_DLL_CTOCPP_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc deleted file mode 100644 index efb99061c..000000000 --- a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc +++ /dev/null @@ -1,517 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefDictionaryValue::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dictionary_value_t* _retval = cef_dictionary_value_create(); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefDictionaryValueCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::IsOwned() { - if (CEF_MEMBER_MISSING(struct_, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_owned(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefDictionaryValueCToCpp::Copy( - bool exclude_empty_children) { - if (CEF_MEMBER_MISSING(struct_, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dictionary_value_t* _retval = struct_->copy(struct_, - exclude_empty_children); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -size_t CefDictionaryValueCToCpp::GetSize() { - if (CEF_MEMBER_MISSING(struct_, get_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_size(struct_); - - // Return type: simple - return _retval; -} - -bool CefDictionaryValueCToCpp::Clear() { - if (CEF_MEMBER_MISSING(struct_, clear)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->clear(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::HasKey(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, has_key)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->has_key(struct_, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::GetKeys(KeyList& keys) { - if (CEF_MEMBER_MISSING(struct_, get_keys)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: keys; type: string_vec_byref - cef_string_list_t keysList = cef_string_list_alloc(); - DCHECK(keysList); - if (keysList) - transfer_string_list_contents(keys, keysList); - - // Execute - int _retval = struct_->get_keys(struct_, - keysList); - - // Restore param:keys; type: string_vec_byref - if (keysList) { - keys.clear(); - transfer_string_list_contents(keysList, keys); - cef_string_list_free(keysList); - } - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::Remove(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, remove)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->remove(struct_, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefValueType CefDictionaryValueCToCpp::GetType(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return VTYPE_INVALID; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return VTYPE_INVALID; - - // Execute - cef_value_type_t _retval = struct_->get_type(struct_, - key.GetStruct()); - - // Return type: simple - return _retval; -} - -bool CefDictionaryValueCToCpp::GetBool(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->get_bool(struct_, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -int CefDictionaryValueCToCpp::GetInt(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_int)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return 0; - - // Execute - int _retval = struct_->get_int(struct_, - key.GetStruct()); - - // Return type: simple - return _retval; -} - -double CefDictionaryValueCToCpp::GetDouble(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_double)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return 0; - - // Execute - double _retval = struct_->get_double(struct_, - key.GetStruct()); - - // Return type: simple - return _retval; -} - -CefString CefDictionaryValueCToCpp::GetString(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_string(struct_, - key.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefDictionaryValueCToCpp::GetBinary( - const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_binary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_binary_value_t* _retval = struct_->get_binary(struct_, - key.GetStruct()); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefDictionaryValueCToCpp::GetDictionary( - const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_dictionary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_dictionary_value_t* _retval = struct_->get_dictionary(struct_, - key.GetStruct()); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefDictionaryValueCToCpp::GetList( - const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return NULL; - - // Execute - cef_list_value_t* _retval = struct_->get_list(struct_, - key.GetStruct()); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefDictionaryValueCToCpp::SetNull(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, set_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->set_null(struct_, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetBool(const CefString& key, bool value) { - if (CEF_MEMBER_MISSING(struct_, set_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->set_bool(struct_, - key.GetStruct(), - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetInt(const CefString& key, int value) { - if (CEF_MEMBER_MISSING(struct_, set_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->set_int(struct_, - key.GetStruct(), - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetDouble(const CefString& key, double value) { - if (CEF_MEMBER_MISSING(struct_, set_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - - // Execute - int _retval = struct_->set_double(struct_, - key.GetStruct(), - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetString(const CefString& key, - const CefString& value) { - if (CEF_MEMBER_MISSING(struct_, set_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Unverified params: value - - // Execute - int _retval = struct_->set_string(struct_, - key.GetStruct(), - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetBinary(const CefString& key, - CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_binary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_binary(struct_, - key.GetStruct(), - CefBinaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetDictionary(const CefString& key, - CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_dictionary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_dictionary(struct_, - key.GetStruct(), - CefDictionaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefDictionaryValueCToCpp::SetList(const CefString& key, - CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_list)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: key; type: string_byref_const - DCHECK(!key.empty()); - if (key.empty()) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_list(struct_, - key.GetStruct(), - CefListValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h deleted file mode 100644 index 79de9f7e6..000000000 --- a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h +++ /dev/null @@ -1,71 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDictionaryValueCToCpp - : public CefCToCpp { - public: - explicit CefDictionaryValueCToCpp(cef_dictionary_value_t* str) - : CefCToCpp(str) {} - virtual ~CefDictionaryValueCToCpp() {} - - // CefDictionaryValue methods - virtual bool IsValid() OVERRIDE; - virtual bool IsOwned() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy( - bool exclude_empty_children) OVERRIDE; - virtual size_t GetSize() OVERRIDE; - virtual bool Clear() OVERRIDE; - virtual bool HasKey(const CefString& key) OVERRIDE; - virtual bool GetKeys(KeyList& keys) OVERRIDE; - virtual bool Remove(const CefString& key) OVERRIDE; - virtual CefValueType GetType(const CefString& key) OVERRIDE; - virtual bool GetBool(const CefString& key) OVERRIDE; - virtual int GetInt(const CefString& key) OVERRIDE; - virtual double GetDouble(const CefString& key) OVERRIDE; - virtual CefString GetString(const CefString& key) OVERRIDE; - virtual CefRefPtr GetBinary(const CefString& key) OVERRIDE; - virtual CefRefPtr GetDictionary( - const CefString& key) OVERRIDE; - virtual CefRefPtr GetList(const CefString& key) OVERRIDE; - virtual bool SetNull(const CefString& key) OVERRIDE; - virtual bool SetBool(const CefString& key, bool value) OVERRIDE; - virtual bool SetInt(const CefString& key, int value) OVERRIDE; - virtual bool SetDouble(const CefString& key, double value) OVERRIDE; - virtual bool SetString(const CefString& key, const CefString& value) OVERRIDE; - virtual bool SetBinary(const CefString& key, - CefRefPtr value) OVERRIDE; - virtual bool SetDictionary(const CefString& key, - CefRefPtr value) OVERRIDE; - virtual bool SetList(const CefString& key, - CefRefPtr value) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc deleted file mode 100644 index 3066b6714..000000000 --- a/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/ctocpp/display_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefDisplayHandlerCToCpp::OnLoadingStateChange( - CefRefPtr browser, bool isLoading, bool canGoBack, - bool canGoForward) { - if (CEF_MEMBER_MISSING(struct_, on_loading_state_change)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_loading_state_change(struct_, - CefBrowserCppToC::Wrap(browser), - isLoading, - canGoBack, - canGoForward); -} - -void CefDisplayHandlerCToCpp::OnAddressChange(CefRefPtr browser, - CefRefPtr frame, const CefString& url) { - if (CEF_MEMBER_MISSING(struct_, on_address_change)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - struct_->on_address_change(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - url.GetStruct()); -} - -void CefDisplayHandlerCToCpp::OnTitleChange(CefRefPtr browser, - const CefString& title) { - if (CEF_MEMBER_MISSING(struct_, on_title_change)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Unverified params: title - - // Execute - struct_->on_title_change(struct_, - CefBrowserCppToC::Wrap(browser), - title.GetStruct()); -} - -bool CefDisplayHandlerCToCpp::OnTooltip(CefRefPtr browser, - CefString& text) { - if (CEF_MEMBER_MISSING(struct_, on_tooltip)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Unverified params: text - - // Execute - int _retval = struct_->on_tooltip(struct_, - CefBrowserCppToC::Wrap(browser), - text.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -void CefDisplayHandlerCToCpp::OnStatusMessage(CefRefPtr browser, - const CefString& value, StatusType type) { - if (CEF_MEMBER_MISSING(struct_, on_status_message)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Unverified params: value - - // Execute - struct_->on_status_message(struct_, - CefBrowserCppToC::Wrap(browser), - value.GetStruct(), - type); -} - -bool CefDisplayHandlerCToCpp::OnConsoleMessage(CefRefPtr browser, - const CefString& message, const CefString& source, int line) { - if (CEF_MEMBER_MISSING(struct_, on_console_message)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Unverified params: message, source - - // Execute - int _retval = struct_->on_console_message(struct_, - CefBrowserCppToC::Wrap(browser), - message.GetStruct(), - source.GetStruct(), - line); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/display_handler_ctocpp.h b/cef/libcef_dll/ctocpp/display_handler_ctocpp.h deleted file mode 100644 index 830d4b5b0..000000000 --- a/cef/libcef_dll/ctocpp/display_handler_ctocpp.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_display_handler.h" -#include "include/capi/cef_display_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefDisplayHandlerCToCpp - : public CefCToCpp { - public: - explicit CefDisplayHandlerCToCpp(cef_display_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefDisplayHandlerCToCpp() {} - - // CefDisplayHandler methods - virtual void OnLoadingStateChange(CefRefPtr browser, - bool isLoading, bool canGoBack, bool canGoForward) OVERRIDE; - virtual void OnAddressChange(CefRefPtr browser, - CefRefPtr frame, const CefString& url) OVERRIDE; - virtual void OnTitleChange(CefRefPtr browser, - const CefString& title) OVERRIDE; - virtual bool OnTooltip(CefRefPtr browser, - CefString& text) OVERRIDE; - virtual void OnStatusMessage(CefRefPtr browser, - const CefString& value, StatusType type) OVERRIDE; - virtual bool OnConsoleMessage(CefRefPtr browser, - const CefString& message, const CefString& source, int line) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc b/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc deleted file mode 100644 index 3afa95215..000000000 --- a/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc +++ /dev/null @@ -1,255 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefDOMDocument::Type CefDOMDocumentCToCpp::GetType() { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return DOM_DOCUMENT_TYPE_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dom_document_type_t _retval = struct_->get_type(struct_); - - // Return type: simple - return _retval; -} - -CefRefPtr CefDOMDocumentCToCpp::GetDocument() { - if (CEF_MEMBER_MISSING(struct_, get_document)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_document(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMDocumentCToCpp::GetBody() { - if (CEF_MEMBER_MISSING(struct_, get_body)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_body(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMDocumentCToCpp::GetHead() { - if (CEF_MEMBER_MISSING(struct_, get_head)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_head(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefString CefDOMDocumentCToCpp::GetTitle() { - if (CEF_MEMBER_MISSING(struct_, get_title)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_title(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefDOMDocumentCToCpp::GetElementById( - const CefString& id) { - if (CEF_MEMBER_MISSING(struct_, get_element_by_id)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: id; type: string_byref_const - DCHECK(!id.empty()); - if (id.empty()) - return NULL; - - // Execute - cef_domnode_t* _retval = struct_->get_element_by_id(struct_, - id.GetStruct()); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMDocumentCToCpp::GetFocusedNode() { - if (CEF_MEMBER_MISSING(struct_, get_focused_node)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_focused_node(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -bool CefDOMDocumentCToCpp::HasSelection() { - if (CEF_MEMBER_MISSING(struct_, has_selection)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_selection(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefDOMDocumentCToCpp::GetSelectionStartNode() { - if (CEF_MEMBER_MISSING(struct_, get_selection_start_node)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_selection_start_node(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -int CefDOMDocumentCToCpp::GetSelectionStartOffset() { - if (CEF_MEMBER_MISSING(struct_, get_selection_start_offset)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_selection_start_offset(struct_); - - // Return type: simple - return _retval; -} - -CefRefPtr CefDOMDocumentCToCpp::GetSelectionEndNode() { - if (CEF_MEMBER_MISSING(struct_, get_selection_end_node)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_selection_end_node(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -int CefDOMDocumentCToCpp::GetSelectionEndOffset() { - if (CEF_MEMBER_MISSING(struct_, get_selection_end_offset)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_selection_end_offset(struct_); - - // Return type: simple - return _retval; -} - -CefString CefDOMDocumentCToCpp::GetSelectionAsMarkup() { - if (CEF_MEMBER_MISSING(struct_, get_selection_as_markup)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_selection_as_markup(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMDocumentCToCpp::GetSelectionAsText() { - if (CEF_MEMBER_MISSING(struct_, get_selection_as_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_selection_as_text(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMDocumentCToCpp::GetBaseURL() { - if (CEF_MEMBER_MISSING(struct_, get_base_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_base_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMDocumentCToCpp::GetCompleteURL(const CefString& partialURL) { - if (CEF_MEMBER_MISSING(struct_, get_complete_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: partialURL; type: string_byref_const - DCHECK(!partialURL.empty()); - if (partialURL.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_complete_url(struct_, - partialURL.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/domdocument_ctocpp.h b/cef/libcef_dll/ctocpp/domdocument_ctocpp.h deleted file mode 100644 index 23fee5b21..000000000 --- a/cef/libcef_dll/ctocpp/domdocument_ctocpp.h +++ /dev/null @@ -1,57 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMDocumentCToCpp - : public CefCToCpp { - public: - explicit CefDOMDocumentCToCpp(cef_domdocument_t* str) - : CefCToCpp( - str) {} - virtual ~CefDOMDocumentCToCpp() {} - - // CefDOMDocument methods - virtual Type GetType() OVERRIDE; - virtual CefRefPtr GetDocument() OVERRIDE; - virtual CefRefPtr GetBody() OVERRIDE; - virtual CefRefPtr GetHead() OVERRIDE; - virtual CefString GetTitle() OVERRIDE; - virtual CefRefPtr GetElementById(const CefString& id) OVERRIDE; - virtual CefRefPtr GetFocusedNode() OVERRIDE; - virtual bool HasSelection() OVERRIDE; - virtual CefRefPtr GetSelectionStartNode() OVERRIDE; - virtual int GetSelectionStartOffset() OVERRIDE; - virtual CefRefPtr GetSelectionEndNode() OVERRIDE; - virtual int GetSelectionEndOffset() OVERRIDE; - virtual CefString GetSelectionAsMarkup() OVERRIDE; - virtual CefString GetSelectionAsText() OVERRIDE; - virtual CefString GetBaseURL() OVERRIDE; - virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/domevent_ctocpp.cc b/cef/libcef_dll/ctocpp/domevent_ctocpp.cc deleted file mode 100644 index 3bec4e5bf..000000000 --- a/cef/libcef_dll/ctocpp/domevent_ctocpp.cc +++ /dev/null @@ -1,131 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domevent_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefDOMEventCToCpp::GetType() { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_type(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefDOMEvent::Category CefDOMEventCToCpp::GetCategory() { - if (CEF_MEMBER_MISSING(struct_, get_category)) - return DOM_EVENT_CATEGORY_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dom_event_category_t _retval = struct_->get_category(struct_); - - // Return type: simple - return _retval; -} - -CefDOMEvent::Phase CefDOMEventCToCpp::GetPhase() { - if (CEF_MEMBER_MISSING(struct_, get_phase)) - return DOM_EVENT_PHASE_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dom_event_phase_t _retval = struct_->get_phase(struct_); - - // Return type: simple - return _retval; -} - -bool CefDOMEventCToCpp::CanBubble() { - if (CEF_MEMBER_MISSING(struct_, can_bubble)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->can_bubble(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMEventCToCpp::CanCancel() { - if (CEF_MEMBER_MISSING(struct_, can_cancel)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->can_cancel(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefDOMEventCToCpp::GetDocument() { - if (CEF_MEMBER_MISSING(struct_, get_document)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domdocument_t* _retval = struct_->get_document(struct_); - - // Return type: refptr_same - return CefDOMDocumentCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMEventCToCpp::GetTarget() { - if (CEF_MEMBER_MISSING(struct_, get_target)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_target(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMEventCToCpp::GetCurrentTarget() { - if (CEF_MEMBER_MISSING(struct_, get_current_target)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_current_target(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/domevent_ctocpp.h b/cef/libcef_dll/ctocpp/domevent_ctocpp.h deleted file mode 100644 index 22fbed79f..000000000 --- a/cef/libcef_dll/ctocpp/domevent_ctocpp.h +++ /dev/null @@ -1,47 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMEVENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMEVENT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMEventCToCpp - : public CefCToCpp { - public: - explicit CefDOMEventCToCpp(cef_domevent_t* str) - : CefCToCpp(str) {} - virtual ~CefDOMEventCToCpp() {} - - // CefDOMEvent methods - virtual CefString GetType() OVERRIDE; - virtual Category GetCategory() OVERRIDE; - virtual Phase GetPhase() OVERRIDE; - virtual bool CanBubble() OVERRIDE; - virtual bool CanCancel() OVERRIDE; - virtual CefRefPtr GetDocument() OVERRIDE; - virtual CefRefPtr GetTarget() OVERRIDE; - virtual CefRefPtr GetCurrentTarget() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMEVENT_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/domevent_listener_ctocpp.cc b/cef/libcef_dll/ctocpp/domevent_listener_ctocpp.cc deleted file mode 100644 index 3186604b1..000000000 --- a/cef/libcef_dll/ctocpp/domevent_listener_ctocpp.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domevent_cpptoc.h" -#include "libcef_dll/ctocpp/domevent_listener_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefDOMEventListenerCToCpp::HandleEvent(CefRefPtr event) { - if (CEF_MEMBER_MISSING(struct_, handle_event)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: event; type: refptr_diff - DCHECK(event.get()); - if (!event.get()) - return; - - // Execute - struct_->handle_event(struct_, - CefDOMEventCppToC::Wrap(event)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/domevent_listener_ctocpp.h b/cef/libcef_dll/ctocpp/domevent_listener_ctocpp.h deleted file mode 100644 index 9d90727f3..000000000 --- a/cef/libcef_dll/ctocpp/domevent_listener_ctocpp.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMEVENT_LISTENER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMEVENT_LISTENER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefDOMEventListenerCToCpp - : public CefCToCpp { - public: - explicit CefDOMEventListenerCToCpp(cef_domevent_listener_t* str) - : CefCToCpp(str) {} - virtual ~CefDOMEventListenerCToCpp() {} - - // CefDOMEventListener methods - virtual void HandleEvent(CefRefPtr event) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMEVENT_LISTENER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/domnode_ctocpp.cc b/cef/libcef_dll/ctocpp/domnode_ctocpp.cc deleted file mode 100644 index f0b3a4756..000000000 --- a/cef/libcef_dll/ctocpp/domnode_ctocpp.cc +++ /dev/null @@ -1,436 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domevent_listener_cpptoc.h" -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefDOMNode::Type CefDOMNodeCToCpp::GetType() { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return DOM_NODE_TYPE_UNSUPPORTED; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_dom_node_type_t _retval = struct_->get_type(struct_); - - // Return type: simple - return _retval; -} - -bool CefDOMNodeCToCpp::IsText() { - if (CEF_MEMBER_MISSING(struct_, is_text)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_text(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::IsElement() { - if (CEF_MEMBER_MISSING(struct_, is_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_element(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::IsEditable() { - if (CEF_MEMBER_MISSING(struct_, is_editable)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_editable(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::IsFormControlElement() { - if (CEF_MEMBER_MISSING(struct_, is_form_control_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_form_control_element(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetFormControlElementType() { - if (CEF_MEMBER_MISSING(struct_, get_form_control_element_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_form_control_element_type( - struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefDOMNodeCToCpp::IsSame(CefRefPtr that) { - if (CEF_MEMBER_MISSING(struct_, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = struct_->is_same(struct_, - CefDOMNodeCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetName() { - if (CEF_MEMBER_MISSING(struct_, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDOMNodeCToCpp::GetValue() { - if (CEF_MEMBER_MISSING(struct_, get_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_value(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefDOMNodeCToCpp::SetValue(const CefString& value) { - if (CEF_MEMBER_MISSING(struct_, set_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: string_byref_const - DCHECK(!value.empty()); - if (value.empty()) - return false; - - // Execute - int _retval = struct_->set_value(struct_, - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetAsMarkup() { - if (CEF_MEMBER_MISSING(struct_, get_as_markup)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_as_markup(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefDOMNodeCToCpp::GetDocument() { - if (CEF_MEMBER_MISSING(struct_, get_document)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domdocument_t* _retval = struct_->get_document(struct_); - - // Return type: refptr_same - return CefDOMDocumentCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetParent() { - if (CEF_MEMBER_MISSING(struct_, get_parent)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_parent(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetPreviousSibling() { - if (CEF_MEMBER_MISSING(struct_, get_previous_sibling)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_previous_sibling(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetNextSibling() { - if (CEF_MEMBER_MISSING(struct_, get_next_sibling)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_next_sibling(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -bool CefDOMNodeCToCpp::HasChildren() { - if (CEF_MEMBER_MISSING(struct_, has_children)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_children(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefDOMNodeCToCpp::GetFirstChild() { - if (CEF_MEMBER_MISSING(struct_, get_first_child)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_first_child(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -CefRefPtr CefDOMNodeCToCpp::GetLastChild() { - if (CEF_MEMBER_MISSING(struct_, get_last_child)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_domnode_t* _retval = struct_->get_last_child(struct_); - - // Return type: refptr_same - return CefDOMNodeCToCpp::Wrap(_retval); -} - -void CefDOMNodeCToCpp::AddEventListener(const CefString& eventType, - CefRefPtr listener, bool useCapture) { - if (CEF_MEMBER_MISSING(struct_, add_event_listener)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: eventType; type: string_byref_const - DCHECK(!eventType.empty()); - if (eventType.empty()) - return; - // Verify param: listener; type: refptr_diff - DCHECK(listener.get()); - if (!listener.get()) - return; - - // Execute - struct_->add_event_listener(struct_, - eventType.GetStruct(), - CefDOMEventListenerCppToC::Wrap(listener), - useCapture); -} - -CefString CefDOMNodeCToCpp::GetElementTagName() { - if (CEF_MEMBER_MISSING(struct_, get_element_tag_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_element_tag_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefDOMNodeCToCpp::HasElementAttributes() { - if (CEF_MEMBER_MISSING(struct_, has_element_attributes)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_element_attributes(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDOMNodeCToCpp::HasElementAttribute(const CefString& attrName) { - if (CEF_MEMBER_MISSING(struct_, has_element_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: attrName; type: string_byref_const - DCHECK(!attrName.empty()); - if (attrName.empty()) - return false; - - // Execute - int _retval = struct_->has_element_attribute(struct_, - attrName.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetElementAttribute(const CefString& attrName) { - if (CEF_MEMBER_MISSING(struct_, get_element_attribute)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: attrName; type: string_byref_const - DCHECK(!attrName.empty()); - if (attrName.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_element_attribute(struct_, - attrName.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefDOMNodeCToCpp::GetElementAttributes(AttributeMap& attrMap) { - if (CEF_MEMBER_MISSING(struct_, get_element_attributes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: attrMap; type: string_map_single_byref - cef_string_map_t attrMapMap = cef_string_map_alloc(); - DCHECK(attrMapMap); - if (attrMapMap) - transfer_string_map_contents(attrMap, attrMapMap); - - // Execute - struct_->get_element_attributes(struct_, - attrMapMap); - - // Restore param:attrMap; type: string_map_single_byref - if (attrMapMap) { - attrMap.clear(); - transfer_string_map_contents(attrMapMap, attrMap); - cef_string_map_free(attrMapMap); - } -} - -bool CefDOMNodeCToCpp::SetElementAttribute(const CefString& attrName, - const CefString& value) { - if (CEF_MEMBER_MISSING(struct_, set_element_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: attrName; type: string_byref_const - DCHECK(!attrName.empty()); - if (attrName.empty()) - return false; - // Verify param: value; type: string_byref_const - DCHECK(!value.empty()); - if (value.empty()) - return false; - - // Execute - int _retval = struct_->set_element_attribute(struct_, - attrName.GetStruct(), - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefString CefDOMNodeCToCpp::GetElementInnerText() { - if (CEF_MEMBER_MISSING(struct_, get_element_inner_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_element_inner_text(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/domnode_ctocpp.h b/cef/libcef_dll/ctocpp/domnode_ctocpp.h deleted file mode 100644 index c5448ad0e..000000000 --- a/cef/libcef_dll/ctocpp/domnode_ctocpp.h +++ /dev/null @@ -1,67 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDOMNodeCToCpp - : public CefCToCpp { - public: - explicit CefDOMNodeCToCpp(cef_domnode_t* str) - : CefCToCpp(str) {} - virtual ~CefDOMNodeCToCpp() {} - - // CefDOMNode methods - virtual Type GetType() OVERRIDE; - virtual bool IsText() OVERRIDE; - virtual bool IsElement() OVERRIDE; - virtual bool IsEditable() OVERRIDE; - virtual bool IsFormControlElement() OVERRIDE; - virtual CefString GetFormControlElementType() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual CefString GetValue() OVERRIDE; - virtual bool SetValue(const CefString& value) OVERRIDE; - virtual CefString GetAsMarkup() OVERRIDE; - virtual CefRefPtr GetDocument() OVERRIDE; - virtual CefRefPtr GetParent() OVERRIDE; - virtual CefRefPtr GetPreviousSibling() OVERRIDE; - virtual CefRefPtr GetNextSibling() OVERRIDE; - virtual bool HasChildren() OVERRIDE; - virtual CefRefPtr GetFirstChild() OVERRIDE; - virtual CefRefPtr GetLastChild() OVERRIDE; - virtual void AddEventListener(const CefString& eventType, - CefRefPtr listener, bool useCapture) OVERRIDE; - virtual CefString GetElementTagName() OVERRIDE; - virtual bool HasElementAttributes() OVERRIDE; - virtual bool HasElementAttribute(const CefString& attrName) OVERRIDE; - virtual CefString GetElementAttribute(const CefString& attrName) OVERRIDE; - virtual void GetElementAttributes(AttributeMap& attrMap) OVERRIDE; - virtual bool SetElementAttribute(const CefString& attrName, - const CefString& value) OVERRIDE; - virtual CefString GetElementInnerText() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc b/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc deleted file mode 100644 index b652d633f..000000000 --- a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domdocument_cpptoc.h" -#include "libcef_dll/ctocpp/domvisitor_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefDOMVisitorCToCpp::Visit(CefRefPtr document) { - if (CEF_MEMBER_MISSING(struct_, visit)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: document; type: refptr_diff - DCHECK(document.get()); - if (!document.get()) - return; - - // Execute - struct_->visit(struct_, - CefDOMDocumentCppToC::Wrap(document)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h b/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h deleted file mode 100644 index c2005ff48..000000000 --- a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_dom.h" -#include "include/capi/cef_dom_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefDOMVisitorCToCpp - : public CefCToCpp { - public: - explicit CefDOMVisitorCToCpp(cef_domvisitor_t* str) - : CefCToCpp(str) {} - virtual ~CefDOMVisitorCToCpp() {} - - // CefDOMVisitor methods - virtual void Visit(CefRefPtr document) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc deleted file mode 100644 index 102e2be5b..000000000 --- a/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/before_download_callback_cpptoc.h" -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/download_item_cpptoc.h" -#include "libcef_dll/cpptoc/download_item_callback_cpptoc.h" -#include "libcef_dll/ctocpp/download_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefDownloadHandlerCToCpp::OnBeforeDownload(CefRefPtr browser, - CefRefPtr download_item, const CefString& suggested_name, - CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, on_before_download)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: download_item; type: refptr_diff - DCHECK(download_item.get()); - if (!download_item.get()) - return; - // Verify param: suggested_name; type: string_byref_const - DCHECK(!suggested_name.empty()); - if (suggested_name.empty()) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - - // Execute - struct_->on_before_download(struct_, - CefBrowserCppToC::Wrap(browser), - CefDownloadItemCppToC::Wrap(download_item), - suggested_name.GetStruct(), - CefBeforeDownloadCallbackCppToC::Wrap(callback)); -} - -void CefDownloadHandlerCToCpp::OnDownloadUpdated(CefRefPtr browser, - CefRefPtr download_item, - CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, on_download_updated)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: download_item; type: refptr_diff - DCHECK(download_item.get()); - if (!download_item.get()) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - - // Execute - struct_->on_download_updated(struct_, - CefBrowserCppToC::Wrap(browser), - CefDownloadItemCppToC::Wrap(download_item), - CefDownloadItemCallbackCppToC::Wrap(callback)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/download_handler_ctocpp.h b/cef/libcef_dll/ctocpp/download_handler_ctocpp.h deleted file mode 100644 index f4f0f24c9..000000000 --- a/cef/libcef_dll/ctocpp/download_handler_ctocpp.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefDownloadHandlerCToCpp - : public CefCToCpp { - public: - explicit CefDownloadHandlerCToCpp(cef_download_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefDownloadHandlerCToCpp() {} - - // CefDownloadHandler methods - virtual void OnBeforeDownload(CefRefPtr browser, - CefRefPtr download_item, - const CefString& suggested_name, - CefRefPtr callback) OVERRIDE; - virtual void OnDownloadUpdated(CefRefPtr browser, - CefRefPtr download_item, - CefRefPtr callback) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc deleted file mode 100644 index 092787640..000000000 --- a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc +++ /dev/null @@ -1,33 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefDownloadItemCallbackCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h deleted file mode 100644 index f10b8fd5d..000000000 --- a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h +++ /dev/null @@ -1,42 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_handler.h" -#include "include/capi/cef_download_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDownloadItemCallbackCToCpp - : public CefCToCpp { - public: - explicit CefDownloadItemCallbackCToCpp(cef_download_item_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefDownloadItemCallbackCToCpp() {} - - // CefDownloadItemCallback methods - virtual void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/download_item_ctocpp.cc b/cef/libcef_dll/ctocpp/download_item_ctocpp.cc deleted file mode 100644 index ae50f3ffc..000000000 --- a/cef/libcef_dll/ctocpp/download_item_ctocpp.cc +++ /dev/null @@ -1,241 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/download_item_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefDownloadItemCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDownloadItemCToCpp::IsInProgress() { - if (CEF_MEMBER_MISSING(struct_, is_in_progress)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_in_progress(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDownloadItemCToCpp::IsComplete() { - if (CEF_MEMBER_MISSING(struct_, is_complete)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_complete(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefDownloadItemCToCpp::IsCanceled() { - if (CEF_MEMBER_MISSING(struct_, is_canceled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_canceled(struct_); - - // Return type: bool - return _retval?true:false; -} - -int64 CefDownloadItemCToCpp::GetCurrentSpeed() { - if (CEF_MEMBER_MISSING(struct_, get_current_speed)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->get_current_speed(struct_); - - // Return type: simple - return _retval; -} - -int CefDownloadItemCToCpp::GetPercentComplete() { - if (CEF_MEMBER_MISSING(struct_, get_percent_complete)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_percent_complete(struct_); - - // Return type: simple - return _retval; -} - -int64 CefDownloadItemCToCpp::GetTotalBytes() { - if (CEF_MEMBER_MISSING(struct_, get_total_bytes)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->get_total_bytes(struct_); - - // Return type: simple - return _retval; -} - -int64 CefDownloadItemCToCpp::GetReceivedBytes() { - if (CEF_MEMBER_MISSING(struct_, get_received_bytes)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->get_received_bytes(struct_); - - // Return type: simple - return _retval; -} - -CefTime CefDownloadItemCToCpp::GetStartTime() { - if (CEF_MEMBER_MISSING(struct_, get_start_time)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = struct_->get_start_time(struct_); - - // Return type: simple - return _retval; -} - -CefTime CefDownloadItemCToCpp::GetEndTime() { - if (CEF_MEMBER_MISSING(struct_, get_end_time)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = struct_->get_end_time(struct_); - - // Return type: simple - return _retval; -} - -CefString CefDownloadItemCToCpp::GetFullPath() { - if (CEF_MEMBER_MISSING(struct_, get_full_path)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_full_path(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int32 CefDownloadItemCToCpp::GetId() { - if (CEF_MEMBER_MISSING(struct_, get_id)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int32 _retval = struct_->get_id(struct_); - - // Return type: simple - return _retval; -} - -CefString CefDownloadItemCToCpp::GetURL() { - if (CEF_MEMBER_MISSING(struct_, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetSuggestedFileName() { - if (CEF_MEMBER_MISSING(struct_, get_suggested_file_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_suggested_file_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetContentDisposition() { - if (CEF_MEMBER_MISSING(struct_, get_content_disposition)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_content_disposition(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefDownloadItemCToCpp::GetMimeType() { - if (CEF_MEMBER_MISSING(struct_, get_mime_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_mime_type(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/download_item_ctocpp.h b/cef/libcef_dll/ctocpp/download_item_ctocpp.h deleted file mode 100644 index be2e7b35a..000000000 --- a/cef/libcef_dll/ctocpp/download_item_ctocpp.h +++ /dev/null @@ -1,57 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_download_item.h" -#include "include/capi/cef_download_item_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefDownloadItemCToCpp - : public CefCToCpp { - public: - explicit CefDownloadItemCToCpp(cef_download_item_t* str) - : CefCToCpp( - str) {} - virtual ~CefDownloadItemCToCpp() {} - - // CefDownloadItem methods - virtual bool IsValid() OVERRIDE; - virtual bool IsInProgress() OVERRIDE; - virtual bool IsComplete() OVERRIDE; - virtual bool IsCanceled() OVERRIDE; - virtual int64 GetCurrentSpeed() OVERRIDE; - virtual int GetPercentComplete() OVERRIDE; - virtual int64 GetTotalBytes() OVERRIDE; - virtual int64 GetReceivedBytes() OVERRIDE; - virtual CefTime GetStartTime() OVERRIDE; - virtual CefTime GetEndTime() OVERRIDE; - virtual CefString GetFullPath() OVERRIDE; - virtual int32 GetId() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual CefString GetSuggestedFileName() OVERRIDE; - virtual CefString GetContentDisposition() OVERRIDE; - virtual CefString GetMimeType() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc deleted file mode 100644 index c88c36739..000000000 --- a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc +++ /dev/null @@ -1,56 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefFileDialogCallbackCToCpp::Continue( - const std::vector& file_paths) { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: file_paths; type: string_vec_byref_const - cef_string_list_t file_pathsList = cef_string_list_alloc(); - DCHECK(file_pathsList); - if (file_pathsList) - transfer_string_list_contents(file_paths, file_pathsList); - - // Execute - struct_->cont(struct_, - file_pathsList); - - // Restore param:file_paths; type: string_vec_byref_const - if (file_pathsList) - cef_string_list_free(file_pathsList); -} - -void CefFileDialogCallbackCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h b/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h deleted file mode 100644 index 53ff2a6c8..000000000 --- a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h +++ /dev/null @@ -1,44 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_dialog_handler.h" -#include "include/capi/cef_dialog_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefFileDialogCallbackCToCpp - : public CefCToCpp { - public: - explicit CefFileDialogCallbackCToCpp(cef_file_dialog_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefFileDialogCallbackCToCpp() {} - - // CefFileDialogCallback methods - virtual void Continue(const std::vector& file_paths) OVERRIDE; - virtual void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc deleted file mode 100644 index 9b2176eef..000000000 --- a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/ctocpp/focus_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefFocusHandlerCToCpp::OnTakeFocus(CefRefPtr browser, - bool next) { - if (CEF_MEMBER_MISSING(struct_, on_take_focus)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_take_focus(struct_, - CefBrowserCppToC::Wrap(browser), - next); -} - -bool CefFocusHandlerCToCpp::OnSetFocus(CefRefPtr browser, - FocusSource source) { - if (CEF_MEMBER_MISSING(struct_, on_set_focus)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - - // Execute - int _retval = struct_->on_set_focus(struct_, - CefBrowserCppToC::Wrap(browser), - source); - - // Return type: bool - return _retval?true:false; -} - -void CefFocusHandlerCToCpp::OnGotFocus(CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, on_got_focus)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_got_focus(struct_, - CefBrowserCppToC::Wrap(browser)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h b/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h deleted file mode 100644 index 978237e2b..000000000 --- a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_FOCUS_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_FOCUS_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_focus_handler.h" -#include "include/capi/cef_focus_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefFocusHandlerCToCpp - : public CefCToCpp { - public: - explicit CefFocusHandlerCToCpp(cef_focus_handler_t* str) - : CefCToCpp( - str) {} - virtual ~CefFocusHandlerCToCpp() {} - - // CefFocusHandler methods - virtual void OnTakeFocus(CefRefPtr browser, bool next) OVERRIDE; - virtual bool OnSetFocus(CefRefPtr browser, - FocusSource source) OVERRIDE; - virtual void OnGotFocus(CefRefPtr browser) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_FOCUS_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/frame_ctocpp.cc b/cef/libcef_dll/ctocpp/frame_ctocpp.cc deleted file mode 100644 index bcb0b47c8..000000000 --- a/cef/libcef_dll/ctocpp/frame_ctocpp.cc +++ /dev/null @@ -1,351 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/domvisitor_cpptoc.h" -#include "libcef_dll/cpptoc/string_visitor_cpptoc.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefFrameCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefFrameCToCpp::Undo() { - if (CEF_MEMBER_MISSING(struct_, undo)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->undo(struct_); -} - -void CefFrameCToCpp::Redo() { - if (CEF_MEMBER_MISSING(struct_, redo)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->redo(struct_); -} - -void CefFrameCToCpp::Cut() { - if (CEF_MEMBER_MISSING(struct_, cut)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cut(struct_); -} - -void CefFrameCToCpp::Copy() { - if (CEF_MEMBER_MISSING(struct_, copy)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->copy(struct_); -} - -void CefFrameCToCpp::Paste() { - if (CEF_MEMBER_MISSING(struct_, paste)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->paste(struct_); -} - -void CefFrameCToCpp::Delete() { - if (CEF_MEMBER_MISSING(struct_, del)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->del(struct_); -} - -void CefFrameCToCpp::SelectAll() { - if (CEF_MEMBER_MISSING(struct_, select_all)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->select_all(struct_); -} - -void CefFrameCToCpp::ViewSource() { - if (CEF_MEMBER_MISSING(struct_, view_source)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->view_source(struct_); -} - -void CefFrameCToCpp::GetSource(CefRefPtr visitor) { - if (CEF_MEMBER_MISSING(struct_, get_source)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - struct_->get_source(struct_, - CefStringVisitorCppToC::Wrap(visitor)); -} - -void CefFrameCToCpp::GetText(CefRefPtr visitor) { - if (CEF_MEMBER_MISSING(struct_, get_text)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - struct_->get_text(struct_, - CefStringVisitorCppToC::Wrap(visitor)); -} - -void CefFrameCToCpp::LoadRequest(CefRefPtr request) { - if (CEF_MEMBER_MISSING(struct_, load_request)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_same - DCHECK(request.get()); - if (!request.get()) - return; - - // Execute - struct_->load_request(struct_, - CefRequestCToCpp::Unwrap(request)); -} - -void CefFrameCToCpp::LoadURL(const CefString& url) { - if (CEF_MEMBER_MISSING(struct_, load_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - struct_->load_url(struct_, - url.GetStruct()); -} - -void CefFrameCToCpp::LoadString(const CefString& string_val, - const CefString& url) { - if (CEF_MEMBER_MISSING(struct_, load_string)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: string_val; type: string_byref_const - DCHECK(!string_val.empty()); - if (string_val.empty()) - return; - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - struct_->load_string(struct_, - string_val.GetStruct(), - url.GetStruct()); -} - -void CefFrameCToCpp::ExecuteJavaScript(const CefString& code, - const CefString& script_url, int start_line) { - if (CEF_MEMBER_MISSING(struct_, execute_java_script)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: code; type: string_byref_const - DCHECK(!code.empty()); - if (code.empty()) - return; - // Unverified params: script_url - - // Execute - struct_->execute_java_script(struct_, - code.GetStruct(), - script_url.GetStruct(), - start_line); -} - -bool CefFrameCToCpp::IsMain() { - if (CEF_MEMBER_MISSING(struct_, is_main)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_main(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefFrameCToCpp::IsFocused() { - if (CEF_MEMBER_MISSING(struct_, is_focused)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_focused(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefFrameCToCpp::GetName() { - if (CEF_MEMBER_MISSING(struct_, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int64 CefFrameCToCpp::GetIdentifier() { - if (CEF_MEMBER_MISSING(struct_, get_identifier)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->get_identifier(struct_); - - // Return type: simple - return _retval; -} - -CefRefPtr CefFrameCToCpp::GetParent() { - if (CEF_MEMBER_MISSING(struct_, get_parent)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = struct_->get_parent(struct_); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefString CefFrameCToCpp::GetURL() { - if (CEF_MEMBER_MISSING(struct_, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefFrameCToCpp::GetBrowser() { - if (CEF_MEMBER_MISSING(struct_, get_browser)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_t* _retval = struct_->get_browser(struct_); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - -CefRefPtr CefFrameCToCpp::GetV8Context() { - if (CEF_MEMBER_MISSING(struct_, get_v8context)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8context_t* _retval = struct_->get_v8context(struct_); - - // Return type: refptr_same - return CefV8ContextCToCpp::Wrap(_retval); -} - -void CefFrameCToCpp::VisitDOM(CefRefPtr visitor) { - if (CEF_MEMBER_MISSING(struct_, visit_dom)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - struct_->visit_dom(struct_, - CefDOMVisitorCppToC::Wrap(visitor)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = - 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/frame_ctocpp.h b/cef/libcef_dll/ctocpp/frame_ctocpp.h deleted file mode 100644 index 55fb342d7..000000000 --- a/cef/libcef_dll/ctocpp/frame_ctocpp.h +++ /dev/null @@ -1,69 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_frame.h" -#include "include/capi/cef_frame_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefFrameCToCpp - : public CefCToCpp { - public: - explicit CefFrameCToCpp(cef_frame_t* str) - : CefCToCpp(str) {} - virtual ~CefFrameCToCpp() {} - - // CefFrame methods - virtual bool IsValid() OVERRIDE; - virtual void Undo() OVERRIDE; - virtual void Redo() OVERRIDE; - virtual void Cut() OVERRIDE; - virtual void Copy() OVERRIDE; - virtual void Paste() OVERRIDE; - virtual void Delete() OVERRIDE; - virtual void SelectAll() OVERRIDE; - virtual void ViewSource() OVERRIDE; - virtual void GetSource(CefRefPtr visitor) OVERRIDE; - virtual void GetText(CefRefPtr visitor) OVERRIDE; - virtual void LoadRequest(CefRefPtr request) OVERRIDE; - virtual void LoadURL(const CefString& url) OVERRIDE; - virtual void LoadString(const CefString& string_val, - const CefString& url) OVERRIDE; - virtual void ExecuteJavaScript(const CefString& code, - const CefString& script_url, int start_line) OVERRIDE; - virtual bool IsMain() OVERRIDE; - virtual bool IsFocused() OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual int64 GetIdentifier() OVERRIDE; - virtual CefRefPtr GetParent() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual CefRefPtr GetV8Context() OVERRIDE; - virtual void VisitDOM(CefRefPtr visitor) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc deleted file mode 100644 index b0909cb3d..000000000 --- a/cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc +++ /dev/null @@ -1,34 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefGeolocationCallbackCToCpp::Continue(bool allow) { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cont(struct_, - allow); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.h b/cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.h deleted file mode 100644 index 52d17a9ca..000000000 --- a/cef/libcef_dll/ctocpp/geolocation_callback_ctocpp.h +++ /dev/null @@ -1,42 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_geolocation_handler.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefGeolocationCallbackCToCpp - : public CefCToCpp { - public: - explicit CefGeolocationCallbackCToCpp(cef_geolocation_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefGeolocationCallbackCToCpp() {} - - // CefGeolocationCallback methods - virtual void Continue(bool allow) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.cc deleted file mode 100644 index c1831a638..000000000 --- a/cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.cc +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h" -#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefGeolocationHandlerCToCpp::OnRequestGeolocationPermission( - CefRefPtr browser, const CefString& requesting_url, - int request_id, CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, on_request_geolocation_permission)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: requesting_url; type: string_byref_const - DCHECK(!requesting_url.empty()); - if (requesting_url.empty()) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - - // Execute - struct_->on_request_geolocation_permission(struct_, - CefBrowserCppToC::Wrap(browser), - requesting_url.GetStruct(), - request_id, - CefGeolocationCallbackCppToC::Wrap(callback)); -} - -void CefGeolocationHandlerCToCpp::OnCancelGeolocationPermission( - CefRefPtr browser, const CefString& requesting_url, - int request_id) { - if (CEF_MEMBER_MISSING(struct_, on_cancel_geolocation_permission)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: requesting_url; type: string_byref_const - DCHECK(!requesting_url.empty()); - if (requesting_url.empty()) - return; - - // Execute - struct_->on_cancel_geolocation_permission(struct_, - CefBrowserCppToC::Wrap(browser), - requesting_url.GetStruct(), - request_id); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.h b/cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.h deleted file mode 100644 index 20b63bb2e..000000000 --- a/cef/libcef_dll/ctocpp/geolocation_handler_ctocpp.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_geolocation_handler.h" -#include "include/capi/cef_geolocation_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefGeolocationHandlerCToCpp - : public CefCToCpp { - public: - explicit CefGeolocationHandlerCToCpp(cef_geolocation_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefGeolocationHandlerCToCpp() {} - - // CefGeolocationHandler methods - virtual void OnRequestGeolocationPermission(CefRefPtr browser, - const CefString& requesting_url, int request_id, - CefRefPtr callback) OVERRIDE; - virtual void OnCancelGeolocationPermission(CefRefPtr browser, - const CefString& requesting_url, int request_id) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc deleted file mode 100644 index 110d01d89..000000000 --- a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc +++ /dev/null @@ -1,38 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefJSDialogCallbackCToCpp::Continue(bool success, - const CefString& user_input) { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: user_input - - // Execute - struct_->cont(struct_, - success, - user_input.GetStruct()); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h b/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h deleted file mode 100644 index 6af7a4cb0..000000000 --- a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h +++ /dev/null @@ -1,42 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_jsdialog_handler.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefJSDialogCallbackCToCpp - : public CefCToCpp { - public: - explicit CefJSDialogCallbackCToCpp(cef_jsdialog_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefJSDialogCallbackCToCpp() {} - - // CefJSDialogCallback methods - virtual void Continue(bool success, const CefString& user_input) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc deleted file mode 100644 index 971222994..000000000 --- a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h" -#include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefJSDialogHandlerCToCpp::OnJSDialog(CefRefPtr browser, - const CefString& origin_url, const CefString& accept_lang, - JSDialogType dialog_type, const CefString& message_text, - const CefString& default_prompt_text, - CefRefPtr callback, bool& suppress_message) { - if (CEF_MEMBER_MISSING(struct_, on_jsdialog)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: origin_url; type: string_byref_const - DCHECK(!origin_url.empty()); - if (origin_url.empty()) - return false; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - // Unverified params: accept_lang, message_text, default_prompt_text - - // Translate param: suppress_message; type: bool_byref - int suppress_messageInt = suppress_message; - - // Execute - int _retval = struct_->on_jsdialog(struct_, - CefBrowserCppToC::Wrap(browser), - origin_url.GetStruct(), - accept_lang.GetStruct(), - dialog_type, - message_text.GetStruct(), - default_prompt_text.GetStruct(), - CefJSDialogCallbackCppToC::Wrap(callback), - &suppress_messageInt); - - // Restore param:suppress_message; type: bool_byref - suppress_message = suppress_messageInt?true:false; - - // Return type: bool - return _retval?true:false; -} - -bool CefJSDialogHandlerCToCpp::OnBeforeUnloadDialog( - CefRefPtr browser, const CefString& message_text, - bool is_reload, CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, on_before_unload_dialog)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - // Unverified params: message_text - - // Execute - int _retval = struct_->on_before_unload_dialog(struct_, - CefBrowserCppToC::Wrap(browser), - message_text.GetStruct(), - is_reload, - CefJSDialogCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -void CefJSDialogHandlerCToCpp::OnResetDialogState( - CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, on_reset_dialog_state)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_reset_dialog_state(struct_, - CefBrowserCppToC::Wrap(browser)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h b/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h deleted file mode 100644 index 69a046d8b..000000000 --- a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_jsdialog_handler.h" -#include "include/capi/cef_jsdialog_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefJSDialogHandlerCToCpp - : public CefCToCpp { - public: - explicit CefJSDialogHandlerCToCpp(cef_jsdialog_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefJSDialogHandlerCToCpp() {} - - // CefJSDialogHandler methods - virtual bool OnJSDialog(CefRefPtr browser, - const CefString& origin_url, const CefString& accept_lang, - JSDialogType dialog_type, const CefString& message_text, - const CefString& default_prompt_text, - CefRefPtr callback, - bool& suppress_message) OVERRIDE; - virtual bool OnBeforeUnloadDialog(CefRefPtr browser, - const CefString& message_text, bool is_reload, - CefRefPtr callback) OVERRIDE; - virtual void OnResetDialogState(CefRefPtr browser) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc deleted file mode 100644 index f5d93cb32..000000000 --- a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefKeyboardHandlerCToCpp::OnPreKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, CefEventHandle os_event, - bool* is_keyboard_shortcut) { - if (CEF_MEMBER_MISSING(struct_, on_pre_key_event)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: is_keyboard_shortcut; type: bool_byaddr - DCHECK(is_keyboard_shortcut); - if (!is_keyboard_shortcut) - return false; - - // Translate param: is_keyboard_shortcut; type: bool_byaddr - int is_keyboard_shortcutInt = is_keyboard_shortcut?*is_keyboard_shortcut:0; - - // Execute - int _retval = struct_->on_pre_key_event(struct_, - CefBrowserCppToC::Wrap(browser), - &event, - os_event, - &is_keyboard_shortcutInt); - - // Restore param:is_keyboard_shortcut; type: bool_byaddr - if (is_keyboard_shortcut) - *is_keyboard_shortcut = is_keyboard_shortcutInt?true:false; - - // Return type: bool - return _retval?true:false; -} - -bool CefKeyboardHandlerCToCpp::OnKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, CefEventHandle os_event) { - if (CEF_MEMBER_MISSING(struct_, on_key_event)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - - // Execute - int _retval = struct_->on_key_event(struct_, - CefBrowserCppToC::Wrap(browser), - &event, - os_event); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h b/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h deleted file mode 100644 index 32e0f9373..000000000 --- a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_keyboard_handler.h" -#include "include/capi/cef_keyboard_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefKeyboardHandlerCToCpp - : public CefCToCpp { - public: - explicit CefKeyboardHandlerCToCpp(cef_keyboard_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefKeyboardHandlerCToCpp() {} - - // CefKeyboardHandler methods - virtual bool OnPreKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, CefEventHandle os_event, - bool* is_keyboard_shortcut) OVERRIDE; - virtual bool OnKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, CefEventHandle os_event) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc deleted file mode 100644 index 4db810135..000000000 --- a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/ctocpp/client_ctocpp.h" -#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefLifeSpanHandlerCToCpp::OnBeforePopup( - CefRefPtr parentBrowser, const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, const CefString& url, - CefRefPtr& client, CefBrowserSettings& settings) { - if (CEF_MEMBER_MISSING(struct_, on_before_popup)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: parentBrowser; type: refptr_diff - DCHECK(parentBrowser.get()); - if (!parentBrowser.get()) - return false; - // Unverified params: url - - // Translate param: client; type: refptr_same_byref - cef_client_t* clientStruct = NULL; - if (client.get()) - clientStruct = CefClientCToCpp::Unwrap(client); - cef_client_t* clientOrig = clientStruct; - - // Execute - int _retval = struct_->on_before_popup(struct_, - CefBrowserCppToC::Wrap(parentBrowser), - &popupFeatures, - &windowInfo, - url.GetStruct(), - &clientStruct, - &settings); - - // Restore param:client; type: refptr_same_byref - if (clientStruct) { - if (clientStruct != clientOrig) { - client = CefClientCToCpp::Wrap(clientStruct); - } - } else { - client = NULL; - } - - // Return type: bool - return _retval?true:false; -} - -void CefLifeSpanHandlerCToCpp::OnAfterCreated(CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, on_after_created)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_after_created(struct_, - CefBrowserCppToC::Wrap(browser)); -} - -bool CefLifeSpanHandlerCToCpp::RunModal(CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, run_modal)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - - // Execute - int _retval = struct_->run_modal(struct_, - CefBrowserCppToC::Wrap(browser)); - - // Return type: bool - return _retval?true:false; -} - -bool CefLifeSpanHandlerCToCpp::DoClose(CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, do_close)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - - // Execute - int _retval = struct_->do_close(struct_, - CefBrowserCppToC::Wrap(browser)); - - // Return type: bool - return _retval?true:false; -} - -void CefLifeSpanHandlerCToCpp::OnBeforeClose(CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, on_before_close)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_before_close(struct_, - CefBrowserCppToC::Wrap(browser)); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h b/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h deleted file mode 100644 index 7b5e45b48..000000000 --- a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_life_span_handler.h" -#include "include/capi/cef_life_span_handler_capi.h" -#include "include/cef_client.h" -#include "include/capi/cef_client_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefLifeSpanHandlerCToCpp - : public CefCToCpp { - public: - explicit CefLifeSpanHandlerCToCpp(cef_life_span_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefLifeSpanHandlerCToCpp() {} - - // CefLifeSpanHandler methods - virtual bool OnBeforePopup(CefRefPtr parentBrowser, - const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, - const CefString& url, CefRefPtr& client, - CefBrowserSettings& settings) OVERRIDE; - virtual void OnAfterCreated(CefRefPtr browser) OVERRIDE; - virtual bool RunModal(CefRefPtr browser) OVERRIDE; - virtual bool DoClose(CefRefPtr browser) OVERRIDE; - virtual void OnBeforeClose(CefRefPtr browser) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/list_value_ctocpp.cc b/cef/libcef_dll/ctocpp/list_value_ctocpp.cc deleted file mode 100644 index f3a1c1abb..000000000 --- a/cef/libcef_dll/ctocpp/list_value_ctocpp.cc +++ /dev/null @@ -1,476 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefListValue::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = cef_list_value_create(); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefListValueCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::IsOwned() { - if (CEF_MEMBER_MISSING(struct_, is_owned)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_owned(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefListValueCToCpp::Copy() { - if (CEF_MEMBER_MISSING(struct_, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = struct_->copy(struct_); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefListValueCToCpp::SetSize(size_t size) { - if (CEF_MEMBER_MISSING(struct_, set_size)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_size(struct_, - size); - - // Return type: bool - return _retval?true:false; -} - -size_t CefListValueCToCpp::GetSize() { - if (CEF_MEMBER_MISSING(struct_, get_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_size(struct_); - - // Return type: simple - return _retval; -} - -bool CefListValueCToCpp::Clear() { - if (CEF_MEMBER_MISSING(struct_, clear)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->clear(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::Remove(int index) { - if (CEF_MEMBER_MISSING(struct_, remove)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->remove(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -CefValueType CefListValueCToCpp::GetType(int index) { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return VTYPE_INVALID; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return VTYPE_INVALID; - - // Execute - cef_value_type_t _retval = struct_->get_type(struct_, - index); - - // Return type: simple - return _retval; -} - -bool CefListValueCToCpp::GetBool(int index) { - if (CEF_MEMBER_MISSING(struct_, get_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->get_bool(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -int CefListValueCToCpp::GetInt(int index) { - if (CEF_MEMBER_MISSING(struct_, get_int)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - int _retval = struct_->get_int(struct_, - index); - - // Return type: simple - return _retval; -} - -double CefListValueCToCpp::GetDouble(int index) { - if (CEF_MEMBER_MISSING(struct_, get_double)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return 0; - - // Execute - double _retval = struct_->get_double(struct_, - index); - - // Return type: simple - return _retval; -} - -CefString CefListValueCToCpp::GetString(int index) { - if (CEF_MEMBER_MISSING(struct_, get_string)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_string(struct_, - index); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefListValueCToCpp::GetBinary(int index) { - if (CEF_MEMBER_MISSING(struct_, get_binary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_binary_value_t* _retval = struct_->get_binary(struct_, - index); - - // Return type: refptr_same - return CefBinaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefListValueCToCpp::GetDictionary(int index) { - if (CEF_MEMBER_MISSING(struct_, get_dictionary)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_dictionary_value_t* _retval = struct_->get_dictionary(struct_, - index); - - // Return type: refptr_same - return CefDictionaryValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefListValueCToCpp::GetList(int index) { - if (CEF_MEMBER_MISSING(struct_, get_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_list_value_t* _retval = struct_->get_list(struct_, - index); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - -bool CefListValueCToCpp::SetNull(int index) { - if (CEF_MEMBER_MISSING(struct_, set_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->set_null(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetBool(int index, bool value) { - if (CEF_MEMBER_MISSING(struct_, set_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->set_bool(struct_, - index, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetInt(int index, int value) { - if (CEF_MEMBER_MISSING(struct_, set_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->set_int(struct_, - index, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetDouble(int index, double value) { - if (CEF_MEMBER_MISSING(struct_, set_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->set_double(struct_, - index, - value); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetString(int index, const CefString& value) { - if (CEF_MEMBER_MISSING(struct_, set_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Unverified params: value - - // Execute - int _retval = struct_->set_string(struct_, - index, - value.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetBinary(int index, CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_binary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_binary(struct_, - index, - CefBinaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetDictionary(int index, - CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_dictionary)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_dictionary(struct_, - index, - CefDictionaryValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefListValueCToCpp::SetList(int index, CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_list)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_list(struct_, - index, - CefListValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/list_value_ctocpp.h b/cef/libcef_dll/ctocpp/list_value_ctocpp.h deleted file mode 100644 index 56fed43fd..000000000 --- a/cef/libcef_dll/ctocpp/list_value_ctocpp.h +++ /dev/null @@ -1,64 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_values.h" -#include "include/capi/cef_values_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefListValueCToCpp - : public CefCToCpp { - public: - explicit CefListValueCToCpp(cef_list_value_t* str) - : CefCToCpp(str) {} - virtual ~CefListValueCToCpp() {} - - // CefListValue methods - virtual bool IsValid() OVERRIDE; - virtual bool IsOwned() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual bool SetSize(size_t size) OVERRIDE; - virtual size_t GetSize() OVERRIDE; - virtual bool Clear() OVERRIDE; - virtual bool Remove(int index) OVERRIDE; - virtual CefValueType GetType(int index) OVERRIDE; - virtual bool GetBool(int index) OVERRIDE; - virtual int GetInt(int index) OVERRIDE; - virtual double GetDouble(int index) OVERRIDE; - virtual CefString GetString(int index) OVERRIDE; - virtual CefRefPtr GetBinary(int index) OVERRIDE; - virtual CefRefPtr GetDictionary(int index) OVERRIDE; - virtual CefRefPtr GetList(int index) OVERRIDE; - virtual bool SetNull(int index) OVERRIDE; - virtual bool SetBool(int index, bool value) OVERRIDE; - virtual bool SetInt(int index, int value) OVERRIDE; - virtual bool SetDouble(int index, double value) OVERRIDE; - virtual bool SetString(int index, const CefString& value) OVERRIDE; - virtual bool SetBinary(int index, CefRefPtr value) OVERRIDE; - virtual bool SetDictionary(int index, - CefRefPtr value) OVERRIDE; - virtual bool SetList(int index, CefRefPtr value) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc deleted file mode 100644 index c853f0cd3..000000000 --- a/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/ctocpp/load_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefLoadHandlerCToCpp::OnLoadStart(CefRefPtr browser, - CefRefPtr frame) { - if (CEF_MEMBER_MISSING(struct_, on_load_start)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - - // Execute - struct_->on_load_start(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame)); -} - -void CefLoadHandlerCToCpp::OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, int httpStatusCode) { - if (CEF_MEMBER_MISSING(struct_, on_load_end)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - - // Execute - struct_->on_load_end(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - httpStatusCode); -} - -void CefLoadHandlerCToCpp::OnLoadError(CefRefPtr browser, - CefRefPtr frame, ErrorCode errorCode, const CefString& errorText, - const CefString& failedUrl) { - if (CEF_MEMBER_MISSING(struct_, on_load_error)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - // Verify param: failedUrl; type: string_byref_const - DCHECK(!failedUrl.empty()); - if (failedUrl.empty()) - return; - // Unverified params: errorText - - // Execute - struct_->on_load_error(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - errorCode, - errorText.GetStruct(), - failedUrl.GetStruct()); -} - -void CefLoadHandlerCToCpp::OnRenderProcessTerminated( - CefRefPtr browser, TerminationStatus status) { - if (CEF_MEMBER_MISSING(struct_, on_render_process_terminated)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_render_process_terminated(struct_, - CefBrowserCppToC::Wrap(browser), - status); -} - -void CefLoadHandlerCToCpp::OnPluginCrashed(CefRefPtr browser, - const CefString& plugin_path) { - if (CEF_MEMBER_MISSING(struct_, on_plugin_crashed)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: plugin_path; type: string_byref_const - DCHECK(!plugin_path.empty()); - if (plugin_path.empty()) - return; - - // Execute - struct_->on_plugin_crashed(struct_, - CefBrowserCppToC::Wrap(browser), - plugin_path.GetStruct()); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/load_handler_ctocpp.h b/cef/libcef_dll/ctocpp/load_handler_ctocpp.h deleted file mode 100644 index 4d7515913..000000000 --- a/cef/libcef_dll/ctocpp/load_handler_ctocpp.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_load_handler.h" -#include "include/capi/cef_load_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefLoadHandlerCToCpp - : public CefCToCpp { - public: - explicit CefLoadHandlerCToCpp(cef_load_handler_t* str) - : CefCToCpp( - str) {} - virtual ~CefLoadHandlerCToCpp() {} - - // CefLoadHandler methods - virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame) OVERRIDE; - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, int httpStatusCode) OVERRIDE; - virtual void OnLoadError(CefRefPtr browser, - CefRefPtr frame, ErrorCode errorCode, - const CefString& errorText, const CefString& failedUrl) OVERRIDE; - virtual void OnRenderProcessTerminated(CefRefPtr browser, - TerminationStatus status) OVERRIDE; - virtual void OnPluginCrashed(CefRefPtr browser, - const CefString& plugin_path) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc b/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc deleted file mode 100644 index 8714af8d9..000000000 --- a/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc +++ /dev/null @@ -1,839 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/menu_model_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefMenuModelCToCpp::Clear() { - if (CEF_MEMBER_MISSING(struct_, clear)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->clear(struct_); - - // Return type: bool - return _retval?true:false; -} - -int CefMenuModelCToCpp::GetCount() { - if (CEF_MEMBER_MISSING(struct_, get_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_count(struct_); - - // Return type: simple - return _retval; -} - -bool CefMenuModelCToCpp::AddSeparator() { - if (CEF_MEMBER_MISSING(struct_, add_separator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->add_separator(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::AddItem(int command_id, const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, add_item)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->add_item(struct_, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::AddCheckItem(int command_id, const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, add_check_item)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->add_check_item(struct_, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::AddRadioItem(int command_id, const CefString& label, - int group_id) { - if (CEF_MEMBER_MISSING(struct_, add_radio_item)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->add_radio_item(struct_, - command_id, - label.GetStruct(), - group_id); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefMenuModelCToCpp::AddSubMenu(int command_id, - const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, add_sub_menu)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return NULL; - - // Execute - cef_menu_model_t* _retval = struct_->add_sub_menu(struct_, - command_id, - label.GetStruct()); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -bool CefMenuModelCToCpp::InsertSeparatorAt(int index) { - if (CEF_MEMBER_MISSING(struct_, insert_separator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->insert_separator_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::InsertItemAt(int index, int command_id, - const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, insert_item_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->insert_item_at(struct_, - index, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::InsertCheckItemAt(int index, int command_id, - const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, insert_check_item_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->insert_check_item_at(struct_, - index, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::InsertRadioItemAt(int index, int command_id, - const CefString& label, int group_id) { - if (CEF_MEMBER_MISSING(struct_, insert_radio_item_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->insert_radio_item_at(struct_, - index, - command_id, - label.GetStruct(), - group_id); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefMenuModelCToCpp::InsertSubMenuAt(int index, - int command_id, const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, insert_sub_menu_at)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return NULL; - - // Execute - cef_menu_model_t* _retval = struct_->insert_sub_menu_at(struct_, - index, - command_id, - label.GetStruct()); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -bool CefMenuModelCToCpp::Remove(int command_id) { - if (CEF_MEMBER_MISSING(struct_, remove)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->remove(struct_, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::RemoveAt(int index) { - if (CEF_MEMBER_MISSING(struct_, remove_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->remove_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -int CefMenuModelCToCpp::GetIndexOf(int command_id) { - if (CEF_MEMBER_MISSING(struct_, get_index_of)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_index_of(struct_, - command_id); - - // Return type: simple - return _retval; -} - -int CefMenuModelCToCpp::GetCommandIdAt(int index) { - if (CEF_MEMBER_MISSING(struct_, get_command_id_at)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_command_id_at(struct_, - index); - - // Return type: simple - return _retval; -} - -bool CefMenuModelCToCpp::SetCommandIdAt(int index, int command_id) { - if (CEF_MEMBER_MISSING(struct_, set_command_id_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_command_id_at(struct_, - index, - command_id); - - // Return type: bool - return _retval?true:false; -} - -CefString CefMenuModelCToCpp::GetLabel(int command_id) { - if (CEF_MEMBER_MISSING(struct_, get_label)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_label(struct_, - command_id); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefMenuModelCToCpp::GetLabelAt(int index) { - if (CEF_MEMBER_MISSING(struct_, get_label_at)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_label_at(struct_, - index); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefMenuModelCToCpp::SetLabel(int command_id, const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, set_label)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->set_label(struct_, - command_id, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetLabelAt(int index, const CefString& label) { - if (CEF_MEMBER_MISSING(struct_, set_label_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: label; type: string_byref_const - DCHECK(!label.empty()); - if (label.empty()) - return false; - - // Execute - int _retval = struct_->set_label_at(struct_, - index, - label.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CefMenuModel::MenuItemType CefMenuModelCToCpp::GetType(int command_id) { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return MENUITEMTYPE_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_item_type_t _retval = struct_->get_type(struct_, - command_id); - - // Return type: simple - return _retval; -} - -CefMenuModel::MenuItemType CefMenuModelCToCpp::GetTypeAt(int index) { - if (CEF_MEMBER_MISSING(struct_, get_type_at)) - return MENUITEMTYPE_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_item_type_t _retval = struct_->get_type_at(struct_, - index); - - // Return type: simple - return _retval; -} - -int CefMenuModelCToCpp::GetGroupId(int command_id) { - if (CEF_MEMBER_MISSING(struct_, get_group_id)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_group_id(struct_, - command_id); - - // Return type: simple - return _retval; -} - -int CefMenuModelCToCpp::GetGroupIdAt(int index) { - if (CEF_MEMBER_MISSING(struct_, get_group_id_at)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_group_id_at(struct_, - index); - - // Return type: simple - return _retval; -} - -bool CefMenuModelCToCpp::SetGroupId(int command_id, int group_id) { - if (CEF_MEMBER_MISSING(struct_, set_group_id)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_group_id(struct_, - command_id, - group_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetGroupIdAt(int index, int group_id) { - if (CEF_MEMBER_MISSING(struct_, set_group_id_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_group_id_at(struct_, - index, - group_id); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefMenuModelCToCpp::GetSubMenu(int command_id) { - if (CEF_MEMBER_MISSING(struct_, get_sub_menu)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_model_t* _retval = struct_->get_sub_menu(struct_, - command_id); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -CefRefPtr CefMenuModelCToCpp::GetSubMenuAt(int index) { - if (CEF_MEMBER_MISSING(struct_, get_sub_menu_at)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_menu_model_t* _retval = struct_->get_sub_menu_at(struct_, - index); - - // Return type: refptr_same - return CefMenuModelCToCpp::Wrap(_retval); -} - -bool CefMenuModelCToCpp::IsVisible(int command_id) { - if (CEF_MEMBER_MISSING(struct_, is_visible)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_visible(struct_, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsVisibleAt(int index) { - if (CEF_MEMBER_MISSING(struct_, is_visible_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_visible_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetVisible(int command_id, bool visible) { - if (CEF_MEMBER_MISSING(struct_, set_visible)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_visible(struct_, - command_id, - visible); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetVisibleAt(int index, bool visible) { - if (CEF_MEMBER_MISSING(struct_, set_visible_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_visible_at(struct_, - index, - visible); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsEnabled(int command_id) { - if (CEF_MEMBER_MISSING(struct_, is_enabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_enabled(struct_, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsEnabledAt(int index) { - if (CEF_MEMBER_MISSING(struct_, is_enabled_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_enabled_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetEnabled(int command_id, bool enabled) { - if (CEF_MEMBER_MISSING(struct_, set_enabled)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_enabled(struct_, - command_id, - enabled); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetEnabledAt(int index, bool enabled) { - if (CEF_MEMBER_MISSING(struct_, set_enabled_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_enabled_at(struct_, - index, - enabled); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsChecked(int command_id) { - if (CEF_MEMBER_MISSING(struct_, is_checked)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_checked(struct_, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::IsCheckedAt(int index) { - if (CEF_MEMBER_MISSING(struct_, is_checked_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_checked_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetChecked(int command_id, bool checked) { - if (CEF_MEMBER_MISSING(struct_, set_checked)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_checked(struct_, - command_id, - checked); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetCheckedAt(int index, bool checked) { - if (CEF_MEMBER_MISSING(struct_, set_checked_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_checked_at(struct_, - index, - checked); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::HasAccelerator(int command_id) { - if (CEF_MEMBER_MISSING(struct_, has_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_accelerator(struct_, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::HasAcceleratorAt(int index) { - if (CEF_MEMBER_MISSING(struct_, has_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_accelerator_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetAccelerator(int command_id, int key_code, - bool shift_pressed, bool ctrl_pressed, bool alt_pressed) { - if (CEF_MEMBER_MISSING(struct_, set_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_accelerator(struct_, - command_id, - key_code, - shift_pressed, - ctrl_pressed, - alt_pressed); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::SetAcceleratorAt(int index, int key_code, - bool shift_pressed, bool ctrl_pressed, bool alt_pressed) { - if (CEF_MEMBER_MISSING(struct_, set_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_accelerator_at(struct_, - index, - key_code, - shift_pressed, - ctrl_pressed, - alt_pressed); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::RemoveAccelerator(int command_id) { - if (CEF_MEMBER_MISSING(struct_, remove_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->remove_accelerator(struct_, - command_id); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::RemoveAcceleratorAt(int index) { - if (CEF_MEMBER_MISSING(struct_, remove_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->remove_accelerator_at(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::GetAccelerator(int command_id, int& key_code, - bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) { - if (CEF_MEMBER_MISSING(struct_, get_accelerator)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: shift_pressed; type: bool_byref - int shift_pressedInt = shift_pressed; - // Translate param: ctrl_pressed; type: bool_byref - int ctrl_pressedInt = ctrl_pressed; - // Translate param: alt_pressed; type: bool_byref - int alt_pressedInt = alt_pressed; - - // Execute - int _retval = struct_->get_accelerator(struct_, - command_id, - &key_code, - &shift_pressedInt, - &ctrl_pressedInt, - &alt_pressedInt); - - // Restore param:shift_pressed; type: bool_byref - shift_pressed = shift_pressedInt?true:false; - // Restore param:ctrl_pressed; type: bool_byref - ctrl_pressed = ctrl_pressedInt?true:false; - // Restore param:alt_pressed; type: bool_byref - alt_pressed = alt_pressedInt?true:false; - - // Return type: bool - return _retval?true:false; -} - -bool CefMenuModelCToCpp::GetAcceleratorAt(int index, int& key_code, - bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) { - if (CEF_MEMBER_MISSING(struct_, get_accelerator_at)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: shift_pressed; type: bool_byref - int shift_pressedInt = shift_pressed; - // Translate param: ctrl_pressed; type: bool_byref - int ctrl_pressedInt = ctrl_pressed; - // Translate param: alt_pressed; type: bool_byref - int alt_pressedInt = alt_pressed; - - // Execute - int _retval = struct_->get_accelerator_at(struct_, - index, - &key_code, - &shift_pressedInt, - &ctrl_pressedInt, - &alt_pressedInt); - - // Restore param:shift_pressed; type: bool_byref - shift_pressed = shift_pressedInt?true:false; - // Restore param:ctrl_pressed; type: bool_byref - ctrl_pressed = ctrl_pressedInt?true:false; - // Restore param:alt_pressed; type: bool_byref - alt_pressed = alt_pressedInt?true:false; - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/menu_model_ctocpp.h b/cef/libcef_dll/ctocpp/menu_model_ctocpp.h deleted file mode 100644 index ce76b5dd4..000000000 --- a/cef/libcef_dll/ctocpp/menu_model_ctocpp.h +++ /dev/null @@ -1,98 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_menu_model.h" -#include "include/capi/cef_menu_model_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefMenuModelCToCpp - : public CefCToCpp { - public: - explicit CefMenuModelCToCpp(cef_menu_model_t* str) - : CefCToCpp(str) {} - virtual ~CefMenuModelCToCpp() {} - - // CefMenuModel methods - virtual bool Clear() OVERRIDE; - virtual int GetCount() OVERRIDE; - virtual bool AddSeparator() OVERRIDE; - virtual bool AddItem(int command_id, const CefString& label) OVERRIDE; - virtual bool AddCheckItem(int command_id, const CefString& label) OVERRIDE; - virtual bool AddRadioItem(int command_id, const CefString& label, - int group_id) OVERRIDE; - virtual CefRefPtr AddSubMenu(int command_id, - const CefString& label) OVERRIDE; - virtual bool InsertSeparatorAt(int index) OVERRIDE; - virtual bool InsertItemAt(int index, int command_id, - const CefString& label) OVERRIDE; - virtual bool InsertCheckItemAt(int index, int command_id, - const CefString& label) OVERRIDE; - virtual bool InsertRadioItemAt(int index, int command_id, - const CefString& label, int group_id) OVERRIDE; - virtual CefRefPtr InsertSubMenuAt(int index, int command_id, - const CefString& label) OVERRIDE; - virtual bool Remove(int command_id) OVERRIDE; - virtual bool RemoveAt(int index) OVERRIDE; - virtual int GetIndexOf(int command_id) OVERRIDE; - virtual int GetCommandIdAt(int index) OVERRIDE; - virtual bool SetCommandIdAt(int index, int command_id) OVERRIDE; - virtual CefString GetLabel(int command_id) OVERRIDE; - virtual CefString GetLabelAt(int index) OVERRIDE; - virtual bool SetLabel(int command_id, const CefString& label) OVERRIDE; - virtual bool SetLabelAt(int index, const CefString& label) OVERRIDE; - virtual MenuItemType GetType(int command_id) OVERRIDE; - virtual MenuItemType GetTypeAt(int index) OVERRIDE; - virtual int GetGroupId(int command_id) OVERRIDE; - virtual int GetGroupIdAt(int index) OVERRIDE; - virtual bool SetGroupId(int command_id, int group_id) OVERRIDE; - virtual bool SetGroupIdAt(int index, int group_id) OVERRIDE; - virtual CefRefPtr GetSubMenu(int command_id) OVERRIDE; - virtual CefRefPtr GetSubMenuAt(int index) OVERRIDE; - virtual bool IsVisible(int command_id) OVERRIDE; - virtual bool IsVisibleAt(int index) OVERRIDE; - virtual bool SetVisible(int command_id, bool visible) OVERRIDE; - virtual bool SetVisibleAt(int index, bool visible) OVERRIDE; - virtual bool IsEnabled(int command_id) OVERRIDE; - virtual bool IsEnabledAt(int index) OVERRIDE; - virtual bool SetEnabled(int command_id, bool enabled) OVERRIDE; - virtual bool SetEnabledAt(int index, bool enabled) OVERRIDE; - virtual bool IsChecked(int command_id) OVERRIDE; - virtual bool IsCheckedAt(int index) OVERRIDE; - virtual bool SetChecked(int command_id, bool checked) OVERRIDE; - virtual bool SetCheckedAt(int index, bool checked) OVERRIDE; - virtual bool HasAccelerator(int command_id) OVERRIDE; - virtual bool HasAcceleratorAt(int index) OVERRIDE; - virtual bool SetAccelerator(int command_id, int key_code, bool shift_pressed, - bool ctrl_pressed, bool alt_pressed) OVERRIDE; - virtual bool SetAcceleratorAt(int index, int key_code, bool shift_pressed, - bool ctrl_pressed, bool alt_pressed) OVERRIDE; - virtual bool RemoveAccelerator(int command_id) OVERRIDE; - virtual bool RemoveAcceleratorAt(int index) OVERRIDE; - virtual bool GetAccelerator(int command_id, int& key_code, - bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; - virtual bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed, - bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/permission_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/permission_handler_ctocpp.cc deleted file mode 100644 index 700e91b39..000000000 --- a/cef/libcef_dll/ctocpp/permission_handler_ctocpp.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/ctocpp/permission_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefPermissionHandlerCToCpp::OnBeforeScriptExtensionLoad( - CefRefPtr browser, CefRefPtr frame, - const CefString& extensionName) { - if (CEF_MEMBER_MISSING(struct_, on_before_script_extension_load)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return false; - // Verify param: extensionName; type: string_byref_const - DCHECK(!extensionName.empty()); - if (extensionName.empty()) - return false; - - // Execute - int _retval = struct_->on_before_script_extension_load(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - extensionName.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/permission_handler_ctocpp.h b/cef/libcef_dll/ctocpp/permission_handler_ctocpp.h deleted file mode 100644 index 0bffa2a81..000000000 --- a/cef/libcef_dll/ctocpp/permission_handler_ctocpp.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PERMISSION_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PERMISSION_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_permission_handler.h" -#include "include/capi/cef_permission_handler_capi.h" -#include "include/cef_browser.h" -#include "include/capi/cef_browser_capi.h" -#include "include/cef_frame.h" -#include "include/capi/cef_frame_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefPermissionHandlerCToCpp - : public CefCToCpp { - public: - explicit CefPermissionHandlerCToCpp(cef_permission_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefPermissionHandlerCToCpp() {} - - // CefPermissionHandler methods - virtual bool OnBeforeScriptExtensionLoad(CefRefPtr browser, - CefRefPtr frame, const CefString& extensionName) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PERMISSION_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/post_data_ctocpp.cc b/cef/libcef_dll/ctocpp/post_data_ctocpp.cc deleted file mode 100644 index a5dfd3727..000000000 --- a/cef/libcef_dll/ctocpp/post_data_ctocpp.cc +++ /dev/null @@ -1,149 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/post_data_ctocpp.h" -#include "libcef_dll/ctocpp/post_data_element_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefPostData::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_post_data_t* _retval = cef_post_data_create(); - - // Return type: refptr_same - return CefPostDataCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefPostDataCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -size_t CefPostDataCToCpp::GetElementCount() { - if (CEF_MEMBER_MISSING(struct_, get_element_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_element_count(struct_); - - // Return type: simple - return _retval; -} - -void CefPostDataCToCpp::GetElements(ElementVector& elements) { - if (CEF_MEMBER_MISSING(struct_, get_elements)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: elements; type: refptr_vec_same_byref - size_t elementsSize = elements.size(); - size_t elementsCount = std::max(GetElementCount(), elementsSize); - cef_post_data_element_t** elementsList = NULL; - if (elementsCount > 0) { - elementsList = new cef_post_data_element_t*[elementsCount]; - DCHECK(elementsList); - if (elementsList) { - memset(elementsList, 0, sizeof(cef_post_data_element_t*)*elementsCount); - } - if (elementsList && elementsSize > 0) { - for (size_t i = 0; i < elementsSize; ++i) { - elementsList[i] = CefPostDataElementCToCpp::Unwrap(elements[i]); - } - } - } - - // Execute - struct_->get_elements(struct_, - &elementsCount, - elementsList); - - // Restore param:elements; type: refptr_vec_same_byref - elements.clear(); - if (elementsCount > 0 && elementsList) { - for (size_t i = 0; i < elementsCount; ++i) { - elements.push_back(CefPostDataElementCToCpp::Wrap(elementsList[i])); - } - delete [] elementsList; - } -} - -bool CefPostDataCToCpp::RemoveElement(CefRefPtr element) { - if (CEF_MEMBER_MISSING(struct_, remove_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: element; type: refptr_same - DCHECK(element.get()); - if (!element.get()) - return false; - - // Execute - int _retval = struct_->remove_element(struct_, - CefPostDataElementCToCpp::Unwrap(element)); - - // Return type: bool - return _retval?true:false; -} - -bool CefPostDataCToCpp::AddElement(CefRefPtr element) { - if (CEF_MEMBER_MISSING(struct_, add_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: element; type: refptr_same - DCHECK(element.get()); - if (!element.get()) - return false; - - // Execute - int _retval = struct_->add_element(struct_, - CefPostDataElementCToCpp::Unwrap(element)); - - // Return type: bool - return _retval?true:false; -} - -void CefPostDataCToCpp::RemoveElements() { - if (CEF_MEMBER_MISSING(struct_, remove_elements)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->remove_elements(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/post_data_ctocpp.h b/cef/libcef_dll/ctocpp/post_data_ctocpp.h deleted file mode 100644 index 7f66f8e7c..000000000 --- a/cef/libcef_dll/ctocpp/post_data_ctocpp.h +++ /dev/null @@ -1,45 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPostDataCToCpp - : public CefCToCpp { - public: - explicit CefPostDataCToCpp(cef_post_data_t* str) - : CefCToCpp(str) {} - virtual ~CefPostDataCToCpp() {} - - // CefPostData methods - virtual bool IsReadOnly() OVERRIDE; - virtual size_t GetElementCount() OVERRIDE; - virtual void GetElements(ElementVector& elements) OVERRIDE; - virtual bool RemoveElement(CefRefPtr element) OVERRIDE; - virtual bool AddElement(CefRefPtr element) OVERRIDE; - virtual void RemoveElements() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc b/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc deleted file mode 100644 index 3cc117bbd..000000000 --- a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc +++ /dev/null @@ -1,153 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/post_data_element_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefPostDataElement::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_post_data_element_t* _retval = cef_post_data_element_create(); - - // Return type: refptr_same - return CefPostDataElementCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefPostDataElementCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -void CefPostDataElementCToCpp::SetToEmpty() { - if (CEF_MEMBER_MISSING(struct_, set_to_empty)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->set_to_empty(struct_); -} - -void CefPostDataElementCToCpp::SetToFile(const CefString& fileName) { - if (CEF_MEMBER_MISSING(struct_, set_to_file)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return; - - // Execute - struct_->set_to_file(struct_, - fileName.GetStruct()); -} - -void CefPostDataElementCToCpp::SetToBytes(size_t size, const void* bytes) { - if (CEF_MEMBER_MISSING(struct_, set_to_bytes)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: bytes; type: simple_byaddr - DCHECK(bytes); - if (!bytes) - return; - - // Execute - struct_->set_to_bytes(struct_, - size, - bytes); -} - -CefPostDataElement::Type CefPostDataElementCToCpp::GetType() { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return PDE_TYPE_EMPTY; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_postdataelement_type_t _retval = struct_->get_type(struct_); - - // Return type: simple - return _retval; -} - -CefString CefPostDataElementCToCpp::GetFile() { - if (CEF_MEMBER_MISSING(struct_, get_file)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_file(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -size_t CefPostDataElementCToCpp::GetBytesCount() { - if (CEF_MEMBER_MISSING(struct_, get_bytes_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_bytes_count(struct_); - - // Return type: simple - return _retval; -} - -size_t CefPostDataElementCToCpp::GetBytes(size_t size, void* bytes) { - if (CEF_MEMBER_MISSING(struct_, get_bytes)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: bytes; type: simple_byaddr - DCHECK(bytes); - if (!bytes) - return 0; - - // Execute - size_t _retval = struct_->get_bytes(struct_, - size, - bytes); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h b/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h deleted file mode 100644 index 932a2aac9..000000000 --- a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h +++ /dev/null @@ -1,49 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefPostDataElementCToCpp - : public CefCToCpp { - public: - explicit CefPostDataElementCToCpp(cef_post_data_element_t* str) - : CefCToCpp(str) {} - virtual ~CefPostDataElementCToCpp() {} - - // CefPostDataElement methods - virtual bool IsReadOnly() OVERRIDE; - virtual void SetToEmpty() OVERRIDE; - virtual void SetToFile(const CefString& fileName) OVERRIDE; - virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE; - virtual Type GetType() OVERRIDE; - virtual CefString GetFile() OVERRIDE; - virtual size_t GetBytesCount() OVERRIDE; - virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/process_message_ctocpp.cc b/cef/libcef_dll/ctocpp/process_message_ctocpp.cc deleted file mode 100644 index 38a0f1643..000000000 --- a/cef/libcef_dll/ctocpp/process_message_ctocpp.cc +++ /dev/null @@ -1,110 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefProcessMessage::Create(const CefString& name) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - - // Execute - cef_process_message_t* _retval = cef_process_message_create( - name.GetStruct()); - - // Return type: refptr_same - return CefProcessMessageCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefProcessMessageCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefProcessMessageCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefProcessMessageCToCpp::Copy() { - if (CEF_MEMBER_MISSING(struct_, copy)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_process_message_t* _retval = struct_->copy(struct_); - - // Return type: refptr_same - return CefProcessMessageCToCpp::Wrap(_retval); -} - -CefString CefProcessMessageCToCpp::GetName() { - if (CEF_MEMBER_MISSING(struct_, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefProcessMessageCToCpp::GetArgumentList() { - if (CEF_MEMBER_MISSING(struct_, get_argument_list)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_list_value_t* _retval = struct_->get_argument_list(struct_); - - // Return type: refptr_same - return CefListValueCToCpp::Wrap(_retval); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/process_message_ctocpp.h b/cef/libcef_dll/ctocpp/process_message_ctocpp.h deleted file mode 100644 index 6df657fe9..000000000 --- a/cef/libcef_dll/ctocpp/process_message_ctocpp.h +++ /dev/null @@ -1,46 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_process_message.h" -#include "include/capi/cef_process_message_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefProcessMessageCToCpp - : public CefCToCpp { - public: - explicit CefProcessMessageCToCpp(cef_process_message_t* str) - : CefCToCpp(str) {} - virtual ~CefProcessMessageCToCpp() {} - - // CefProcessMessage methods - virtual bool IsValid() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual CefRefPtr GetArgumentList() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/proxy_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/proxy_handler_ctocpp.cc deleted file mode 100644 index bdb490cea..000000000 --- a/cef/libcef_dll/ctocpp/proxy_handler_ctocpp.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/proxy_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefProxyHandlerCToCpp::GetProxyForUrl(const CefString& url, - CefProxyInfo& proxy_info) { - if (CEF_MEMBER_MISSING(struct_, get_proxy_for_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - struct_->get_proxy_for_url(struct_, - url.GetStruct(), - &proxy_info); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/proxy_handler_ctocpp.h b/cef/libcef_dll/ctocpp/proxy_handler_ctocpp.h deleted file mode 100644 index bf37ee4cd..000000000 --- a/cef/libcef_dll/ctocpp/proxy_handler_ctocpp.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_PROXY_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_PROXY_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_proxy_handler.h" -#include "include/capi/cef_proxy_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefProxyHandlerCToCpp - : public CefCToCpp { - public: - explicit CefProxyHandlerCToCpp(cef_proxy_handler_t* str) - : CefCToCpp( - str) {} - virtual ~CefProxyHandlerCToCpp() {} - - // CefProxyHandler methods - virtual void GetProxyForUrl(const CefString& url, - CefProxyInfo& proxy_info) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_PROXY_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/quota_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/quota_callback_ctocpp.cc deleted file mode 100644 index 06ed1b9d9..000000000 --- a/cef/libcef_dll/ctocpp/quota_callback_ctocpp.cc +++ /dev/null @@ -1,44 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/quota_callback_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefQuotaCallbackCToCpp::Continue(bool allow) { - if (CEF_MEMBER_MISSING(struct_, cont)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cont(struct_, - allow); -} - -void CefQuotaCallbackCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/quota_callback_ctocpp.h b/cef/libcef_dll/ctocpp/quota_callback_ctocpp.h deleted file mode 100644 index f59c1ef6a..000000000 --- a/cef/libcef_dll/ctocpp/quota_callback_ctocpp.h +++ /dev/null @@ -1,43 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefQuotaCallbackCToCpp - : public CefCToCpp { - public: - explicit CefQuotaCallbackCToCpp(cef_quota_callback_t* str) - : CefCToCpp(str) {} - virtual ~CefQuotaCallbackCToCpp() {} - - // CefQuotaCallback methods - virtual void Continue(bool allow) OVERRIDE; - virtual void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc deleted file mode 100644 index 483b8699f..000000000 --- a/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/read_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -size_t CefReadHandlerCToCpp::Read(void* ptr, size_t size, size_t n) { - if (CEF_MEMBER_MISSING(struct_, read)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = struct_->read(struct_, - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CefReadHandlerCToCpp::Seek(int64 offset, int whence) { - if (CEF_MEMBER_MISSING(struct_, seek)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->seek(struct_, - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CefReadHandlerCToCpp::Tell() { - if (CEF_MEMBER_MISSING(struct_, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->tell(struct_); - - // Return type: simple - return _retval; -} - -int CefReadHandlerCToCpp::Eof() { - if (CEF_MEMBER_MISSING(struct_, eof)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->eof(struct_); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/read_handler_ctocpp.h b/cef/libcef_dll/ctocpp/read_handler_ctocpp.h deleted file mode 100644 index 6e56c44b5..000000000 --- a/cef/libcef_dll/ctocpp/read_handler_ctocpp.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefReadHandlerCToCpp - : public CefCToCpp { - public: - explicit CefReadHandlerCToCpp(cef_read_handler_t* str) - : CefCToCpp( - str) {} - virtual ~CefReadHandlerCToCpp() {} - - // CefReadHandler methods - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc deleted file mode 100644 index 9f0be5cee..000000000 --- a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/domnode_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/process_message_cpptoc.h" -#include "libcef_dll/cpptoc/v8context_cpptoc.h" -#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefRenderProcessHandlerCToCpp::OnRenderThreadCreated() { - if (CEF_MEMBER_MISSING(struct_, on_render_thread_created)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->on_render_thread_created(struct_); -} - -void CefRenderProcessHandlerCToCpp::OnWebKitInitialized() { - if (CEF_MEMBER_MISSING(struct_, on_web_kit_initialized)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->on_web_kit_initialized(struct_); -} - -void CefRenderProcessHandlerCToCpp::OnBrowserCreated( - CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, on_browser_created)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_browser_created(struct_, - CefBrowserCppToC::Wrap(browser)); -} - -void CefRenderProcessHandlerCToCpp::OnBrowserDestroyed( - CefRefPtr browser) { - if (CEF_MEMBER_MISSING(struct_, on_browser_destroyed)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - - // Execute - struct_->on_browser_destroyed(struct_, - CefBrowserCppToC::Wrap(browser)); -} - -void CefRenderProcessHandlerCToCpp::OnContextCreated( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr context) { - if (CEF_MEMBER_MISSING(struct_, on_context_created)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - // Verify param: context; type: refptr_diff - DCHECK(context.get()); - if (!context.get()) - return; - - // Execute - struct_->on_context_created(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefV8ContextCppToC::Wrap(context)); -} - -void CefRenderProcessHandlerCToCpp::OnContextReleased( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr context) { - if (CEF_MEMBER_MISSING(struct_, on_context_released)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - // Verify param: context; type: refptr_diff - DCHECK(context.get()); - if (!context.get()) - return; - - // Execute - struct_->on_context_released(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefV8ContextCppToC::Wrap(context)); -} - -void CefRenderProcessHandlerCToCpp::OnFocusedNodeChanged( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr node) { - if (CEF_MEMBER_MISSING(struct_, on_focused_node_changed)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Unverified params: frame, node - - // Execute - struct_->on_focused_node_changed(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefDOMNodeCppToC::Wrap(node)); -} - -bool CefRenderProcessHandlerCToCpp::OnProcessMessageReceived( - CefRefPtr browser, CefProcessId source_process, - CefRefPtr message) { - if (CEF_MEMBER_MISSING(struct_, on_process_message_received)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: message; type: refptr_diff - DCHECK(message.get()); - if (!message.get()) - return false; - - // Execute - int _retval = struct_->on_process_message_received(struct_, - CefBrowserCppToC::Wrap(browser), - source_process, - CefProcessMessageCppToC::Wrap(message)); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h b/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h deleted file mode 100644 index d488a81b6..000000000 --- a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_render_process_handler.h" -#include "include/capi/cef_render_process_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefRenderProcessHandlerCToCpp - : public CefCToCpp { - public: - explicit CefRenderProcessHandlerCToCpp(cef_render_process_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefRenderProcessHandlerCToCpp() {} - - // CefRenderProcessHandler methods - virtual void OnRenderThreadCreated() OVERRIDE; - virtual void OnWebKitInitialized() OVERRIDE; - virtual void OnBrowserCreated(CefRefPtr browser) OVERRIDE; - virtual void OnBrowserDestroyed(CefRefPtr browser) OVERRIDE; - virtual void OnContextCreated(CefRefPtr browser, - CefRefPtr frame, CefRefPtr context) OVERRIDE; - virtual void OnContextReleased(CefRefPtr browser, - CefRefPtr frame, CefRefPtr context) OVERRIDE; - virtual void OnFocusedNodeChanged(CefRefPtr browser, - CefRefPtr frame, CefRefPtr node) OVERRIDE; - virtual bool OnProcessMessageReceived(CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/request_ctocpp.cc b/cef/libcef_dll/ctocpp/request_ctocpp.cc deleted file mode 100644 index 4921e3f2d..000000000 --- a/cef/libcef_dll/ctocpp/request_ctocpp.cc +++ /dev/null @@ -1,277 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/post_data_ctocpp.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefRequest::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_t* _retval = cef_request_create(); - - // Return type: refptr_same - return CefRequestCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefRequestCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefRequestCToCpp::GetURL() { - if (CEF_MEMBER_MISSING(struct_, get_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_url(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefRequestCToCpp::SetURL(const CefString& url) { - if (CEF_MEMBER_MISSING(struct_, set_url)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - struct_->set_url(struct_, - url.GetStruct()); -} - -CefString CefRequestCToCpp::GetMethod() { - if (CEF_MEMBER_MISSING(struct_, get_method)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_method(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefRequestCToCpp::SetMethod(const CefString& method) { - if (CEF_MEMBER_MISSING(struct_, set_method)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: method; type: string_byref_const - DCHECK(!method.empty()); - if (method.empty()) - return; - - // Execute - struct_->set_method(struct_, - method.GetStruct()); -} - -CefRefPtr CefRequestCToCpp::GetPostData() { - if (CEF_MEMBER_MISSING(struct_, get_post_data)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_post_data_t* _retval = struct_->get_post_data(struct_); - - // Return type: refptr_same - return CefPostDataCToCpp::Wrap(_retval); -} - -void CefRequestCToCpp::SetPostData(CefRefPtr postData) { - if (CEF_MEMBER_MISSING(struct_, set_post_data)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: postData; type: refptr_same - DCHECK(postData.get()); - if (!postData.get()) - return; - - // Execute - struct_->set_post_data(struct_, - CefPostDataCToCpp::Unwrap(postData)); -} - -void CefRequestCToCpp::GetHeaderMap(HeaderMap& headerMap) { - if (CEF_MEMBER_MISSING(struct_, get_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - struct_->get_header_map(struct_, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref - if (headerMapMultimap) { - headerMap.clear(); - transfer_string_multimap_contents(headerMapMultimap, headerMap); - cef_string_multimap_free(headerMapMultimap); - } -} - -void CefRequestCToCpp::SetHeaderMap(const HeaderMap& headerMap) { - if (CEF_MEMBER_MISSING(struct_, set_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref_const - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - struct_->set_header_map(struct_, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref_const - if (headerMapMultimap) - cef_string_multimap_free(headerMapMultimap); -} - -void CefRequestCToCpp::Set(const CefString& url, const CefString& method, - CefRefPtr postData, const HeaderMap& headerMap) { - if (CEF_MEMBER_MISSING(struct_, set)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - // Verify param: method; type: string_byref_const - DCHECK(!method.empty()); - if (method.empty()) - return; - // Unverified params: postData - - // Translate param: headerMap; type: string_map_multi_byref_const - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - struct_->set(struct_, - url.GetStruct(), - method.GetStruct(), - CefPostDataCToCpp::Unwrap(postData), - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref_const - if (headerMapMultimap) - cef_string_multimap_free(headerMapMultimap); -} - -int CefRequestCToCpp::GetFlags() { - if (CEF_MEMBER_MISSING(struct_, get_flags)) - return UR_FLAG_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_flags(struct_); - - // Return type: simple - return _retval; -} - -void CefRequestCToCpp::SetFlags(int flags) { - if (CEF_MEMBER_MISSING(struct_, set_flags)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->set_flags(struct_, - flags); -} - -CefString CefRequestCToCpp::GetFirstPartyForCookies() { - if (CEF_MEMBER_MISSING(struct_, get_first_party_for_cookies)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_first_party_for_cookies(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefRequestCToCpp::SetFirstPartyForCookies(const CefString& url) { - if (CEF_MEMBER_MISSING(struct_, set_first_party_for_cookies)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Execute - struct_->set_first_party_for_cookies(struct_, - url.GetStruct()); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/request_ctocpp.h b/cef/libcef_dll/ctocpp/request_ctocpp.h deleted file mode 100644 index 5f70cb282..000000000 --- a/cef/libcef_dll/ctocpp/request_ctocpp.h +++ /dev/null @@ -1,54 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_request.h" -#include "include/capi/cef_request_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefRequestCToCpp - : public CefCToCpp { - public: - explicit CefRequestCToCpp(cef_request_t* str) - : CefCToCpp(str) {} - virtual ~CefRequestCToCpp() {} - - // CefRequest methods - virtual bool IsReadOnly() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual void SetURL(const CefString& url) OVERRIDE; - virtual CefString GetMethod() OVERRIDE; - virtual void SetMethod(const CefString& method) OVERRIDE; - virtual CefRefPtr GetPostData() OVERRIDE; - virtual void SetPostData(CefRefPtr postData) OVERRIDE; - virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; - virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; - virtual void Set(const CefString& url, const CefString& method, - CefRefPtr postData, const HeaderMap& headerMap) OVERRIDE; - virtual int GetFlags() OVERRIDE; - virtual void SetFlags(int flags) OVERRIDE; - virtual CefString GetFirstPartyForCookies() OVERRIDE; - virtual void SetFirstPartyForCookies(const CefString& url) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc deleted file mode 100644 index 14dadcbd1..000000000 --- a/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/auth_callback_cpptoc.h" -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/request_cpptoc.h" -#include "libcef_dll/ctocpp/request_handler_ctocpp.h" -#include "libcef_dll/ctocpp/resource_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefRequestHandlerCToCpp::OnBeforeResourceLoad( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr request) { - if (CEF_MEMBER_MISSING(struct_, on_before_resource_load)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return false; - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return false; - - // Execute - int _retval = struct_->on_before_resource_load(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefRequestCppToC::Wrap(request)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefRequestHandlerCToCpp::GetResourceHandler( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr request) { - if (CEF_MEMBER_MISSING(struct_, get_resource_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return NULL; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return NULL; - - // Execute - cef_resource_handler_t* _retval = struct_->get_resource_handler(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - CefRequestCppToC::Wrap(request)); - - // Return type: refptr_same - return CefResourceHandlerCToCpp::Wrap(_retval); -} - -void CefRequestHandlerCToCpp::OnResourceRedirect(CefRefPtr browser, - CefRefPtr frame, const CefString& old_url, CefString& new_url) { - if (CEF_MEMBER_MISSING(struct_, on_resource_redirect)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return; - // Verify param: old_url; type: string_byref_const - DCHECK(!old_url.empty()); - if (old_url.empty()) - return; - - // Execute - struct_->on_resource_redirect(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - old_url.GetStruct(), - new_url.GetWritableStruct()); -} - -bool CefRequestHandlerCToCpp::GetAuthCredentials(CefRefPtr browser, - CefRefPtr frame, bool isProxy, const CefString& host, int port, - const CefString& realm, const CefString& scheme, - CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, get_auth_credentials)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return false; - // Verify param: frame; type: refptr_diff - DCHECK(frame.get()); - if (!frame.get()) - return false; - // Verify param: host; type: string_byref_const - DCHECK(!host.empty()); - if (host.empty()) - return false; - // Verify param: scheme; type: string_byref_const - DCHECK(!scheme.empty()); - if (scheme.empty()) - return false; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - // Unverified params: realm - - // Execute - int _retval = struct_->get_auth_credentials(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - isProxy, - host.GetStruct(), - port, - realm.GetStruct(), - scheme.GetStruct(), - CefAuthCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefRequestHandlerCToCpp::GetCookieManager( - CefRefPtr browser, const CefString& main_url) { - if (CEF_MEMBER_MISSING(struct_, get_cookie_manager)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return NULL; - // Verify param: main_url; type: string_byref_const - DCHECK(!main_url.empty()); - if (main_url.empty()) - return NULL; - - // Execute - cef_cookie_manager_t* _retval = struct_->get_cookie_manager(struct_, - CefBrowserCppToC::Wrap(browser), - main_url.GetStruct()); - - // Return type: refptr_diff - return CefCookieManagerCppToC::Unwrap(_retval); -} - -void CefRequestHandlerCToCpp::OnProtocolExecution(CefRefPtr browser, - const CefString& url, bool& allow_os_execution) { - if (CEF_MEMBER_MISSING(struct_, on_protocol_execution)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: browser; type: refptr_diff - DCHECK(browser.get()); - if (!browser.get()) - return; - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return; - - // Translate param: allow_os_execution; type: bool_byref - int allow_os_executionInt = allow_os_execution; - - // Execute - struct_->on_protocol_execution(struct_, - CefBrowserCppToC::Wrap(browser), - url.GetStruct(), - &allow_os_executionInt); - - // Restore param:allow_os_execution; type: bool_byref - allow_os_execution = allow_os_executionInt?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/request_handler_ctocpp.h b/cef/libcef_dll/ctocpp/request_handler_ctocpp.h deleted file mode 100644 index 84ff8afc4..000000000 --- a/cef/libcef_dll/ctocpp/request_handler_ctocpp.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_request_handler.h" -#include "include/capi/cef_request_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefRequestHandlerCToCpp - : public CefCToCpp { - public: - explicit CefRequestHandlerCToCpp(cef_request_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefRequestHandlerCToCpp() {} - - // CefRequestHandler methods - virtual bool OnBeforeResourceLoad(CefRefPtr browser, - CefRefPtr frame, CefRefPtr request) OVERRIDE; - virtual CefRefPtr GetResourceHandler( - CefRefPtr browser, CefRefPtr frame, - CefRefPtr request) OVERRIDE; - virtual void OnResourceRedirect(CefRefPtr browser, - CefRefPtr frame, const CefString& old_url, - CefString& new_url) OVERRIDE; - virtual bool GetAuthCredentials(CefRefPtr browser, - CefRefPtr frame, bool isProxy, const CefString& host, int port, - const CefString& realm, const CefString& scheme, - CefRefPtr callback) OVERRIDE; - virtual CefRefPtr GetCookieManager( - CefRefPtr browser, const CefString& main_url) OVERRIDE; - virtual void OnProtocolExecution(CefRefPtr browser, - const CefString& url, bool& allow_os_execution) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc deleted file mode 100644 index 27e996570..000000000 --- a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefResourceBundleHandlerCToCpp::GetLocalizedString(int message_id, - CefString& string) { - if (CEF_MEMBER_MISSING(struct_, get_localized_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_localized_string(struct_, - message_id, - string.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefResourceBundleHandlerCToCpp::GetDataResource(int resource_id, - void*& data, size_t& data_size) { - if (CEF_MEMBER_MISSING(struct_, get_data_resource)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_data_resource(struct_, - resource_id, - &data, - &data_size); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h b/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h deleted file mode 100644 index 73279e7fc..000000000 --- a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_resource_bundle_handler.h" -#include "include/capi/cef_resource_bundle_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefResourceBundleHandlerCToCpp - : public CefCToCpp { - public: - explicit CefResourceBundleHandlerCToCpp(cef_resource_bundle_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefResourceBundleHandlerCToCpp() {} - - // CefResourceBundleHandler methods - virtual bool GetLocalizedString(int message_id, CefString& string) OVERRIDE; - virtual bool GetDataResource(int resource_id, void*& data, - size_t& data_size) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc deleted file mode 100644 index 6b4444a24..000000000 --- a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/callback_cpptoc.h" -#include "libcef_dll/cpptoc/request_cpptoc.h" -#include "libcef_dll/cpptoc/response_cpptoc.h" -#include "libcef_dll/ctocpp/resource_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefResourceHandlerCToCpp::ProcessRequest(CefRefPtr request, - CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, process_request)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return false; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - - // Execute - int _retval = struct_->process_request(struct_, - CefRequestCppToC::Wrap(request), - CefCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -void CefResourceHandlerCToCpp::GetResponseHeaders( - CefRefPtr response, int64& response_length, - CefString& redirectUrl) { - if (CEF_MEMBER_MISSING(struct_, get_response_headers)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: response; type: refptr_diff - DCHECK(response.get()); - if (!response.get()) - return; - - // Execute - struct_->get_response_headers(struct_, - CefResponseCppToC::Wrap(response), - &response_length, - redirectUrl.GetWritableStruct()); -} - -bool CefResourceHandlerCToCpp::ReadResponse(void* data_out, int bytes_to_read, - int& bytes_read, CefRefPtr callback) { - if (CEF_MEMBER_MISSING(struct_, read_response)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data_out; type: simple_byaddr - DCHECK(data_out); - if (!data_out) - return false; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - - // Execute - int _retval = struct_->read_response(struct_, - data_out, - bytes_to_read, - &bytes_read, - CefCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -bool CefResourceHandlerCToCpp::CanGetCookie(const CefCookie& cookie) { - if (CEF_MEMBER_MISSING(struct_, can_get_cookie)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->can_get_cookie(struct_, - &cookie); - - // Return type: bool - return _retval?true:false; -} - -bool CefResourceHandlerCToCpp::CanSetCookie(const CefCookie& cookie) { - if (CEF_MEMBER_MISSING(struct_, can_set_cookie)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->can_set_cookie(struct_, - &cookie); - - // Return type: bool - return _retval?true:false; -} - -void CefResourceHandlerCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h b/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h deleted file mode 100644 index 018c57f5f..000000000 --- a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_resource_handler.h" -#include "include/capi/cef_resource_handler_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefResourceHandlerCToCpp - : public CefCToCpp { - public: - explicit CefResourceHandlerCToCpp(cef_resource_handler_t* str) - : CefCToCpp(str) {} - virtual ~CefResourceHandlerCToCpp() {} - - // CefResourceHandler methods - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) OVERRIDE; - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, CefString& redirectUrl) OVERRIDE; - virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, - CefRefPtr callback) OVERRIDE; - virtual bool CanGetCookie(const CefCookie& cookie) OVERRIDE; - virtual bool CanSetCookie(const CefCookie& cookie) OVERRIDE; - virtual void Cancel() OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/response_ctocpp.cc b/cef/libcef_dll/ctocpp/response_ctocpp.cc deleted file mode 100644 index a0602d174..000000000 --- a/cef/libcef_dll/ctocpp/response_ctocpp.cc +++ /dev/null @@ -1,202 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/response_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefResponse::Create() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_response_t* _retval = cef_response_create(); - - // Return type: refptr_same - return CefResponseCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefResponseCToCpp::IsReadOnly() { - if (CEF_MEMBER_MISSING(struct_, is_read_only)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_read_only(struct_); - - // Return type: bool - return _retval?true:false; -} - -int CefResponseCToCpp::GetStatus() { - if (CEF_MEMBER_MISSING(struct_, get_status)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_status(struct_); - - // Return type: simple - return _retval; -} - -void CefResponseCToCpp::SetStatus(int status) { - if (CEF_MEMBER_MISSING(struct_, set_status)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->set_status(struct_, - status); -} - -CefString CefResponseCToCpp::GetStatusText() { - if (CEF_MEMBER_MISSING(struct_, get_status_text)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_status_text(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefResponseCToCpp::SetStatusText(const CefString& statusText) { - if (CEF_MEMBER_MISSING(struct_, set_status_text)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: statusText; type: string_byref_const - DCHECK(!statusText.empty()); - if (statusText.empty()) - return; - - // Execute - struct_->set_status_text(struct_, - statusText.GetStruct()); -} - -CefString CefResponseCToCpp::GetMimeType() { - if (CEF_MEMBER_MISSING(struct_, get_mime_type)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_mime_type(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefResponseCToCpp::SetMimeType(const CefString& mimeType) { - if (CEF_MEMBER_MISSING(struct_, set_mime_type)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: mimeType; type: string_byref_const - DCHECK(!mimeType.empty()); - if (mimeType.empty()) - return; - - // Execute - struct_->set_mime_type(struct_, - mimeType.GetStruct()); -} - -CefString CefResponseCToCpp::GetHeader(const CefString& name) { - if (CEF_MEMBER_MISSING(struct_, get_header)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_header(struct_, - name.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -void CefResponseCToCpp::GetHeaderMap(HeaderMap& headerMap) { - if (CEF_MEMBER_MISSING(struct_, get_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - struct_->get_header_map(struct_, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref - if (headerMapMultimap) { - headerMap.clear(); - transfer_string_multimap_contents(headerMapMultimap, headerMap); - cef_string_multimap_free(headerMapMultimap); - } -} - -void CefResponseCToCpp::SetHeaderMap(const HeaderMap& headerMap) { - if (CEF_MEMBER_MISSING(struct_, set_header_map)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: headerMap; type: string_map_multi_byref_const - cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc(); - DCHECK(headerMapMultimap); - if (headerMapMultimap) - transfer_string_multimap_contents(headerMap, headerMapMultimap); - - // Execute - struct_->set_header_map(struct_, - headerMapMultimap); - - // Restore param:headerMap; type: string_map_multi_byref_const - if (headerMapMultimap) - cef_string_multimap_free(headerMapMultimap); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/response_ctocpp.h b/cef/libcef_dll/ctocpp/response_ctocpp.h deleted file mode 100644 index aa4191646..000000000 --- a/cef/libcef_dll/ctocpp/response_ctocpp.h +++ /dev/null @@ -1,49 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_response.h" -#include "include/capi/cef_response_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefResponseCToCpp - : public CefCToCpp { - public: - explicit CefResponseCToCpp(cef_response_t* str) - : CefCToCpp(str) {} - virtual ~CefResponseCToCpp() {} - - // CefResponse methods - virtual bool IsReadOnly() OVERRIDE; - virtual int GetStatus() OVERRIDE; - virtual void SetStatus(int status) OVERRIDE; - virtual CefString GetStatusText() OVERRIDE; - virtual void SetStatusText(const CefString& statusText) OVERRIDE; - virtual CefString GetMimeType() OVERRIDE; - virtual void SetMimeType(const CefString& mimeType) OVERRIDE; - virtual CefString GetHeader(const CefString& name) OVERRIDE; - virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; - virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc b/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc deleted file mode 100644 index 1005c06db..000000000 --- a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/request_cpptoc.h" -#include "libcef_dll/ctocpp/resource_handler_ctocpp.h" -#include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefSchemeHandlerFactoryCToCpp::Create( - CefRefPtr browser, CefRefPtr frame, - const CefString& scheme_name, CefRefPtr request) { - if (CEF_MEMBER_MISSING(struct_, create)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(!scheme_name.empty()); - if (scheme_name.empty()) - return NULL; - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return NULL; - // Unverified params: browser, frame - - // Execute - cef_resource_handler_t* _retval = struct_->create(struct_, - CefBrowserCppToC::Wrap(browser), - CefFrameCppToC::Wrap(frame), - scheme_name.GetStruct(), - CefRequestCppToC::Wrap(request)); - - // Return type: refptr_same - return CefResourceHandlerCToCpp::Wrap(_retval); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h b/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h deleted file mode 100644 index 50a092e3b..000000000 --- a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefSchemeHandlerFactoryCToCpp - : public CefCToCpp { - public: - explicit CefSchemeHandlerFactoryCToCpp(cef_scheme_handler_factory_t* str) - : CefCToCpp(str) {} - virtual ~CefSchemeHandlerFactoryCToCpp() {} - - // CefSchemeHandlerFactory methods - virtual CefRefPtr Create(CefRefPtr browser, - CefRefPtr frame, const CefString& scheme_name, - CefRefPtr request) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc b/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc deleted file mode 100644 index 3eb6fc3ed..000000000 --- a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc +++ /dev/null @@ -1,46 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name, - bool is_standard, bool is_local, bool is_display_isolated) { - if (CEF_MEMBER_MISSING(struct_, add_custom_scheme)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(!scheme_name.empty()); - if (scheme_name.empty()) - return false; - - // Execute - int _retval = struct_->add_custom_scheme(struct_, - scheme_name.GetStruct(), - is_standard, - is_local, - is_display_isolated); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h b/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h deleted file mode 100644 index 4fbdd20c3..000000000 --- a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h +++ /dev/null @@ -1,43 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefSchemeRegistrarCToCpp - : public CefCToCpp { - public: - explicit CefSchemeRegistrarCToCpp(cef_scheme_registrar_t* str) - : CefCToCpp(str) {} - virtual ~CefSchemeRegistrarCToCpp() {} - - // CefSchemeRegistrar methods - virtual bool AddCustomScheme(const CefString& scheme_name, bool is_standard, - bool is_local, bool is_display_isolated) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc deleted file mode 100644 index 6f63d9ff1..000000000 --- a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc +++ /dev/null @@ -1,141 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/read_handler_cpptoc.h" -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefStreamReader::CreateForFile( - const CefString& fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return NULL; - - // Execute - cef_stream_reader_t* _retval = cef_stream_reader_create_for_file( - fileName.GetStruct()); - - // Return type: refptr_same - return CefStreamReaderCToCpp::Wrap(_retval); -} - -CefRefPtr CefStreamReader::CreateForData(void* data, - size_t size) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return NULL; - - // Execute - cef_stream_reader_t* _retval = cef_stream_reader_create_for_data( - data, - size); - - // Return type: refptr_same - return CefStreamReaderCToCpp::Wrap(_retval); -} - -CefRefPtr CefStreamReader::CreateForHandler( - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: handler; type: refptr_diff - DCHECK(handler.get()); - if (!handler.get()) - return NULL; - - // Execute - cef_stream_reader_t* _retval = cef_stream_reader_create_for_handler( - CefReadHandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefStreamReaderCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -size_t CefStreamReaderCToCpp::Read(void* ptr, size_t size, size_t n) { - if (CEF_MEMBER_MISSING(struct_, read)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = struct_->read(struct_, - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CefStreamReaderCToCpp::Seek(int64 offset, int whence) { - if (CEF_MEMBER_MISSING(struct_, seek)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->seek(struct_, - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CefStreamReaderCToCpp::Tell() { - if (CEF_MEMBER_MISSING(struct_, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->tell(struct_); - - // Return type: simple - return _retval; -} - -int CefStreamReaderCToCpp::Eof() { - if (CEF_MEMBER_MISSING(struct_, eof)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->eof(struct_); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h b/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h deleted file mode 100644 index a856ee6d9..000000000 --- a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h +++ /dev/null @@ -1,45 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefStreamReaderCToCpp - : public CefCToCpp { - public: - explicit CefStreamReaderCToCpp(cef_stream_reader_t* str) - : CefCToCpp( - str) {} - virtual ~CefStreamReaderCToCpp() {} - - // CefStreamReader methods - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc b/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc deleted file mode 100644 index 7c0561a8b..000000000 --- a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc +++ /dev/null @@ -1,123 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/write_handler_cpptoc.h" -#include "libcef_dll/ctocpp/stream_writer_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefStreamWriter::CreateForFile( - const CefString& fileName) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return NULL; - - // Execute - cef_stream_writer_t* _retval = cef_stream_writer_create_for_file( - fileName.GetStruct()); - - // Return type: refptr_same - return CefStreamWriterCToCpp::Wrap(_retval); -} - -CefRefPtr CefStreamWriter::CreateForHandler( - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: handler; type: refptr_diff - DCHECK(handler.get()); - if (!handler.get()) - return NULL; - - // Execute - cef_stream_writer_t* _retval = cef_stream_writer_create_for_handler( - CefWriteHandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefStreamWriterCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -size_t CefStreamWriterCToCpp::Write(const void* ptr, size_t size, size_t n) { - if (CEF_MEMBER_MISSING(struct_, write)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = struct_->write(struct_, - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CefStreamWriterCToCpp::Seek(int64 offset, int whence) { - if (CEF_MEMBER_MISSING(struct_, seek)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->seek(struct_, - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CefStreamWriterCToCpp::Tell() { - if (CEF_MEMBER_MISSING(struct_, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->tell(struct_); - - // Return type: simple - return _retval; -} - -int CefStreamWriterCToCpp::Flush() { - if (CEF_MEMBER_MISSING(struct_, flush)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->flush(struct_); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h b/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h deleted file mode 100644 index dc148e656..000000000 --- a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h +++ /dev/null @@ -1,45 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefStreamWriterCToCpp - : public CefCToCpp { - public: - explicit CefStreamWriterCToCpp(cef_stream_writer_t* str) - : CefCToCpp( - str) {} - virtual ~CefStreamWriterCToCpp() {} - - // CefStreamWriter methods - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Flush() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc deleted file mode 100644 index acf755f4c..000000000 --- a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/string_visitor_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefStringVisitorCToCpp::Visit(const CefString& string) { - if (CEF_MEMBER_MISSING(struct_, visit)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: string; type: string_byref_const - DCHECK(!string.empty()); - if (string.empty()) - return; - - // Execute - struct_->visit(struct_, - string.GetStruct()); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h deleted file mode 100644 index c5871d48a..000000000 --- a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_string_visitor.h" -#include "include/capi/cef_string_visitor_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefStringVisitorCToCpp - : public CefCToCpp { - public: - explicit CefStringVisitorCToCpp(cef_string_visitor_t* str) - : CefCToCpp(str) {} - virtual ~CefStringVisitorCToCpp() {} - - // CefStringVisitor methods - virtual void Visit(const CefString& string) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/task_ctocpp.cc b/cef/libcef_dll/ctocpp/task_ctocpp.cc deleted file mode 100644 index 0a2e48a89..000000000 --- a/cef/libcef_dll/ctocpp/task_ctocpp.cc +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/task_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefTaskCToCpp::Execute(CefThreadId threadId) { - if (CEF_MEMBER_MISSING(struct_, execute)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->execute(struct_, - threadId); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/task_ctocpp.h b/cef/libcef_dll/ctocpp/task_ctocpp.h deleted file mode 100644 index 58dce8a2a..000000000 --- a/cef/libcef_dll/ctocpp/task_ctocpp.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefTaskCToCpp - : public CefCToCpp { - public: - explicit CefTaskCToCpp(cef_task_t* str) - : CefCToCpp(str) {} - virtual ~CefTaskCToCpp() {} - - // CefTask methods - virtual void Execute(CefThreadId threadId) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc b/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc deleted file mode 100644 index ccf7961c8..000000000 --- a/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc +++ /dev/null @@ -1,134 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/task_cpptoc.h" -#include "libcef_dll/ctocpp/task_runner_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefTaskRunner::GetForCurrentThread() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_task_runner_t* _retval = cef_task_runner_get_for_current_thread(); - - // Return type: refptr_same - return CefTaskRunnerCToCpp::Wrap(_retval); -} - -CefRefPtr CefTaskRunner::GetForThread(CefThreadId threadId) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_task_runner_t* _retval = cef_task_runner_get_for_thread( - threadId); - - // Return type: refptr_same - return CefTaskRunnerCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefTaskRunnerCToCpp::IsSame(CefRefPtr that) { - if (CEF_MEMBER_MISSING(struct_, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = struct_->is_same(struct_, - CefTaskRunnerCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::BelongsToCurrentThread() { - if (CEF_MEMBER_MISSING(struct_, belongs_to_current_thread)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->belongs_to_current_thread(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::BelongsToThread(CefThreadId threadId) { - if (CEF_MEMBER_MISSING(struct_, belongs_to_thread)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->belongs_to_thread(struct_, - threadId); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::PostTask(CefRefPtr task) { - if (CEF_MEMBER_MISSING(struct_, post_task)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = struct_->post_task(struct_, - CefTaskCppToC::Wrap(task)); - - // Return type: bool - return _retval?true:false; -} - -bool CefTaskRunnerCToCpp::PostDelayedTask(CefRefPtr task, - int64 delay_ms) { - if (CEF_MEMBER_MISSING(struct_, post_delayed_task)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = struct_->post_delayed_task(struct_, - CefTaskCppToC::Wrap(task), - delay_ms); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/task_runner_ctocpp.h b/cef/libcef_dll/ctocpp/task_runner_ctocpp.h deleted file mode 100644 index ef671934c..000000000 --- a/cef/libcef_dll/ctocpp/task_runner_ctocpp.h +++ /dev/null @@ -1,45 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefTaskRunnerCToCpp - : public CefCToCpp { - public: - explicit CefTaskRunnerCToCpp(cef_task_runner_t* str) - : CefCToCpp(str) {} - virtual ~CefTaskRunnerCToCpp() {} - - // CefTaskRunner methods - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool BelongsToCurrentThread() OVERRIDE; - virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE; - virtual bool PostTask(CefRefPtr task) OVERRIDE; - virtual bool PostDelayedTask(CefRefPtr task, - int64 delay_ms) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc b/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc deleted file mode 100644 index a3a1644f1..000000000 --- a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/urlrequest_cpptoc.h" -#include "libcef_dll/ctocpp/urlrequest_client_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -void CefURLRequestClientCToCpp::OnRequestComplete( - CefRefPtr request) { - if (CEF_MEMBER_MISSING(struct_, on_request_complete)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return; - - // Execute - struct_->on_request_complete(struct_, - CefURLRequestCppToC::Wrap(request)); -} - -void CefURLRequestClientCToCpp::OnUploadProgress( - CefRefPtr request, uint64 current, uint64 total) { - if (CEF_MEMBER_MISSING(struct_, on_upload_progress)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return; - - // Execute - struct_->on_upload_progress(struct_, - CefURLRequestCppToC::Wrap(request), - current, - total); -} - -void CefURLRequestClientCToCpp::OnDownloadProgress( - CefRefPtr request, uint64 current, uint64 total) { - if (CEF_MEMBER_MISSING(struct_, on_download_progress)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return; - - // Execute - struct_->on_download_progress(struct_, - CefURLRequestCppToC::Wrap(request), - current, - total); -} - -void CefURLRequestClientCToCpp::OnDownloadData(CefRefPtr request, - const void* data, size_t data_length) { - if (CEF_MEMBER_MISSING(struct_, on_download_data)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_diff - DCHECK(request.get()); - if (!request.get()) - return; - // Verify param: data; type: simple_byaddr - DCHECK(data); - if (!data) - return; - - // Execute - struct_->on_download_data(struct_, - CefURLRequestCppToC::Wrap(request), - data, - data_length); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h b/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h deleted file mode 100644 index 987aaffc5..000000000 --- a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_urlrequest.h" -#include "include/capi/cef_urlrequest_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefURLRequestClientCToCpp - : public CefCToCpp { - public: - explicit CefURLRequestClientCToCpp(cef_urlrequest_client_t* str) - : CefCToCpp(str) {} - virtual ~CefURLRequestClientCToCpp() {} - - // CefURLRequestClient methods - virtual void OnRequestComplete(CefRefPtr request) OVERRIDE; - virtual void OnUploadProgress(CefRefPtr request, - uint64 current, uint64 total) OVERRIDE; - virtual void OnDownloadProgress(CefRefPtr request, - uint64 current, uint64 total) OVERRIDE; - virtual void OnDownloadData(CefRefPtr request, - const void* data, size_t data_length) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc deleted file mode 100644 index c91fe9dc5..000000000 --- a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc +++ /dev/null @@ -1,126 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" -#include "libcef_dll/ctocpp/request_ctocpp.h" -#include "libcef_dll/ctocpp/response_ctocpp.h" -#include "libcef_dll/ctocpp/urlrequest_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefURLRequest::Create(CefRefPtr request, - CefRefPtr client) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: request; type: refptr_same - DCHECK(request.get()); - if (!request.get()) - return NULL; - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return NULL; - - // Execute - cef_urlrequest_t* _retval = cef_urlrequest_create( - CefRequestCToCpp::Unwrap(request), - CefURLRequestClientCppToC::Wrap(client)); - - // Return type: refptr_same - return CefURLRequestCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefURLRequestCToCpp::GetRequest() { - if (CEF_MEMBER_MISSING(struct_, get_request)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_request_t* _retval = struct_->get_request(struct_); - - // Return type: refptr_same - return CefRequestCToCpp::Wrap(_retval); -} - -CefRefPtr CefURLRequestCToCpp::GetClient() { - if (CEF_MEMBER_MISSING(struct_, get_client)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_urlrequest_client_t* _retval = struct_->get_client(struct_); - - // Return type: refptr_diff - return CefURLRequestClientCppToC::Unwrap(_retval); -} - -CefURLRequest::Status CefURLRequestCToCpp::GetRequestStatus() { - if (CEF_MEMBER_MISSING(struct_, get_request_status)) - return UR_UNKNOWN; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_urlrequest_status_t _retval = struct_->get_request_status(struct_); - - // Return type: simple - return _retval; -} - -CefURLRequest::ErrorCode CefURLRequestCToCpp::GetRequestError() { - if (CEF_MEMBER_MISSING(struct_, get_request_error)) - return ERR_NONE; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_errorcode_t _retval = struct_->get_request_error(struct_); - - // Return type: simple - return _retval; -} - -CefRefPtr CefURLRequestCToCpp::GetResponse() { - if (CEF_MEMBER_MISSING(struct_, get_response)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_response_t* _retval = struct_->get_response(struct_); - - // Return type: refptr_same - return CefResponseCToCpp::Wrap(_retval); -} - -void CefURLRequestCToCpp::Cancel() { - if (CEF_MEMBER_MISSING(struct_, cancel)) - return; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - struct_->cancel(struct_); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h deleted file mode 100644 index 793b9b97f..000000000 --- a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h +++ /dev/null @@ -1,45 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_urlrequest.h" -#include "include/capi/cef_urlrequest_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefURLRequestCToCpp - : public CefCToCpp { - public: - explicit CefURLRequestCToCpp(cef_urlrequest_t* str) - : CefCToCpp(str) {} - virtual ~CefURLRequestCToCpp() {} - - // CefURLRequest methods - virtual CefRefPtr GetRequest() OVERRIDE; - virtual CefRefPtr GetClient() OVERRIDE; - virtual Status GetRequestStatus() OVERRIDE; - virtual ErrorCode GetRequestError() OVERRIDE; - virtual CefRefPtr GetResponse() OVERRIDE; - virtual void Cancel() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc b/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc deleted file mode 100644 index f3b9b6e56..000000000 --- a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8value_cpptoc.h" -#include "libcef_dll/ctocpp/v8accessor_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8AccessorCToCpp::Get(const CefString& name, - const CefRefPtr object, CefRefPtr& retval, - CefString& exception) { - if (CEF_MEMBER_MISSING(struct_, get)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - // Verify param: object; type: refptr_diff - DCHECK(object.get()); - if (!object.get()) - return false; - - // Translate param: retval; type: refptr_diff_byref - cef_v8value_t* retvalStruct = NULL; - if (retval.get()) - retvalStruct = CefV8ValueCppToC::Wrap(retval); - cef_v8value_t* retvalOrig = retvalStruct; - - // Execute - int _retval = struct_->get(struct_, - name.GetStruct(), - CefV8ValueCppToC::Wrap(object), - &retvalStruct, - exception.GetWritableStruct()); - - // Restore param:retval; type: refptr_diff_byref - if (retvalStruct) { - if (retvalStruct != retvalOrig) { - retval = CefV8ValueCppToC::Unwrap(retvalStruct); - } - } else { - retval = NULL; - } - - // Return type: bool - return _retval?true:false; -} - -bool CefV8AccessorCToCpp::Set(const CefString& name, - const CefRefPtr object, const CefRefPtr value, - CefString& exception) { - if (CEF_MEMBER_MISSING(struct_, set)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - // Verify param: object; type: refptr_diff - DCHECK(object.get()); - if (!object.get()) - return false; - // Verify param: value; type: refptr_diff - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set(struct_, - name.GetStruct(), - CefV8ValueCppToC::Wrap(object), - CefV8ValueCppToC::Wrap(value), - exception.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h b/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h deleted file mode 100644 index 3ae106e93..000000000 --- a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefV8AccessorCToCpp - : public CefCToCpp { - public: - explicit CefV8AccessorCToCpp(cef_v8accessor_t* str) - : CefCToCpp(str) {} - virtual ~CefV8AccessorCToCpp() {} - - // CefV8Accessor methods - virtual bool Get(const CefString& name, const CefRefPtr object, - CefRefPtr& retval, CefString& exception) OVERRIDE; - virtual bool Set(const CefString& name, const CefRefPtr object, - const CefRefPtr value, CefString& exception) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8context_ctocpp.cc b/cef/libcef_dll/ctocpp/v8context_ctocpp.cc deleted file mode 100644 index 5427893a7..000000000 --- a/cef/libcef_dll/ctocpp/v8context_ctocpp.cc +++ /dev/null @@ -1,221 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/task_runner_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefV8Context::GetCurrentContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8context_t* _retval = cef_v8context_get_current_context(); - - // Return type: refptr_same - return CefV8ContextCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Context::GetEnteredContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8context_t* _retval = cef_v8context_get_entered_context(); - - // Return type: refptr_same - return CefV8ContextCToCpp::Wrap(_retval); -} - -bool CefV8Context::InContext() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_v8context_in_context(); - - // Return type: bool - return _retval?true:false; -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefRefPtr CefV8ContextCToCpp::GetTaskRunner() { - if (CEF_MEMBER_MISSING(struct_, get_task_runner)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_task_runner_t* _retval = struct_->get_task_runner(struct_); - - // Return type: refptr_same - return CefTaskRunnerCToCpp::Wrap(_retval); -} - -bool CefV8ContextCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ContextCToCpp::GetBrowser() { - if (CEF_MEMBER_MISSING(struct_, get_browser)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_browser_t* _retval = struct_->get_browser(struct_); - - // Return type: refptr_same - return CefBrowserCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ContextCToCpp::GetFrame() { - if (CEF_MEMBER_MISSING(struct_, get_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_frame_t* _retval = struct_->get_frame(struct_); - - // Return type: refptr_same - return CefFrameCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ContextCToCpp::GetGlobal() { - if (CEF_MEMBER_MISSING(struct_, get_global)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = struct_->get_global(struct_); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -bool CefV8ContextCToCpp::Enter() { - if (CEF_MEMBER_MISSING(struct_, enter)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->enter(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ContextCToCpp::Exit() { - if (CEF_MEMBER_MISSING(struct_, exit)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->exit(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ContextCToCpp::IsSame(CefRefPtr that) { - if (CEF_MEMBER_MISSING(struct_, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = struct_->is_same(struct_, - CefV8ContextCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ContextCToCpp::Eval(const CefString& code, - CefRefPtr& retval, CefRefPtr& exception) { - if (CEF_MEMBER_MISSING(struct_, eval)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: code; type: string_byref_const - DCHECK(!code.empty()); - if (code.empty()) - return false; - - // Translate param: retval; type: refptr_same_byref - cef_v8value_t* retvalStruct = NULL; - if (retval.get()) - retvalStruct = CefV8ValueCToCpp::Unwrap(retval); - cef_v8value_t* retvalOrig = retvalStruct; - // Translate param: exception; type: refptr_same_byref - cef_v8exception_t* exceptionStruct = NULL; - if (exception.get()) - exceptionStruct = CefV8ExceptionCToCpp::Unwrap(exception); - cef_v8exception_t* exceptionOrig = exceptionStruct; - - // Execute - int _retval = struct_->eval(struct_, - code.GetStruct(), - &retvalStruct, - &exceptionStruct); - - // Restore param:retval; type: refptr_same_byref - if (retvalStruct) { - if (retvalStruct != retvalOrig) { - retval = CefV8ValueCToCpp::Wrap(retvalStruct); - } - } else { - retval = NULL; - } - // Restore param:exception; type: refptr_same_byref - if (exceptionStruct) { - if (exceptionStruct != exceptionOrig) { - exception = CefV8ExceptionCToCpp::Wrap(exceptionStruct); - } - } else { - exception = NULL; - } - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8context_ctocpp.h b/cef/libcef_dll/ctocpp/v8context_ctocpp.h deleted file mode 100644 index f364361b2..000000000 --- a/cef/libcef_dll/ctocpp/v8context_ctocpp.h +++ /dev/null @@ -1,49 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8ContextCToCpp - : public CefCToCpp { - public: - explicit CefV8ContextCToCpp(cef_v8context_t* str) - : CefCToCpp(str) {} - virtual ~CefV8ContextCToCpp() {} - - // CefV8Context methods - virtual CefRefPtr GetTaskRunner() OVERRIDE; - virtual bool IsValid() OVERRIDE; - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual CefRefPtr GetFrame() OVERRIDE; - virtual CefRefPtr GetGlobal() OVERRIDE; - virtual bool Enter() OVERRIDE; - virtual bool Exit() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool Eval(const CefString& code, CefRefPtr& retval, - CefRefPtr& exception) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc b/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc deleted file mode 100644 index 633a21dc4..000000000 --- a/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc +++ /dev/null @@ -1,133 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefV8ExceptionCToCpp::GetMessage() { - if (CEF_MEMBER_MISSING(struct_, get_message)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_message(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8ExceptionCToCpp::GetSourceLine() { - if (CEF_MEMBER_MISSING(struct_, get_source_line)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_source_line(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8ExceptionCToCpp::GetScriptResourceName() { - if (CEF_MEMBER_MISSING(struct_, get_script_resource_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_script_resource_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int CefV8ExceptionCToCpp::GetLineNumber() { - if (CEF_MEMBER_MISSING(struct_, get_line_number)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_line_number(struct_); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetStartPosition() { - if (CEF_MEMBER_MISSING(struct_, get_start_position)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_start_position(struct_); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetEndPosition() { - if (CEF_MEMBER_MISSING(struct_, get_end_position)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_end_position(struct_); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetStartColumn() { - if (CEF_MEMBER_MISSING(struct_, get_start_column)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_start_column(struct_); - - // Return type: simple - return _retval; -} - -int CefV8ExceptionCToCpp::GetEndColumn() { - if (CEF_MEMBER_MISSING(struct_, get_end_column)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_end_column(struct_); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8exception_ctocpp.h b/cef/libcef_dll/ctocpp/v8exception_ctocpp.h deleted file mode 100644 index 1006a4c0c..000000000 --- a/cef/libcef_dll/ctocpp/v8exception_ctocpp.h +++ /dev/null @@ -1,49 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8ExceptionCToCpp - : public CefCToCpp { - public: - explicit CefV8ExceptionCToCpp(cef_v8exception_t* str) - : CefCToCpp( - str) {} - virtual ~CefV8ExceptionCToCpp() {} - - // CefV8Exception methods - virtual CefString GetMessage() OVERRIDE; - virtual CefString GetSourceLine() OVERRIDE; - virtual CefString GetScriptResourceName() OVERRIDE; - virtual int GetLineNumber() OVERRIDE; - virtual int GetStartPosition() OVERRIDE; - virtual int GetEndPosition() OVERRIDE; - virtual int GetStartColumn() OVERRIDE; - virtual int GetEndColumn() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc b/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc deleted file mode 100644 index 9b9c2a790..000000000 --- a/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/v8value_cpptoc.h" -#include "libcef_dll/ctocpp/v8handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8HandlerCToCpp::Execute(const CefString& name, - CefRefPtr object, const CefV8ValueList& arguments, - CefRefPtr& retval, CefString& exception) { - if (CEF_MEMBER_MISSING(struct_, execute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return false; - // Verify param: object; type: refptr_diff - DCHECK(object.get()); - if (!object.get()) - return false; - - // Translate param: arguments; type: refptr_vec_diff_byref_const - const size_t argumentsCount = arguments.size(); - cef_v8value_t** argumentsList = NULL; - if (argumentsCount > 0) { - argumentsList = new cef_v8value_t*[argumentsCount]; - DCHECK(argumentsList); - if (argumentsList) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList[i] = CefV8ValueCppToC::Wrap(arguments[i]); - } - } - } - // Translate param: retval; type: refptr_diff_byref - cef_v8value_t* retvalStruct = NULL; - if (retval.get()) - retvalStruct = CefV8ValueCppToC::Wrap(retval); - cef_v8value_t* retvalOrig = retvalStruct; - - // Execute - int _retval = struct_->execute(struct_, - name.GetStruct(), - CefV8ValueCppToC::Wrap(object), - argumentsCount, - argumentsList, - &retvalStruct, - exception.GetWritableStruct()); - - // Restore param:arguments; type: refptr_vec_diff_byref_const - if (argumentsList) - delete [] argumentsList; - // Restore param:retval; type: refptr_diff_byref - if (retvalStruct) { - if (retvalStruct != retvalOrig) { - retval = CefV8ValueCppToC::Unwrap(retvalStruct); - } - } else { - retval = NULL; - } - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8handler_ctocpp.h b/cef/libcef_dll/ctocpp/v8handler_ctocpp.h deleted file mode 100644 index ea3bba1c3..000000000 --- a/cef/libcef_dll/ctocpp/v8handler_ctocpp.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefV8HandlerCToCpp - : public CefCToCpp { - public: - explicit CefV8HandlerCToCpp(cef_v8handler_t* str) - : CefCToCpp(str) {} - virtual ~CefV8HandlerCToCpp() {} - - // CefV8Handler methods - virtual bool Execute(const CefString& name, CefRefPtr object, - const CefV8ValueList& arguments, CefRefPtr& retval, - CefString& exception) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc deleted file mode 100644 index a0de4d3a0..000000000 --- a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc +++ /dev/null @@ -1,134 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8StackFrameCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefV8StackFrameCToCpp::GetScriptName() { - if (CEF_MEMBER_MISSING(struct_, get_script_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_script_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8StackFrameCToCpp::GetScriptNameOrSourceURL() { - if (CEF_MEMBER_MISSING(struct_, get_script_name_or_source_url)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_script_name_or_source_url( - struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefV8StackFrameCToCpp::GetFunctionName() { - if (CEF_MEMBER_MISSING(struct_, get_function_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_function_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int CefV8StackFrameCToCpp::GetLineNumber() { - if (CEF_MEMBER_MISSING(struct_, get_line_number)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_line_number(struct_); - - // Return type: simple - return _retval; -} - -int CefV8StackFrameCToCpp::GetColumn() { - if (CEF_MEMBER_MISSING(struct_, get_column)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_column(struct_); - - // Return type: simple - return _retval; -} - -bool CefV8StackFrameCToCpp::IsEval() { - if (CEF_MEMBER_MISSING(struct_, is_eval)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_eval(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8StackFrameCToCpp::IsConstructor() { - if (CEF_MEMBER_MISSING(struct_, is_constructor)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_constructor(struct_); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h deleted file mode 100644 index 7d1cace31..000000000 --- a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h +++ /dev/null @@ -1,49 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8StackFrameCToCpp - : public CefCToCpp { - public: - explicit CefV8StackFrameCToCpp(cef_v8stack_frame_t* str) - : CefCToCpp( - str) {} - virtual ~CefV8StackFrameCToCpp() {} - - // CefV8StackFrame methods - virtual bool IsValid() OVERRIDE; - virtual CefString GetScriptName() OVERRIDE; - virtual CefString GetScriptNameOrSourceURL() OVERRIDE; - virtual CefString GetFunctionName() OVERRIDE; - virtual int GetLineNumber() OVERRIDE; - virtual int GetColumn() OVERRIDE; - virtual bool IsEval() OVERRIDE; - virtual bool IsConstructor() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc deleted file mode 100644 index 0764c7ead..000000000 --- a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc +++ /dev/null @@ -1,78 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefV8StackTrace::GetCurrent(int frame_limit) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8stack_trace_t* _retval = cef_v8stack_trace_get_current( - frame_limit); - - // Return type: refptr_same - return CefV8StackTraceCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8StackTraceCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -int CefV8StackTraceCToCpp::GetFrameCount() { - if (CEF_MEMBER_MISSING(struct_, get_frame_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_frame_count(struct_); - - // Return type: simple - return _retval; -} - -CefRefPtr CefV8StackTraceCToCpp::GetFrame(int index) { - if (CEF_MEMBER_MISSING(struct_, get_frame)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8stack_frame_t* _retval = struct_->get_frame(struct_, - index); - - // Return type: refptr_same - return CefV8StackFrameCToCpp::Wrap(_retval); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h deleted file mode 100644 index 8e72b8865..000000000 --- a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h +++ /dev/null @@ -1,44 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8StackTraceCToCpp - : public CefCToCpp { - public: - explicit CefV8StackTraceCToCpp(cef_v8stack_trace_t* str) - : CefCToCpp( - str) {} - virtual ~CefV8StackTraceCToCpp() {} - - // CefV8StackTrace methods - virtual bool IsValid() OVERRIDE; - virtual int GetFrameCount() OVERRIDE; - virtual CefRefPtr GetFrame(int index) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/v8value_ctocpp.cc b/cef/libcef_dll/ctocpp/v8value_ctocpp.cc deleted file mode 100644 index 36d2063d2..000000000 --- a/cef/libcef_dll/ctocpp/v8value_ctocpp.cc +++ /dev/null @@ -1,874 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/base_cpptoc.h" -#include "libcef_dll/cpptoc/v8accessor_cpptoc.h" -#include "libcef_dll/cpptoc/v8handler_cpptoc.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" -#include "libcef_dll/transfer_util.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefV8Value::CreateUndefined() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_undefined(); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateNull() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_null(); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateBool(bool value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_bool( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateInt(int32 value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_int( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateUInt(uint32 value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_uint( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateDouble(double value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_double( - value); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateDate(const CefTime& date) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_date( - &date); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateString(const CefString& value) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: value - - // Execute - cef_v8value_t* _retval = cef_v8value_create_string( - value.GetStruct()); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateObject( - CefRefPtr accessor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: accessor - - // Execute - cef_v8value_t* _retval = cef_v8value_create_object( - CefV8AccessorCppToC::Wrap(accessor)); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateArray(int length) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8value_t* _retval = cef_v8value_create_array( - length); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8Value::CreateFunction(const CefString& name, - CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: name; type: string_byref_const - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - // Verify param: handler; type: refptr_diff - DCHECK(handler.get()); - if (!handler.get()) - return NULL; - - // Execute - cef_v8value_t* _retval = cef_v8value_create_function( - name.GetStruct(), - CefV8HandlerCppToC::Wrap(handler)); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefV8ValueCToCpp::IsValid() { - if (CEF_MEMBER_MISSING(struct_, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_valid(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsUndefined() { - if (CEF_MEMBER_MISSING(struct_, is_undefined)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_undefined(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsNull() { - if (CEF_MEMBER_MISSING(struct_, is_null)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_null(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsBool() { - if (CEF_MEMBER_MISSING(struct_, is_bool)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_bool(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsInt() { - if (CEF_MEMBER_MISSING(struct_, is_int)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_int(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsUInt() { - if (CEF_MEMBER_MISSING(struct_, is_uint)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_uint(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsDouble() { - if (CEF_MEMBER_MISSING(struct_, is_double)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_double(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsDate() { - if (CEF_MEMBER_MISSING(struct_, is_date)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_date(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsString() { - if (CEF_MEMBER_MISSING(struct_, is_string)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_string(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsObject() { - if (CEF_MEMBER_MISSING(struct_, is_object)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_object(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsArray() { - if (CEF_MEMBER_MISSING(struct_, is_array)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_array(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsFunction() { - if (CEF_MEMBER_MISSING(struct_, is_function)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_function(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::IsSame(CefRefPtr that) { - if (CEF_MEMBER_MISSING(struct_, is_same)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: that; type: refptr_same - DCHECK(that.get()); - if (!that.get()) - return false; - - // Execute - int _retval = struct_->is_same(struct_, - CefV8ValueCToCpp::Unwrap(that)); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::GetBoolValue() { - if (CEF_MEMBER_MISSING(struct_, get_bool_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_bool_value(struct_); - - // Return type: bool - return _retval?true:false; -} - -int32 CefV8ValueCToCpp::GetIntValue() { - if (CEF_MEMBER_MISSING(struct_, get_int_value)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int32 _retval = struct_->get_int_value(struct_); - - // Return type: simple - return _retval; -} - -uint32 CefV8ValueCToCpp::GetUIntValue() { - if (CEF_MEMBER_MISSING(struct_, get_uint_value)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - uint32 _retval = struct_->get_uint_value(struct_); - - // Return type: simple - return _retval; -} - -double CefV8ValueCToCpp::GetDoubleValue() { - if (CEF_MEMBER_MISSING(struct_, get_double_value)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - double _retval = struct_->get_double_value(struct_); - - // Return type: simple - return _retval; -} - -CefTime CefV8ValueCToCpp::GetDateValue() { - if (CEF_MEMBER_MISSING(struct_, get_date_value)) - return CefTime(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_time_t _retval = struct_->get_date_value(struct_); - - // Return type: simple - return _retval; -} - -CefString CefV8ValueCToCpp::GetStringValue() { - if (CEF_MEMBER_MISSING(struct_, get_string_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_string_value(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefV8ValueCToCpp::IsUserCreated() { - if (CEF_MEMBER_MISSING(struct_, is_user_created)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_user_created(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::HasException() { - if (CEF_MEMBER_MISSING(struct_, has_exception)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_exception(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ValueCToCpp::GetException() { - if (CEF_MEMBER_MISSING(struct_, get_exception)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8exception_t* _retval = struct_->get_exception(struct_); - - // Return type: refptr_same - return CefV8ExceptionCToCpp::Wrap(_retval); -} - -bool CefV8ValueCToCpp::ClearException() { - if (CEF_MEMBER_MISSING(struct_, clear_exception)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->clear_exception(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::WillRethrowExceptions() { - if (CEF_MEMBER_MISSING(struct_, will_rethrow_exceptions)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->will_rethrow_exceptions(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetRethrowExceptions(bool rethrow) { - if (CEF_MEMBER_MISSING(struct_, set_rethrow_exceptions)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->set_rethrow_exceptions(struct_, - rethrow); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::HasValue(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, has_value_bykey)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - int _retval = struct_->has_value_bykey(struct_, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::HasValue(int index) { - if (CEF_MEMBER_MISSING(struct_, has_value_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->has_value_byindex(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::DeleteValue(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, delete_value_bykey)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - int _retval = struct_->delete_value_bykey(struct_, - key.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::DeleteValue(int index) { - if (CEF_MEMBER_MISSING(struct_, delete_value_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->delete_value_byindex(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ValueCToCpp::GetValue(const CefString& key) { - if (CEF_MEMBER_MISSING(struct_, get_value_bykey)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - cef_v8value_t* _retval = struct_->get_value_bykey(struct_, - key.GetStruct()); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ValueCToCpp::GetValue(int index) { - if (CEF_MEMBER_MISSING(struct_, get_value_byindex)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return NULL; - - // Execute - cef_v8value_t* _retval = struct_->get_value_byindex(struct_, - index); - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -bool CefV8ValueCToCpp::SetValue(const CefString& key, - CefRefPtr value, PropertyAttribute attribute) { - if (CEF_MEMBER_MISSING(struct_, set_value_bykey)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - // Unverified params: key - - // Execute - int _retval = struct_->set_value_bykey(struct_, - key.GetStruct(), - CefV8ValueCToCpp::Unwrap(value), - attribute); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr value) { - if (CEF_MEMBER_MISSING(struct_, set_value_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - // Verify param: value; type: refptr_same - DCHECK(value.get()); - if (!value.get()) - return false; - - // Execute - int _retval = struct_->set_value_byindex(struct_, - index, - CefV8ValueCToCpp::Unwrap(value)); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetValue(const CefString& key, AccessControl settings, - PropertyAttribute attribute) { - if (CEF_MEMBER_MISSING(struct_, set_value_byaccessor)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: key - - // Execute - int _retval = struct_->set_value_byaccessor(struct_, - key.GetStruct(), - settings, - attribute); - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::GetKeys(std::vector& keys) { - if (CEF_MEMBER_MISSING(struct_, get_keys)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Translate param: keys; type: string_vec_byref - cef_string_list_t keysList = cef_string_list_alloc(); - DCHECK(keysList); - if (keysList) - transfer_string_list_contents(keys, keysList); - - // Execute - int _retval = struct_->get_keys(struct_, - keysList); - - // Restore param:keys; type: string_vec_byref - if (keysList) { - keys.clear(); - transfer_string_list_contents(keysList, keys); - cef_string_list_free(keysList); - } - - // Return type: bool - return _retval?true:false; -} - -bool CefV8ValueCToCpp::SetUserData(CefRefPtr user_data) { - if (CEF_MEMBER_MISSING(struct_, set_user_data)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: user_data - - // Execute - int _retval = struct_->set_user_data(struct_, - CefBaseCppToC::Wrap(user_data)); - - // Return type: bool - return _retval?true:false; -} - -CefRefPtr CefV8ValueCToCpp::GetUserData() { - if (CEF_MEMBER_MISSING(struct_, get_user_data)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_base_t* _retval = struct_->get_user_data(struct_); - - // Return type: refptr_diff - return CefBaseCppToC::Unwrap(_retval); -} - -int CefV8ValueCToCpp::GetExternallyAllocatedMemory() { - if (CEF_MEMBER_MISSING(struct_, get_externally_allocated_memory)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_externally_allocated_memory(struct_); - - // Return type: simple - return _retval; -} - -int CefV8ValueCToCpp::AdjustExternallyAllocatedMemory(int change_in_bytes) { - if (CEF_MEMBER_MISSING(struct_, adjust_externally_allocated_memory)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->adjust_externally_allocated_memory(struct_, - change_in_bytes); - - // Return type: simple - return _retval; -} - -int CefV8ValueCToCpp::GetArrayLength() { - if (CEF_MEMBER_MISSING(struct_, get_array_length)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_array_length(struct_); - - // Return type: simple - return _retval; -} - -CefString CefV8ValueCToCpp::GetFunctionName() { - if (CEF_MEMBER_MISSING(struct_, get_function_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_function_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefRefPtr CefV8ValueCToCpp::GetFunctionHandler() { - if (CEF_MEMBER_MISSING(struct_, get_function_handler)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_v8handler_t* _retval = struct_->get_function_handler(struct_); - - // Return type: refptr_diff - return CefV8HandlerCppToC::Unwrap(_retval); -} - -CefRefPtr CefV8ValueCToCpp::ExecuteFunction( - CefRefPtr object, const CefV8ValueList& arguments) { - if (CEF_MEMBER_MISSING(struct_, execute_function)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: object - - // Translate param: arguments; type: refptr_vec_same_byref_const - const size_t argumentsCount = arguments.size(); - cef_v8value_t** argumentsList = NULL; - if (argumentsCount > 0) { - argumentsList = new cef_v8value_t*[argumentsCount]; - DCHECK(argumentsList); - if (argumentsList) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList[i] = CefV8ValueCToCpp::Unwrap(arguments[i]); - } - } - } - - // Execute - cef_v8value_t* _retval = struct_->execute_function(struct_, - CefV8ValueCToCpp::Unwrap(object), - argumentsCount, - argumentsList); - - // Restore param:arguments; type: refptr_vec_same_byref_const - if (argumentsList) - delete [] argumentsList; - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - -CefRefPtr CefV8ValueCToCpp::ExecuteFunctionWithContext( - CefRefPtr context, CefRefPtr object, - const CefV8ValueList& arguments) { - if (CEF_MEMBER_MISSING(struct_, execute_function_with_context)) - return NULL; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: context; type: refptr_same - DCHECK(context.get()); - if (!context.get()) - return NULL; - // Unverified params: object - - // Translate param: arguments; type: refptr_vec_same_byref_const - const size_t argumentsCount = arguments.size(); - cef_v8value_t** argumentsList = NULL; - if (argumentsCount > 0) { - argumentsList = new cef_v8value_t*[argumentsCount]; - DCHECK(argumentsList); - if (argumentsList) { - for (size_t i = 0; i < argumentsCount; ++i) { - argumentsList[i] = CefV8ValueCToCpp::Unwrap(arguments[i]); - } - } - } - - // Execute - cef_v8value_t* _retval = struct_->execute_function_with_context(struct_, - CefV8ContextCToCpp::Unwrap(context), - CefV8ValueCToCpp::Unwrap(object), - argumentsCount, - argumentsList); - - // Restore param:arguments; type: refptr_vec_same_byref_const - if (argumentsList) - delete [] argumentsList; - - // Return type: refptr_same - return CefV8ValueCToCpp::Wrap(_retval); -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/v8value_ctocpp.h b/cef/libcef_dll/ctocpp/v8value_ctocpp.h deleted file mode 100644 index 552b020b5..000000000 --- a/cef/libcef_dll/ctocpp/v8value_ctocpp.h +++ /dev/null @@ -1,89 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefV8ValueCToCpp - : public CefCToCpp { - public: - explicit CefV8ValueCToCpp(cef_v8value_t* str) - : CefCToCpp(str) {} - virtual ~CefV8ValueCToCpp() {} - - // CefV8Value methods - virtual bool IsValid() OVERRIDE; - virtual bool IsUndefined() OVERRIDE; - virtual bool IsNull() OVERRIDE; - virtual bool IsBool() OVERRIDE; - virtual bool IsInt() OVERRIDE; - virtual bool IsUInt() OVERRIDE; - virtual bool IsDouble() OVERRIDE; - virtual bool IsDate() OVERRIDE; - virtual bool IsString() OVERRIDE; - virtual bool IsObject() OVERRIDE; - virtual bool IsArray() OVERRIDE; - virtual bool IsFunction() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool GetBoolValue() OVERRIDE; - virtual int32 GetIntValue() OVERRIDE; - virtual uint32 GetUIntValue() OVERRIDE; - virtual double GetDoubleValue() OVERRIDE; - virtual CefTime GetDateValue() OVERRIDE; - virtual CefString GetStringValue() OVERRIDE; - virtual bool IsUserCreated() OVERRIDE; - virtual bool HasException() OVERRIDE; - virtual CefRefPtr GetException() OVERRIDE; - virtual bool ClearException() OVERRIDE; - virtual bool WillRethrowExceptions() OVERRIDE; - virtual bool SetRethrowExceptions(bool rethrow) OVERRIDE; - virtual bool HasValue(const CefString& key) OVERRIDE; - virtual bool HasValue(int index) OVERRIDE; - virtual bool DeleteValue(const CefString& key) OVERRIDE; - virtual bool DeleteValue(int index) OVERRIDE; - virtual CefRefPtr GetValue(const CefString& key) OVERRIDE; - virtual CefRefPtr GetValue(int index) OVERRIDE; - virtual bool SetValue(const CefString& key, CefRefPtr value, - PropertyAttribute attribute) OVERRIDE; - virtual bool SetValue(int index, CefRefPtr value) OVERRIDE; - virtual bool SetValue(const CefString& key, AccessControl settings, - PropertyAttribute attribute) OVERRIDE; - virtual bool GetKeys(std::vector& keys) OVERRIDE; - virtual bool SetUserData(CefRefPtr user_data) OVERRIDE; - virtual CefRefPtr GetUserData() OVERRIDE; - virtual int GetExternallyAllocatedMemory() OVERRIDE; - virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) OVERRIDE; - virtual int GetArrayLength() OVERRIDE; - virtual CefString GetFunctionName() OVERRIDE; - virtual CefRefPtr GetFunctionHandler() OVERRIDE; - virtual CefRefPtr ExecuteFunction(CefRefPtr object, - const CefV8ValueList& arguments) OVERRIDE; - virtual CefRefPtr ExecuteFunctionWithContext( - CefRefPtr context, CefRefPtr object, - const CefV8ValueList& arguments) OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc deleted file mode 100644 index 602021219..000000000 --- a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc +++ /dev/null @@ -1,83 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -CefString CefWebPluginInfoCToCpp::GetName() { - if (CEF_MEMBER_MISSING(struct_, get_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefWebPluginInfoCToCpp::GetPath() { - if (CEF_MEMBER_MISSING(struct_, get_path)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_path(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefWebPluginInfoCToCpp::GetVersion() { - if (CEF_MEMBER_MISSING(struct_, get_version)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_version(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefWebPluginInfoCToCpp::GetDescription() { - if (CEF_MEMBER_MISSING(struct_, get_description)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_description(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h deleted file mode 100644 index c1be75da0..000000000 --- a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h +++ /dev/null @@ -1,45 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefWebPluginInfoCToCpp - : public CefCToCpp { - public: - explicit CefWebPluginInfoCToCpp(cef_web_plugin_info_t* str) - : CefCToCpp(str) {} - virtual ~CefWebPluginInfoCToCpp() {} - - // CefWebPluginInfo methods - virtual CefString GetName() OVERRIDE; - virtual CefString GetPath() OVERRIDE; - virtual CefString GetVersion() OVERRIDE; - virtual CefString GetDescription() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc deleted file mode 100644 index 08032993f..000000000 --- a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h" -#include "libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefWebPluginInfoVisitorCToCpp::Visit(CefRefPtr info, - int count, int total) { - if (CEF_MEMBER_MISSING(struct_, visit)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: info; type: refptr_diff - DCHECK(info.get()); - if (!info.get()) - return false; - - // Execute - int _retval = struct_->visit(struct_, - CefWebPluginInfoCppToC::Wrap(info), - count, - total); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h deleted file mode 100644 index fdec21c6c..000000000 --- a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefWebPluginInfoVisitorCToCpp - : public CefCToCpp { - public: - explicit CefWebPluginInfoVisitorCToCpp(cef_web_plugin_info_visitor_t* str) - : CefCToCpp(str) {} - virtual ~CefWebPluginInfoVisitorCToCpp() {} - - // CefWebPluginInfoVisitor methods - virtual bool Visit(CefRefPtr info, int count, - int total) OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc deleted file mode 100644 index df8f3db97..000000000 --- a/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/write_handler_ctocpp.h" - - -// VIRTUAL METHODS - Body may be edited by hand. - -size_t CefWriteHandlerCToCpp::Write(const void* ptr, size_t size, size_t n) { - if (CEF_MEMBER_MISSING(struct_, write)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: ptr; type: simple_byaddr - DCHECK(ptr); - if (!ptr) - return 0; - - // Execute - size_t _retval = struct_->write(struct_, - ptr, - size, - n); - - // Return type: simple - return _retval; -} - -int CefWriteHandlerCToCpp::Seek(int64 offset, int whence) { - if (CEF_MEMBER_MISSING(struct_, seek)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->seek(struct_, - offset, - whence); - - // Return type: simple - return _retval; -} - -int64 CefWriteHandlerCToCpp::Tell() { - if (CEF_MEMBER_MISSING(struct_, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->tell(struct_); - - // Return type: simple - return _retval; -} - -int CefWriteHandlerCToCpp::Flush() { - if (CEF_MEMBER_MISSING(struct_, flush)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->flush(struct_); - - // Return type: simple - return _retval; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/write_handler_ctocpp.h b/cef/libcef_dll/ctocpp/write_handler_ctocpp.h deleted file mode 100644 index 95713abe9..000000000 --- a/cef/libcef_dll/ctocpp/write_handler_ctocpp.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_ -#pragma once - -#ifndef BUILDING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed DLL-side only") -#else // BUILDING_CEF_SHARED - -#include "include/cef_stream.h" -#include "include/capi/cef_stream_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed DLL-side only. -class CefWriteHandlerCToCpp - : public CefCToCpp { - public: - explicit CefWriteHandlerCToCpp(cef_write_handler_t* str) - : CefCToCpp( - str) {} - virtual ~CefWriteHandlerCToCpp() {} - - // CefWriteHandler methods - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Flush() OVERRIDE; -}; - -#endif // BUILDING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc deleted file mode 100644 index be5c533b7..000000000 --- a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc +++ /dev/null @@ -1,501 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" -#include "libcef_dll/ctocpp/xml_reader_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefXmlReader::Create(CefRefPtr stream, - EncodingType encodingType, const CefString& URI) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: stream; type: refptr_same - DCHECK(stream.get()); - if (!stream.get()) - return NULL; - // Verify param: URI; type: string_byref_const - DCHECK(!URI.empty()); - if (URI.empty()) - return NULL; - - // Execute - cef_xml_reader_t* _retval = cef_xml_reader_create( - CefStreamReaderCToCpp::Unwrap(stream), - encodingType, - URI.GetStruct()); - - // Return type: refptr_same - return CefXmlReaderCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefXmlReaderCToCpp::MoveToNextNode() { - if (CEF_MEMBER_MISSING(struct_, move_to_next_node)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->move_to_next_node(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::Close() { - if (CEF_MEMBER_MISSING(struct_, close)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->close(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::HasError() { - if (CEF_MEMBER_MISSING(struct_, has_error)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_error(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefXmlReaderCToCpp::GetError() { - if (CEF_MEMBER_MISSING(struct_, get_error)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_error(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefXmlReader::NodeType CefXmlReaderCToCpp::GetType() { - if (CEF_MEMBER_MISSING(struct_, get_type)) - return XML_NODE_UNSUPPORTED; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_xml_node_type_t _retval = struct_->get_type(struct_); - - // Return type: simple - return _retval; -} - -int CefXmlReaderCToCpp::GetDepth() { - if (CEF_MEMBER_MISSING(struct_, get_depth)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_depth(struct_); - - // Return type: simple - return _retval; -} - -CefString CefXmlReaderCToCpp::GetLocalName() { - if (CEF_MEMBER_MISSING(struct_, get_local_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_local_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetPrefix() { - if (CEF_MEMBER_MISSING(struct_, get_prefix)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_prefix(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetQualifiedName() { - if (CEF_MEMBER_MISSING(struct_, get_qualified_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_qualified_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetNamespaceURI() { - if (CEF_MEMBER_MISSING(struct_, get_namespace_uri)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_namespace_uri(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetBaseURI() { - if (CEF_MEMBER_MISSING(struct_, get_base_uri)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_base_uri(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetXmlLang() { - if (CEF_MEMBER_MISSING(struct_, get_xml_lang)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_xml_lang(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefXmlReaderCToCpp::IsEmptyElement() { - if (CEF_MEMBER_MISSING(struct_, is_empty_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->is_empty_element(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::HasValue() { - if (CEF_MEMBER_MISSING(struct_, has_value)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_value(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefXmlReaderCToCpp::GetValue() { - if (CEF_MEMBER_MISSING(struct_, get_value)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_value(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -bool CefXmlReaderCToCpp::HasAttributes() { - if (CEF_MEMBER_MISSING(struct_, has_attributes)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->has_attributes(struct_); - - // Return type: bool - return _retval?true:false; -} - -size_t CefXmlReaderCToCpp::GetAttributeCount() { - if (CEF_MEMBER_MISSING(struct_, get_attribute_count)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - size_t _retval = struct_->get_attribute_count(struct_); - - // Return type: simple - return _retval; -} - -CefString CefXmlReaderCToCpp::GetAttribute(int index) { - if (CEF_MEMBER_MISSING(struct_, get_attribute_byindex)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_attribute_byindex(struct_, - index); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetAttribute(const CefString& qualifiedName) { - if (CEF_MEMBER_MISSING(struct_, get_attribute_byqname)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: qualifiedName; type: string_byref_const - DCHECK(!qualifiedName.empty()); - if (qualifiedName.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_attribute_byqname(struct_, - qualifiedName.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetAttribute(const CefString& localName, - const CefString& namespaceURI) { - if (CEF_MEMBER_MISSING(struct_, get_attribute_bylname)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: localName; type: string_byref_const - DCHECK(!localName.empty()); - if (localName.empty()) - return CefString(); - // Verify param: namespaceURI; type: string_byref_const - DCHECK(!namespaceURI.empty()); - if (namespaceURI.empty()) - return CefString(); - - // Execute - cef_string_userfree_t _retval = struct_->get_attribute_bylname(struct_, - localName.GetStruct(), - namespaceURI.GetStruct()); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetInnerXml() { - if (CEF_MEMBER_MISSING(struct_, get_inner_xml)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_inner_xml(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -CefString CefXmlReaderCToCpp::GetOuterXml() { - if (CEF_MEMBER_MISSING(struct_, get_outer_xml)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_outer_xml(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int CefXmlReaderCToCpp::GetLineNumber() { - if (CEF_MEMBER_MISSING(struct_, get_line_number)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->get_line_number(struct_); - - // Return type: simple - return _retval; -} - -bool CefXmlReaderCToCpp::MoveToAttribute(int index) { - if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byindex)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: index; type: simple_byval - DCHECK_GE(index, 0); - if (index < 0) - return false; - - // Execute - int _retval = struct_->move_to_attribute_byindex(struct_, - index); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& qualifiedName) { - if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byqname)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: qualifiedName; type: string_byref_const - DCHECK(!qualifiedName.empty()); - if (qualifiedName.empty()) - return false; - - // Execute - int _retval = struct_->move_to_attribute_byqname(struct_, - qualifiedName.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToAttribute(const CefString& localName, - const CefString& namespaceURI) { - if (CEF_MEMBER_MISSING(struct_, move_to_attribute_bylname)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: localName; type: string_byref_const - DCHECK(!localName.empty()); - if (localName.empty()) - return false; - // Verify param: namespaceURI; type: string_byref_const - DCHECK(!namespaceURI.empty()); - if (namespaceURI.empty()) - return false; - - // Execute - int _retval = struct_->move_to_attribute_bylname(struct_, - localName.GetStruct(), - namespaceURI.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToFirstAttribute() { - if (CEF_MEMBER_MISSING(struct_, move_to_first_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->move_to_first_attribute(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToNextAttribute() { - if (CEF_MEMBER_MISSING(struct_, move_to_next_attribute)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->move_to_next_attribute(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefXmlReaderCToCpp::MoveToCarryingElement() { - if (CEF_MEMBER_MISSING(struct_, move_to_carrying_element)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->move_to_carrying_element(struct_); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h deleted file mode 100644 index ab8653c76..000000000 --- a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h +++ /dev/null @@ -1,70 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_xml_reader.h" -#include "include/capi/cef_xml_reader_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefXmlReaderCToCpp - : public CefCToCpp { - public: - explicit CefXmlReaderCToCpp(cef_xml_reader_t* str) - : CefCToCpp(str) {} - virtual ~CefXmlReaderCToCpp() {} - - // CefXmlReader methods - virtual bool MoveToNextNode() OVERRIDE; - virtual bool Close() OVERRIDE; - virtual bool HasError() OVERRIDE; - virtual CefString GetError() OVERRIDE; - virtual NodeType GetType() OVERRIDE; - virtual int GetDepth() OVERRIDE; - virtual CefString GetLocalName() OVERRIDE; - virtual CefString GetPrefix() OVERRIDE; - virtual CefString GetQualifiedName() OVERRIDE; - virtual CefString GetNamespaceURI() OVERRIDE; - virtual CefString GetBaseURI() OVERRIDE; - virtual CefString GetXmlLang() OVERRIDE; - virtual bool IsEmptyElement() OVERRIDE; - virtual bool HasValue() OVERRIDE; - virtual CefString GetValue() OVERRIDE; - virtual bool HasAttributes() OVERRIDE; - virtual size_t GetAttributeCount() OVERRIDE; - virtual CefString GetAttribute(int index) OVERRIDE; - virtual CefString GetAttribute(const CefString& qualifiedName) OVERRIDE; - virtual CefString GetAttribute(const CefString& localName, - const CefString& namespaceURI) OVERRIDE; - virtual CefString GetInnerXml() OVERRIDE; - virtual CefString GetOuterXml() OVERRIDE; - virtual int GetLineNumber() OVERRIDE; - virtual bool MoveToAttribute(int index) OVERRIDE; - virtual bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE; - virtual bool MoveToAttribute(const CefString& localName, - const CefString& namespaceURI) OVERRIDE; - virtual bool MoveToFirstAttribute() OVERRIDE; - virtual bool MoveToNextAttribute() OVERRIDE; - virtual bool MoveToCarryingElement() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ - diff --git a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc deleted file mode 100644 index a1dc226ed..000000000 --- a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc +++ /dev/null @@ -1,220 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" -#include "libcef_dll/ctocpp/zip_reader_ctocpp.h" - - -// STATIC METHODS - Body may be edited by hand. - -CefRefPtr CefZipReader::Create( - CefRefPtr stream) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: stream; type: refptr_same - DCHECK(stream.get()); - if (!stream.get()) - return NULL; - - // Execute - cef_zip_reader_t* _retval = cef_zip_reader_create( - CefStreamReaderCToCpp::Unwrap(stream)); - - // Return type: refptr_same - return CefZipReaderCToCpp::Wrap(_retval); -} - - -// VIRTUAL METHODS - Body may be edited by hand. - -bool CefZipReaderCToCpp::MoveToFirstFile() { - if (CEF_MEMBER_MISSING(struct_, move_to_first_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->move_to_first_file(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::MoveToNextFile() { - if (CEF_MEMBER_MISSING(struct_, move_to_next_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->move_to_next_file(struct_); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::MoveToFile(const CefString& fileName, - bool caseSensitive) { - if (CEF_MEMBER_MISSING(struct_, move_to_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: fileName; type: string_byref_const - DCHECK(!fileName.empty()); - if (fileName.empty()) - return false; - - // Execute - int _retval = struct_->move_to_file(struct_, - fileName.GetStruct(), - caseSensitive); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::Close() { - if (CEF_MEMBER_MISSING(struct_, close)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->close(struct_); - - // Return type: bool - return _retval?true:false; -} - -CefString CefZipReaderCToCpp::GetFileName() { - if (CEF_MEMBER_MISSING(struct_, get_file_name)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_file_name(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - -int64 CefZipReaderCToCpp::GetFileSize() { - if (CEF_MEMBER_MISSING(struct_, get_file_size)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->get_file_size(struct_); - - // Return type: simple - return _retval; -} - -time_t CefZipReaderCToCpp::GetFileLastModified() { - if (CEF_MEMBER_MISSING(struct_, get_file_last_modified)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - time_t _retval = struct_->get_file_last_modified(struct_); - - // Return type: simple - return _retval; -} - -bool CefZipReaderCToCpp::OpenFile(const CefString& password) { - if (CEF_MEMBER_MISSING(struct_, open_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: password - - // Execute - int _retval = struct_->open_file(struct_, - password.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -bool CefZipReaderCToCpp::CloseFile() { - if (CEF_MEMBER_MISSING(struct_, close_file)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->close_file(struct_); - - // Return type: bool - return _retval?true:false; -} - -int CefZipReaderCToCpp::ReadFile(void* buffer, size_t bufferSize) { - if (CEF_MEMBER_MISSING(struct_, read_file)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: buffer; type: simple_byaddr - DCHECK(buffer); - if (!buffer) - return 0; - - // Execute - int _retval = struct_->read_file(struct_, - buffer, - bufferSize); - - // Return type: simple - return _retval; -} - -int64 CefZipReaderCToCpp::Tell() { - if (CEF_MEMBER_MISSING(struct_, tell)) - return 0; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int64 _retval = struct_->tell(struct_); - - // Return type: simple - return _retval; -} - -bool CefZipReaderCToCpp::Eof() { - if (CEF_MEMBER_MISSING(struct_, eof)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = struct_->eof(struct_); - - // Return type: bool - return _retval?true:false; -} - - -#ifndef NDEBUG -template<> long CefCToCpp::DebugObjCt = 0; -#endif - diff --git a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h deleted file mode 100644 index 812516d5a..000000000 --- a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h +++ /dev/null @@ -1,52 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ -#define CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ -#pragma once - -#ifndef USING_CEF_SHARED -#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") -#else // USING_CEF_SHARED - -#include "include/cef_zip_reader.h" -#include "include/capi/cef_zip_reader_capi.h" -#include "libcef_dll/ctocpp/ctocpp.h" - -// Wrap a C structure with a C++ class. -// This class may be instantiated and accessed wrapper-side only. -class CefZipReaderCToCpp - : public CefCToCpp { - public: - explicit CefZipReaderCToCpp(cef_zip_reader_t* str) - : CefCToCpp(str) {} - virtual ~CefZipReaderCToCpp() {} - - // CefZipReader methods - virtual bool MoveToFirstFile() OVERRIDE; - virtual bool MoveToNextFile() OVERRIDE; - virtual bool MoveToFile(const CefString& fileName, - bool caseSensitive) OVERRIDE; - virtual bool Close() OVERRIDE; - virtual CefString GetFileName() OVERRIDE; - virtual int64 GetFileSize() OVERRIDE; - virtual time_t GetFileLastModified() OVERRIDE; - virtual bool OpenFile(const CefString& password) OVERRIDE; - virtual bool CloseFile() OVERRIDE; - virtual int ReadFile(void* buffer, size_t bufferSize) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual bool Eof() OVERRIDE; -}; - -#endif // USING_CEF_SHARED -#endif // CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ - diff --git a/cef/libcef_dll/libcef_dll.cc b/cef/libcef_dll/libcef_dll.cc deleted file mode 100644 index 342fa2260..000000000 --- a/cef/libcef_dll/libcef_dll.cc +++ /dev/null @@ -1,514 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. -// -// --------------------------------------------------------------------------- -// -// This file was generated by the CEF translator tool. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "include/cef_app.h" -#include "include/capi/cef_app_capi.h" -#include "include/cef_origin_whitelist.h" -#include "include/capi/cef_origin_whitelist_capi.h" -#include "include/cef_path_util.h" -#include "include/capi/cef_path_util_capi.h" -#include "include/cef_process_util.h" -#include "include/capi/cef_process_util_capi.h" -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "include/cef_url.h" -#include "include/capi/cef_url_capi.h" -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "libcef_dll/cpptoc/auth_callback_cpptoc.h" -#include "libcef_dll/cpptoc/before_download_callback_cpptoc.h" -#include "libcef_dll/cpptoc/binary_value_cpptoc.h" -#include "libcef_dll/cpptoc/browser_cpptoc.h" -#include "libcef_dll/cpptoc/browser_host_cpptoc.h" -#include "libcef_dll/cpptoc/callback_cpptoc.h" -#include "libcef_dll/cpptoc/command_line_cpptoc.h" -#include "libcef_dll/cpptoc/context_menu_params_cpptoc.h" -#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h" -#include "libcef_dll/cpptoc/domdocument_cpptoc.h" -#include "libcef_dll/cpptoc/domevent_cpptoc.h" -#include "libcef_dll/cpptoc/domnode_cpptoc.h" -#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" -#include "libcef_dll/cpptoc/download_item_cpptoc.h" -#include "libcef_dll/cpptoc/download_item_callback_cpptoc.h" -#include "libcef_dll/cpptoc/frame_cpptoc.h" -#include "libcef_dll/cpptoc/geolocation_callback_cpptoc.h" -#include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h" -#include "libcef_dll/cpptoc/list_value_cpptoc.h" -#include "libcef_dll/cpptoc/menu_model_cpptoc.h" -#include "libcef_dll/cpptoc/process_message_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_registrar_cpptoc.h" -#include "libcef_dll/cpptoc/stream_reader_cpptoc.h" -#include "libcef_dll/cpptoc/stream_writer_cpptoc.h" -#include "libcef_dll/cpptoc/urlrequest_cpptoc.h" -#include "libcef_dll/cpptoc/v8context_cpptoc.h" -#include "libcef_dll/cpptoc/v8exception_cpptoc.h" -#include "libcef_dll/cpptoc/v8value_cpptoc.h" -#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h" -#include "libcef_dll/cpptoc/xml_reader_cpptoc.h" -#include "libcef_dll/cpptoc/zip_reader_cpptoc.h" -#include "libcef_dll/ctocpp/app_ctocpp.h" -#include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h" -#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" -#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" -#include "libcef_dll/ctocpp/domevent_listener_ctocpp.h" -#include "libcef_dll/ctocpp/domvisitor_ctocpp.h" -#include "libcef_dll/ctocpp/display_handler_ctocpp.h" -#include "libcef_dll/ctocpp/download_handler_ctocpp.h" -#include "libcef_dll/ctocpp/focus_handler_ctocpp.h" -#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h" -#include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h" -#include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h" -#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h" -#include "libcef_dll/ctocpp/load_handler_ctocpp.h" -#include "libcef_dll/ctocpp/proxy_handler_ctocpp.h" -#include "libcef_dll/ctocpp/read_handler_ctocpp.h" -#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h" -#include "libcef_dll/ctocpp/request_handler_ctocpp.h" -#include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h" -#include "libcef_dll/ctocpp/resource_handler_ctocpp.h" -#include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h" -#include "libcef_dll/ctocpp/string_visitor_ctocpp.h" -#include "libcef_dll/ctocpp/task_ctocpp.h" -#include "libcef_dll/ctocpp/urlrequest_client_ctocpp.h" -#include "libcef_dll/ctocpp/v8accessor_ctocpp.h" -#include "libcef_dll/ctocpp/v8handler_ctocpp.h" -#include "libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h" -#include "libcef_dll/ctocpp/write_handler_ctocpp.h" - - -// GLOBAL FUNCTIONS - Body may be edited by hand. - -CEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args, - struct _cef_app_t* application) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: args; type: struct_byref_const - DCHECK(args); - if (!args) - return 0; - // Unverified params: application - - // Translate param: args; type: struct_byref_const - CefMainArgs argsObj; - if (args) - argsObj.Set(*args, false); - - // Execute - int _retval = CefExecuteProcess( - argsObj, - CefAppCToCpp::Wrap(application)); - - // Return type: simple - return _retval; -} - -CEF_EXPORT int cef_initialize(const struct _cef_main_args_t* args, - const struct _cef_settings_t* settings, struct _cef_app_t* application) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: args; type: struct_byref_const - DCHECK(args); - if (!args) - return 0; - // Verify param: settings; type: struct_byref_const - DCHECK(settings); - if (!settings) - return 0; - // Unverified params: application - - // Translate param: args; type: struct_byref_const - CefMainArgs argsObj; - if (args) - argsObj.Set(*args, false); - // Translate param: settings; type: struct_byref_const - CefSettings settingsObj; - if (settings) - settingsObj.Set(*settings, false); - - // Execute - bool _retval = CefInitialize( - argsObj, - settingsObj, - CefAppCToCpp::Wrap(application)); - - // Return type: bool - return _retval; -} - -CEF_EXPORT void cef_shutdown() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefShutdown(); - -#ifndef NDEBUG - // Check that all wrapper objects have been destroyed - DCHECK_EQ(CefAuthCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefBeforeDownloadCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefBinaryValueCppToC::DebugObjCt, 0); - DCHECK_EQ(CefBrowserCppToC::DebugObjCt, 0); - DCHECK_EQ(CefBrowserHostCppToC::DebugObjCt, 0); - DCHECK_EQ(CefBrowserProcessHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefContextMenuHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefContextMenuParamsCppToC::DebugObjCt, 0); - DCHECK_EQ(CefCookieManagerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefCookieVisitorCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDOMDocumentCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDOMEventCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDOMEventListenerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDOMNodeCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDOMVisitorCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDictionaryValueCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDisplayHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDownloadHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDownloadItemCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDownloadItemCppToC::DebugObjCt, 0); - DCHECK_EQ(CefFocusHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefFrameCppToC::DebugObjCt, 0); - DCHECK_EQ(CefGeolocationCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefGeolocationHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefJSDialogCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefJSDialogHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefKeyboardHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefLifeSpanHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefListValueCppToC::DebugObjCt, 0); - DCHECK_EQ(CefLoadHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefMenuModelCppToC::DebugObjCt, 0); - DCHECK_EQ(CefProcessMessageCppToC::DebugObjCt, 0); - DCHECK_EQ(CefProxyHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefReadHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefRenderProcessHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefRequestHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefResourceBundleHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefResourceHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefSchemeHandlerFactoryCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefSchemeRegistrarCppToC::DebugObjCt, 0); - DCHECK_EQ(CefStreamReaderCppToC::DebugObjCt, 0); - DCHECK_EQ(CefStreamWriterCppToC::DebugObjCt, 0); - DCHECK_EQ(CefStringVisitorCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefTaskCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefURLRequestClientCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefURLRequestCppToC::DebugObjCt, 0); - DCHECK_EQ(CefV8AccessorCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefV8ContextCppToC::DebugObjCt, 0); - DCHECK_EQ(CefV8ExceptionCppToC::DebugObjCt, 0); - DCHECK_EQ(CefV8HandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefV8ValueCppToC::DebugObjCt, 0); - DCHECK_EQ(CefWebPluginInfoCppToC::DebugObjCt, 0); - DCHECK_EQ(CefWebPluginInfoVisitorCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefWriteHandlerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefXmlReaderCppToC::DebugObjCt, 0); - DCHECK_EQ(CefZipReaderCppToC::DebugObjCt, 0); -#endif // !NDEBUG -} - -CEF_EXPORT void cef_do_message_loop_work() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefDoMessageLoopWork(); -} - -CEF_EXPORT void cef_run_message_loop() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefRunMessageLoop(); -} - -CEF_EXPORT void cef_quit_message_loop() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - CefQuitMessageLoop(); -} - -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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: source_origin; type: string_byref_const - DCHECK(source_origin); - if (!source_origin) - return 0; - // Verify param: target_protocol; type: string_byref_const - DCHECK(target_protocol); - if (!target_protocol) - return 0; - // Unverified params: target_domain - - // Execute - bool _retval = CefAddCrossOriginWhitelistEntry( - CefString(source_origin), - CefString(target_protocol), - CefString(target_domain), - allow_target_subdomains?true:false); - - // Return type: bool - return _retval; -} - -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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: source_origin; type: string_byref_const - DCHECK(source_origin); - if (!source_origin) - return 0; - // Verify param: target_protocol; type: string_byref_const - DCHECK(target_protocol); - if (!target_protocol) - return 0; - // Unverified params: target_domain - - // Execute - bool _retval = CefRemoveCrossOriginWhitelistEntry( - CefString(source_origin), - CefString(target_protocol), - CefString(target_domain), - allow_target_subdomains?true:false); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_clear_cross_origin_whitelist() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - bool _retval = CefClearCrossOriginWhitelist(); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_get_path(enum cef_path_key_t key, cef_string_t* path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref - DCHECK(path); - if (!path) - return 0; - - // Translate param: path; type: string_byref - CefString pathStr(path); - - // Execute - bool _retval = CefGetPath( - key, - pathStr); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: command_line; type: refptr_same - DCHECK(command_line); - if (!command_line) - return 0; - - // Execute - bool _retval = CefLaunchProcess( - CefCommandLineCppToC::Unwrap(command_line)); - - // Return type: bool - return _retval; -} - -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) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(scheme_name); - if (!scheme_name) - return 0; - // Unverified params: domain_name, factory - - // Execute - bool _retval = CefRegisterSchemeHandlerFactory( - CefString(scheme_name), - CefString(domain_name), - CefSchemeHandlerFactoryCToCpp::Wrap(factory)); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_clear_scheme_handler_factories() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - bool _retval = CefClearSchemeHandlerFactories(); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - bool _retval = CefCurrentlyOn( - threadId); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_post_task(cef_thread_id_t threadId, - struct _cef_task_t* task) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task); - if (!task) - return 0; - - // Execute - bool _retval = CefPostTask( - threadId, - CefTaskCToCpp::Wrap(task)); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, - struct _cef_task_t* task, int64 delay_ms) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task); - if (!task) - return 0; - - // Execute - bool _retval = CefPostDelayedTask( - threadId, - CefTaskCToCpp::Wrap(task), - delay_ms); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_parse_url(const cef_string_t* url, - struct _cef_urlparts_t* parts) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(url); - if (!url) - return 0; - // Verify param: parts; type: struct_byref - DCHECK(parts); - if (!parts) - return 0; - - // Translate param: parts; type: struct_byref - CefURLParts partsObj; - if (parts) - partsObj.AttachTo(*parts); - - // Execute - bool _retval = CefParseURL( - CefString(url), - partsObj); - - // Restore param: parts; type: struct_byref - if (parts) - partsObj.DetachTo(*parts); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts, - cef_string_t* url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: parts; type: struct_byref_const - DCHECK(parts); - if (!parts) - return 0; - // Verify param: url; type: string_byref - DCHECK(url); - if (!url) - return 0; - - // Translate param: parts; type: struct_byref_const - CefURLParts partsObj; - if (parts) - partsObj.Set(*parts, false); - // Translate param: url; type: string_byref - CefString urlStr(url); - - // Execute - bool _retval = CefCreateURL( - partsObj, - urlStr); - - // Return type: bool - return _retval; -} - -CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name, - const cef_string_t* javascript_code, struct _cef_v8handler_t* handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: extension_name; type: string_byref_const - DCHECK(extension_name); - if (!extension_name) - return 0; - // Verify param: javascript_code; type: string_byref_const - DCHECK(javascript_code); - if (!javascript_code) - return 0; - // Unverified params: handler - - // Execute - bool _retval = CefRegisterExtension( - CefString(extension_name), - CefString(javascript_code), - CefV8HandlerCToCpp::Wrap(handler)); - - // Return type: bool - return _retval; -} - -CEF_EXPORT void cef_visit_web_plugin_info( - struct _cef_web_plugin_info_visitor_t* visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor); - if (!visitor) - return; - - // Execute - CefVisitWebPluginInfo( - CefWebPluginInfoVisitorCToCpp::Wrap(visitor)); -} - diff --git a/cef/libcef_dll/libcef_dll.rc b/cef/libcef_dll/libcef_dll.rc deleted file mode 100644 index da6009deb..000000000 --- a/cef/libcef_dll/libcef_dll.rc +++ /dev/null @@ -1,143 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#include "include/cef_version.h" -#undef APSTUDIO_HIDDEN_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#include ""include/version.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ALERT DIALOGEX 0, 0, 241, 76 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "JavaScript Alert" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,184,55,50,14 - LTEXT "",IDC_DIALOGTEXT,16,17,210,30 -END - -IDD_CONFIRM DIALOGEX 0, 0, 241, 76 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "JavaScript Confirm" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - PUSHBUTTON "Cancel",IDCANCEL,184,55,50,14 - DEFPUSHBUTTON "OK",IDOK,131,55,50,14 - LTEXT "",IDC_DIALOGTEXT,16,17,210,30 -END - -IDD_PROMPT DIALOGEX 0, 0, 241, 76 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "JavaScript Prompt" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,131,55,50,14 - LTEXT "",IDC_DIALOGTEXT,16,17,210,18 - PUSHBUTTON "Cancel",IDCANCEL,184,55,50,14 - EDITTEXT IDC_PROMPTEDIT,15,33,210,14,ES_AUTOHSCROLL -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,CHROME_VERSION_BUILD,CEF_REVISION,0 - PRODUCTVERSION 3,CHROME_VERSION_BUILD,CEF_REVISION,0 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Chromium Embedded Framework (CEF) Dynamic Link Library" - VALUE "FileVersion", "3." MAKE_STRING(CHROME_VERSION_BUILD) "." MAKE_STRING(CEF_REVISION) - VALUE "InternalName", "libcef" - VALUE "LegalCopyright", "Copyright (C) " MAKE_STRING(COPYRIGHT_YEAR) " The Chromium Embedded Framework Authors" - VALUE "OriginalFilename", "libcef.dll" - VALUE "ProductName", "Chromium Embedded Framework (CEF) Dynamic Link Library" - VALUE "ProductVersion", "3." MAKE_STRING(CHROME_VERSION_BUILD) "." MAKE_STRING(CEF_REVISION) - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/cef/libcef_dll/libcef_dll2.cc b/cef/libcef_dll/libcef_dll2.cc deleted file mode 100644 index 1f5272029..000000000 --- a/cef/libcef_dll/libcef_dll2.cc +++ /dev/null @@ -1,12 +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. -// - -#include "include/cef_version.h" -#include "cef_logging.h" - -CEF_EXPORT int cef_build_revision() -{ - return CEF_REVISION; -} diff --git a/cef/libcef_dll/resource.h b/cef/libcef_dll/resource.h deleted file mode 100644 index cbeef193d..000000000 --- a/cef/libcef_dll/resource.h +++ /dev/null @@ -1,26 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by libcef_dll.rc -// - -// Avoid files associated with MacOS -#define _X86_ - -#define IDD_ALERT 130 -#define IDD_CONFIRM 131 -#define IDD_PROMPT 132 -#define IDC_PROMPTEDIT 1000 -#define IDC_DIALOGTEXT 1001 - - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 130 -#define _APS_NEXT_COMMAND_VALUE 32000 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 110 -#endif -#endif diff --git a/cef/libcef_dll/transfer_util.cpp b/cef/libcef_dll/transfer_util.cpp deleted file mode 100644 index e9d8d4e22..000000000 --- a/cef/libcef_dll/transfer_util.cpp +++ /dev/null @@ -1,72 +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. - -#include "transfer_util.h" - -void transfer_string_list_contents(cef_string_list_t fromList, - StringList& toList) -{ - int size = cef_string_list_size(fromList); - CefString value; - - for(int i = 0; i < size; i++) { - cef_string_list_value(fromList, i, value.GetWritableStruct()); - toList.push_back(value); - } -} - -void transfer_string_list_contents(const StringList& fromList, - cef_string_list_t toList) -{ - size_t size = fromList.size(); - for(size_t i = 0; i < size; ++i) - cef_string_list_append(toList, fromList[i].GetStruct()); -} - -void transfer_string_map_contents(cef_string_map_t fromMap, - StringMap& toMap) -{ - int size = cef_string_map_size(fromMap); - CefString key, value; - - for(int i = 0; i < size; ++i) { - cef_string_map_key(fromMap, i, key.GetWritableStruct()); - cef_string_map_value(fromMap, i, value.GetWritableStruct()); - - toMap.insert(std::make_pair(key, value)); - } -} - -void transfer_string_map_contents(const StringMap& fromMap, - cef_string_map_t toMap) -{ - StringMap::const_iterator it = fromMap.begin(); - for(; it != fromMap.end(); ++it) - cef_string_map_append(toMap, it->first.GetStruct(), it->second.GetStruct()); -} - -void transfer_string_multimap_contents(cef_string_multimap_t fromMap, - StringMultimap& toMap) -{ - int size = cef_string_multimap_size(fromMap); - CefString key, value; - - for(int i = 0; i < size; ++i) { - cef_string_multimap_key(fromMap, i, key.GetWritableStruct()); - cef_string_multimap_value(fromMap, i, value.GetWritableStruct()); - - toMap.insert(std::make_pair(key, value)); - } -} - -void transfer_string_multimap_contents(const StringMultimap& fromMap, - cef_string_multimap_t toMap) -{ - StringMultimap::const_iterator it = fromMap.begin(); - for(; it != fromMap.end(); ++it) { - cef_string_multimap_append(toMap, - it->first.GetStruct(), - it->second.GetStruct()); - } -} diff --git a/cef/libcef_dll/transfer_util.h b/cef/libcef_dll/transfer_util.h deleted file mode 100644 index 88dff1a38..000000000 --- a/cef/libcef_dll/transfer_util.h +++ /dev/null @@ -1,37 +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. - -#ifndef CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ -#define CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ -#pragma once - -#include -#include - -#include "include/internal/cef_string_list.h" -#include "include/internal/cef_string_map.h" -#include "include/internal/cef_string_multimap.h" - -// Copy contents from one list type to another. -typedef std::vector StringList; -void transfer_string_list_contents(cef_string_list_t fromList, - StringList& toList); -void transfer_string_list_contents(const StringList& fromList, - cef_string_list_t toList); - -// Copy contents from one map type to another. -typedef std::map StringMap; -void transfer_string_map_contents(cef_string_map_t fromMap, - StringMap& toMap); -void transfer_string_map_contents(const StringMap& fromMap, - cef_string_map_t toMap); - -// Copy contents from one map type to another. -typedef std::multimap StringMultimap; -void transfer_string_multimap_contents(cef_string_multimap_t fromMap, - StringMultimap& toMap); -void transfer_string_multimap_contents(const StringMultimap& fromMap, - cef_string_multimap_t toMap); - -#endif // CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ diff --git a/cef/libcef_dll/wrapper/cef_byte_read_handler.cc b/cef/libcef_dll/wrapper/cef_byte_read_handler.cc deleted file mode 100644 index 77a0188f6..000000000 --- a/cef/libcef_dll/wrapper/cef_byte_read_handler.cc +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2010 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. - -#include "include/wrapper/cef_byte_read_handler.h" -#include -#include "libcef_dll/cef_logging.h" - -CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size, - CefRefPtr source) - : bytes_(bytes), size_(size), offset_(0), source_(source) { -} - -size_t CefByteReadHandler::Read(void* ptr, size_t size, size_t n) { - AutoLock lock_scope(this); - size_t s = static_cast(size_ - offset_) / size; - size_t ret = std::min(n, s); - memcpy(ptr, bytes_ + offset_, ret * size); - offset_ += ret * size; - return ret; -} - -int CefByteReadHandler::Seek(int64 offset, int whence) { - int rv = -1L; - AutoLock lock_scope(this); - switch (whence) { - case SEEK_CUR: - if (offset_ + offset > size_ || offset_ + offset < 0) - break; - offset_ += offset; - rv = 0; - break; - case SEEK_END: { -#if defined(OS_WIN) - int64 offset_abs = _abs64(offset); -#else - int64 offset_abs = abs(offset); -#endif - if (offset_abs > size_) - break; - offset_ = size_ - offset_abs; - rv = 0; - break; - } - case SEEK_SET: - if (offset > size_ || offset < 0) - break; - offset_ = offset; - rv = 0; - break; - } - - return rv; -} - -int64 CefByteReadHandler::Tell() { - AutoLock lock_scope(this); - return offset_; -} - -int CefByteReadHandler::Eof() { - AutoLock lock_scope(this); - return (offset_ >= size_); -} diff --git a/cef/libcef_dll/wrapper/cef_stream_resource_handler.cc b/cef/libcef_dll/wrapper/cef_stream_resource_handler.cc deleted file mode 100644 index 91f5e94cf..000000000 --- a/cef/libcef_dll/wrapper/cef_stream_resource_handler.cc +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. - -#include "include/wrapper/cef_stream_resource_handler.h" -#include "include/cef_callback.h" -#include "include/cef_request.h" -#include "include/cef_stream.h" -#include "libcef_dll/cef_logging.h" - -CefStreamResourceHandler::CefStreamResourceHandler( - const CefString& mime_type, - CefRefPtr stream) - : status_code_(200), - mime_type_(mime_type), - stream_(stream) { - DCHECK(!mime_type_.empty()); - DCHECK(stream_.get()); -} - -CefStreamResourceHandler::CefStreamResourceHandler( - int status_code, - const CefString& mime_type, - CefResponse::HeaderMap header_map, - CefRefPtr stream) - : status_code_(status_code), - mime_type_(mime_type), - header_map_(header_map), - stream_(stream) { - DCHECK(!mime_type_.empty()); - DCHECK(stream_.get()); -} - -bool CefStreamResourceHandler::ProcessRequest(CefRefPtr request, - CefRefPtr callback) { - callback->Continue(); - return true; -} - -void CefStreamResourceHandler::GetResponseHeaders( - CefRefPtr response, - int64& response_length, - CefString& redirectUrl) { - response->SetStatus(status_code_); - response->SetMimeType(mime_type_); - - if (!header_map_.empty()) - response->SetHeaderMap(header_map_); - - response_length = -1; -} - -bool CefStreamResourceHandler::ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) { - bytes_read = stream_->Read(data_out, 1, bytes_to_read); - return (bytes_read > 0); -} - -void CefStreamResourceHandler::Cancel() { -} diff --git a/cef/libcef_dll/wrapper/cef_xml_object.cc b/cef/libcef_dll/wrapper/cef_xml_object.cc deleted file mode 100644 index 49b1ff586..000000000 --- a/cef/libcef_dll/wrapper/cef_xml_object.cc +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) 2010 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. - -#include "include/wrapper/cef_xml_object.h" -#include "include/cef_stream.h" -#include "libcef_dll/cef_logging.h" -#include - -namespace { - -class CefXmlObjectLoader { - public: - explicit CefXmlObjectLoader(CefRefPtr root_object) - : root_object_(root_object) { - } - - bool Load(CefRefPtr stream, - CefXmlReader::EncodingType encodingType, - const CefString& URI) { - CefRefPtr reader( - CefXmlReader::Create(stream, encodingType, URI)); - if (!reader.get()) - return false; - - bool ret = reader->MoveToNextNode(); - if (ret) { - CefRefPtr cur_object(root_object_), new_object; - CefXmlObject::ObjectVector queue; - int cur_depth, value_depth = -1; - CefXmlReader::NodeType cur_type; - std::stringstream cur_value; - bool last_has_ns = false; - - queue.push_back(root_object_); - - do { - cur_depth = reader->GetDepth(); - if (value_depth >= 0 && cur_depth > value_depth) { - // The current node has already been parsed as part of a value. - continue; - } - - cur_type = reader->GetType(); - if (cur_type == XML_NODE_ELEMENT_START) { - if (cur_depth == value_depth) { - // Add to the current value. - cur_value << std::string(reader->GetOuterXml()); - continue; - } else if (last_has_ns && reader->GetPrefix().empty()) { - if (!cur_object->HasChildren()) { - // Start a new value because the last element has a namespace and - // this element does not. - value_depth = cur_depth; - cur_value << std::string(reader->GetOuterXml()); - } else { - // Value following a child element is not allowed. - std::stringstream ss; - ss << L"Value following child element, line " << - reader->GetLineNumber(); - load_error_ = ss.str(); - ret = false; - break; - } - } else { - // Start a new element. - new_object = new CefXmlObject(reader->GetQualifiedName()); - cur_object->AddChild(new_object); - last_has_ns = !reader->GetPrefix().empty(); - - if (!reader->IsEmptyElement()) { - // The new element potentially has a value and/or children, so - // set the current object and add the object to the queue. - cur_object = new_object; - queue.push_back(cur_object); - } - - if (reader->HasAttributes() && reader->MoveToFirstAttribute()) { - // Read all object attributes. - do { - new_object->SetAttributeValue(reader->GetQualifiedName(), - reader->GetValue()); - } while (reader->MoveToNextAttribute()); - reader->MoveToCarryingElement(); - } - } - } else if (cur_type == XML_NODE_ELEMENT_END) { - if (cur_depth == value_depth) { - // Ending an element that is already in the value. - continue; - } else if (cur_depth < value_depth) { - // Done with parsing the value portion of the current element. - cur_object->SetValue(cur_value.str()); - cur_value.str(""); - value_depth = -1; - } - - // Pop the current element from the queue. - queue.pop_back(); - - if (queue.empty() || - cur_object->GetName() != reader->GetQualifiedName()) { - // Open tag without close tag or close tag without open tag should - // never occur (the parser catches this error). - DCHECK(false); - std::stringstream ss; - ss << "Mismatched end tag for " << - std::string(cur_object->GetName()) << - ", line " << reader->GetLineNumber(); - load_error_ = ss.str(); - ret = false; - break; - } - - // Set the current object to the previous object in the queue. - cur_object = queue.back().get(); - } else if (cur_type == XML_NODE_TEXT || cur_type == XML_NODE_CDATA || - cur_type == XML_NODE_ENTITY_REFERENCE) { - if (cur_depth == value_depth) { - // Add to the current value. - cur_value << std::string(reader->GetValue()); - } else if (!cur_object->HasChildren()) { - // Start a new value. - value_depth = cur_depth; - cur_value << std::string(reader->GetValue()); - } else { - // Value following a child element is not allowed. - std::stringstream ss; - ss << "Value following child element, line " << - reader->GetLineNumber(); - load_error_ = ss.str(); - ret = false; - break; - } - } - } while (reader->MoveToNextNode()); - } - - if (reader->HasError()) { - load_error_ = reader->GetError(); - return false; - } - - return ret; - } - - CefString GetLoadError() { return load_error_; } - - private: - CefString load_error_; - CefRefPtr root_object_; -}; - -} // namespace - -CefXmlObject::CefXmlObject(const CefString& name) - : name_(name), parent_(NULL) { -} - -CefXmlObject::~CefXmlObject() { -} - -bool CefXmlObject::Load(CefRefPtr stream, - CefXmlReader::EncodingType encodingType, - const CefString& URI, CefString* loadError) { - AutoLock lock_scope(this); - Clear(); - - CefXmlObjectLoader loader(this); - if (!loader.Load(stream, encodingType, URI)) { - if (loadError) - *loadError = loader.GetLoadError(); - return false; - } - return true; -} - -void CefXmlObject::Set(CefRefPtr object) { - DCHECK(object.get()); - - AutoLock lock_scope1(this); - AutoLock lock_scope2(object); - - Clear(); - name_ = object->GetName(); - Append(object, true); -} - -void CefXmlObject::Append(CefRefPtr object, - bool overwriteAttributes) { - DCHECK(object.get()); - - AutoLock lock_scope1(this); - AutoLock lock_scope2(object); - - if (object->HasChildren()) { - ObjectVector children; - object->GetChildren(children); - ObjectVector::const_iterator it = children.begin(); - for (; it != children.end(); ++it) - AddChild((*it)->Duplicate()); - } - - if (object->HasAttributes()) { - AttributeMap attributes; - object->GetAttributes(attributes); - AttributeMap::const_iterator it = attributes.begin(); - for (; it != attributes.end(); ++it) { - if (overwriteAttributes || !HasAttribute(it->first)) - SetAttributeValue(it->first, it->second); - } - } -} - -CefRefPtr CefXmlObject::Duplicate() { - CefRefPtr new_obj; - { - AutoLock lock_scope(this); - new_obj = new CefXmlObject(name_); - new_obj->Append(this, true); - } - return new_obj; -} - -void CefXmlObject::Clear() { - AutoLock lock_scope(this); - ClearChildren(); - ClearAttributes(); -} - -CefString CefXmlObject::GetName() { - CefString name; - { - AutoLock lock_scope(this); - name = name_; - } - return name; -} - -bool CefXmlObject::SetName(const CefString& name) { - DCHECK(!name.empty()); - if (name.empty()) - return false; - - AutoLock lock_scope(this); - name_ = name; - return true; -} - -bool CefXmlObject::HasParent() { - AutoLock lock_scope(this); - return (parent_ != NULL); -} - -CefRefPtr CefXmlObject::GetParent() { - CefRefPtr parent; - { - AutoLock lock_scope(this); - parent = parent_; - } - return parent; -} - -bool CefXmlObject::HasValue() { - AutoLock lock_scope(this); - return !value_.empty(); -} - -CefString CefXmlObject::GetValue() { - CefString value; - { - AutoLock lock_scope(this); - value = value_; - } - return value; -} - -bool CefXmlObject::SetValue(const CefString& value) { - AutoLock lock_scope(this); - DCHECK(children_.empty()); - if (!children_.empty()) - return false; - value_ = value; - return true; -} - -bool CefXmlObject::HasAttributes() { - AutoLock lock_scope(this); - return !attributes_.empty(); -} - -size_t CefXmlObject::GetAttributeCount() { - AutoLock lock_scope(this); - return attributes_.size(); -} - -bool CefXmlObject::HasAttribute(const CefString& name) { - if (name.empty()) - return false; - - AutoLock lock_scope(this); - AttributeMap::const_iterator it = attributes_.find(name); - return (it != attributes_.end()); -} - -CefString CefXmlObject::GetAttributeValue(const CefString& name) { - DCHECK(!name.empty()); - CefString value; - if (!name.empty()) { - AutoLock lock_scope(this); - AttributeMap::const_iterator it = attributes_.find(name); - if (it != attributes_.end()) - value = it->second; - } - return value; -} - -bool CefXmlObject::SetAttributeValue(const CefString& name, - const CefString& value) { - DCHECK(!name.empty()); - if (name.empty()) - return false; - - AutoLock lock_scope(this); - AttributeMap::iterator it = attributes_.find(name); - if (it != attributes_.end()) { - it->second = value; - } else { - attributes_.insert(std::make_pair(name, value)); - } - return true; -} - -size_t CefXmlObject::GetAttributes(AttributeMap& attributes) { - AutoLock lock_scope(this); - attributes = attributes_; - return attributes_.size(); -} - -void CefXmlObject::ClearAttributes() { - AutoLock lock_scope(this); - attributes_.clear(); -} - -bool CefXmlObject::HasChildren() { - AutoLock lock_scope(this); - return !children_.empty(); -} - -size_t CefXmlObject::GetChildCount() { - AutoLock lock_scope(this); - return children_.size(); -} - -bool CefXmlObject::HasChild(CefRefPtr child) { - DCHECK(child.get()); - - AutoLock lock_scope(this); - ObjectVector::const_iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it).get() == child.get()) - return true; - } - return false; -} - -bool CefXmlObject::AddChild(CefRefPtr child) { - DCHECK(child.get()); - if (!child.get()) - return false; - - AutoLock lock_scope1(child); - - DCHECK(child->GetParent() == NULL); - if (child->GetParent() != NULL) - return false; - - AutoLock lock_scope2(this); - - children_.push_back(child); - child->SetParent(this); - return true; -} - -bool CefXmlObject::RemoveChild(CefRefPtr child) { - DCHECK(child.get()); - - AutoLock lock_scope(this); - ObjectVector::iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it).get() == child.get()) { - children_.erase(it); - child->SetParent(NULL); - return true; - } - } - return false; -} - -size_t CefXmlObject::GetChildren(ObjectVector& children) { - AutoLock lock_scope(this); - children = children_; - return children_.size(); -} - -void CefXmlObject::ClearChildren() { - AutoLock lock_scope(this); - ObjectVector::iterator it = children_.begin(); - for (; it != children_.end(); ++it) - (*it)->SetParent(NULL); - children_.clear(); -} - -CefRefPtr CefXmlObject::FindChild(const CefString& name) { - DCHECK(!name.empty()); - if (name.empty()) - return NULL; - - AutoLock lock_scope(this); - ObjectVector::const_iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it)->GetName() == name) - return (*it); - } - return NULL; -} - -size_t CefXmlObject::FindChildren(const CefString& name, - ObjectVector& children) { - DCHECK(!name.empty()); - if (name.empty()) - return 0; - - size_t ct = 0; - - AutoLock lock_scope(this); - ObjectVector::const_iterator it = children_.begin(); - for (; it != children_.end(); ++it) { - if ((*it)->GetName() == name) { - children.push_back(*it); - ct++; - } - } - return ct; -} - -void CefXmlObject::SetParent(CefXmlObject* parent) { - AutoLock lock_scope(this); - if (parent) { - DCHECK(parent_ == NULL); - parent_ = parent; - } else { - DCHECK(parent_ != NULL); - parent_ = NULL; - } -} diff --git a/cef/libcef_dll/wrapper/cef_zip_archive.cc b/cef/libcef_dll/wrapper/cef_zip_archive.cc deleted file mode 100644 index b248e40d2..000000000 --- a/cef/libcef_dll/wrapper/cef_zip_archive.cc +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2010 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. - -#if defined(__linux__) -#include -#endif - -#include -#include -#include "include/wrapper/cef_zip_archive.h" -#include "include/cef_stream.h" -#include "include/cef_zip_reader.h" -#include "include/wrapper/cef_byte_read_handler.h" -#include "libcef_dll/cef_logging.h" - -namespace { - -class CefZipFile : public CefZipArchive::File { - public: - explicit CefZipFile(size_t size) : data_(size) {} - ~CefZipFile() {} - - // Returns the read-only data contained in the file. - virtual const unsigned char* GetData() { return &data_[0]; } - - // Returns the size of the data in the file. - virtual size_t GetDataSize() { return data_.size(); } - - // Returns a CefStreamReader object for streaming the contents of the file. - virtual CefRefPtr GetStreamReader() { - CefRefPtr handler( - new CefByteReadHandler(GetData(), GetDataSize(), this)); - return CefStreamReader::CreateForHandler(handler); - } - - std::vector* GetDataVector() { return &data_; } - - private: - std::vector data_; - - IMPLEMENT_REFCOUNTING(CefZipFile); -}; - -} // namespace - -// CefZipArchive implementation - -CefZipArchive::CefZipArchive() { -} - -CefZipArchive::~CefZipArchive() { -} - -size_t CefZipArchive::Load(CefRefPtr stream, - bool overwriteExisting) { - AutoLock lock_scope(this); - - CefRefPtr reader(CefZipReader::Create(stream)); - if (!reader.get()) - return 0; - - if (!reader->MoveToFirstFile()) - return 0; - - std::wstring name; - CefRefPtr contents; - FileMap::iterator it; - std::vector* data; - size_t count = 0, size, offset; - - do { - size = static_cast(reader->GetFileSize()); - if (size == 0) { - // Skip directories and empty files. - continue; - } - - if (!reader->OpenFile(CefString())) - break; - - name = reader->GetFileName(); - std::transform(name.begin(), name.end(), name.begin(), towlower); - - it = contents_.find(name); - if (it != contents_.end()) { - if (overwriteExisting) - contents_.erase(it); - else // Skip files that already exist. - continue; - } - - contents = new CefZipFile(size); - data = contents->GetDataVector(); - offset = 0; - - // Read the file contents. - do { - offset += reader->ReadFile(&(*data)[offset], size - offset); - } while (offset < size && !reader->Eof()); - - DCHECK(offset == size); - - reader->CloseFile(); - count++; - - // Add the file to the map. - contents_.insert(std::make_pair(name, contents.get())); - } while (reader->MoveToNextFile()); - - return count; -} - -void CefZipArchive::Clear() { - AutoLock lock_scope(this); - contents_.clear(); -} - -size_t CefZipArchive::GetFileCount() { - AutoLock lock_scope(this); - return contents_.size(); -} - -bool CefZipArchive::HasFile(const CefString& fileName) { - std::wstring str = fileName; - std::transform(str.begin(), str.end(), str.begin(), towlower); - - AutoLock lock_scope(this); - FileMap::const_iterator it = contents_.find(CefString(str)); - return (it != contents_.end()); -} - -CefRefPtr CefZipArchive::GetFile( - const CefString& fileName) { - std::wstring str = fileName; - std::transform(str.begin(), str.end(), str.begin(), towlower); - - AutoLock lock_scope(this); - FileMap::const_iterator it = contents_.find(CefString(str)); - if (it != contents_.end()) - return it->second; - return NULL; -} - -bool CefZipArchive::RemoveFile(const CefString& fileName) { - std::wstring str = fileName; - std::transform(str.begin(), str.end(), str.begin(), towlower); - - AutoLock lock_scope(this); - FileMap::iterator it = contents_.find(CefString(str)); - if (it != contents_.end()) { - contents_.erase(it); - return true; - } - return false; -} - -size_t CefZipArchive::GetFiles(FileMap& map) { - AutoLock lock_scope(this); - map = contents_; - return contents_.size(); -} diff --git a/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc b/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc deleted file mode 100644 index 0559d0e4f..000000000 --- a/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc +++ /dev/null @@ -1,648 +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. If making changes by -// hand only do so within the body of existing method and function -// implementations. See the translator.README.txt file in the tools directory -// for more information. -// - -#include "include/cef_app.h" -#include "include/capi/cef_app_capi.h" -#include "include/cef_geolocation.h" -#include "include/capi/cef_geolocation_capi.h" -#include "include/cef_origin_whitelist.h" -#include "include/capi/cef_origin_whitelist_capi.h" -#include "include/cef_path_util.h" -#include "include/capi/cef_path_util_capi.h" -#include "include/cef_process_util.h" -#include "include/capi/cef_process_util_capi.h" -#include "include/cef_scheme.h" -#include "include/capi/cef_scheme_capi.h" -#include "include/cef_task.h" -#include "include/capi/cef_task_capi.h" -#include "include/cef_trace.h" -#include "include/capi/cef_trace_capi.h" -#include "include/cef_url.h" -#include "include/capi/cef_url_capi.h" -#include "include/cef_v8.h" -#include "include/capi/cef_v8_capi.h" -#include "include/cef_web_plugin.h" -#include "include/capi/cef_web_plugin_capi.h" -#include "include/cef_version.h" -#include "libcef_dll/cpptoc/app_cpptoc.h" -#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" -#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/domevent_listener_cpptoc.h" -#include "libcef_dll/cpptoc/domvisitor_cpptoc.h" -#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/display_handler_cpptoc.h" -#include "libcef_dll/cpptoc/download_handler_cpptoc.h" -#include "libcef_dll/cpptoc/focus_handler_cpptoc.h" -#include "libcef_dll/cpptoc/geolocation_handler_cpptoc.h" -#include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h" -#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" -#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" -#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" -#include "libcef_dll/cpptoc/load_handler_cpptoc.h" -#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h" -#include "libcef_dll/cpptoc/read_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_handler_cpptoc.h" -#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" -#include "libcef_dll/cpptoc/request_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" -#include "libcef_dll/cpptoc/resource_handler_cpptoc.h" -#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" -#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" -#include "libcef_dll/cpptoc/string_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/task_cpptoc.h" -#include "libcef_dll/cpptoc/trace_client_cpptoc.h" -#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" -#include "libcef_dll/cpptoc/v8accessor_cpptoc.h" -#include "libcef_dll/cpptoc/v8handler_cpptoc.h" -#include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" -#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" -#include "libcef_dll/cpptoc/write_handler_cpptoc.h" -#include "libcef_dll/ctocpp/auth_callback_ctocpp.h" -#include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" -#include "libcef_dll/ctocpp/binary_value_ctocpp.h" -#include "libcef_dll/ctocpp/browser_ctocpp.h" -#include "libcef_dll/ctocpp/browser_host_ctocpp.h" -#include "libcef_dll/ctocpp/callback_ctocpp.h" -#include "libcef_dll/ctocpp/command_line_ctocpp.h" -#include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" -#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" -#include "libcef_dll/ctocpp/domdocument_ctocpp.h" -#include "libcef_dll/ctocpp/domevent_ctocpp.h" -#include "libcef_dll/ctocpp/domnode_ctocpp.h" -#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_ctocpp.h" -#include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" -#include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/frame_ctocpp.h" -#include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" -#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" -#include "libcef_dll/ctocpp/list_value_ctocpp.h" -#include "libcef_dll/ctocpp/menu_model_ctocpp.h" -#include "libcef_dll/ctocpp/process_message_ctocpp.h" -#include "libcef_dll/ctocpp/quota_callback_ctocpp.h" -#include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" -#include "libcef_dll/ctocpp/stream_reader_ctocpp.h" -#include "libcef_dll/ctocpp/stream_writer_ctocpp.h" -#include "libcef_dll/ctocpp/task_runner_ctocpp.h" -#include "libcef_dll/ctocpp/urlrequest_ctocpp.h" -#include "libcef_dll/ctocpp/v8context_ctocpp.h" -#include "libcef_dll/ctocpp/v8exception_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" -#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" -#include "libcef_dll/ctocpp/v8value_ctocpp.h" -#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" -#include "libcef_dll/ctocpp/xml_reader_ctocpp.h" -#include "libcef_dll/ctocpp/zip_reader_ctocpp.h" - -// Define used to facilitate parsing. -#define CEF_GLOBAL - - -// GLOBAL METHODS - Body may be edited by hand. - -CEF_GLOBAL int CefExecuteProcess(const CefMainArgs& args, - CefRefPtr application) { - int build_revision = cef_build_revision(); - if (build_revision != CEF_REVISION) { - // The libcef build revision does not match the CEF API revision. - DCHECK(false); - return 0; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: application - - // Execute - int _retval = cef_execute_process( - &args, - CefAppCppToC::Wrap(application)); - - // Return type: simple - return _retval; -} - -CEF_GLOBAL bool CefInitialize(const CefMainArgs& args, - const CefSettings& settings, CefRefPtr application) { - int build_revision = cef_build_revision(); - if (build_revision != CEF_REVISION) { - // The libcef build revision does not match the CEF API revision. - DCHECK(false); - return false; - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: application - - // Execute - int _retval = cef_initialize( - &args, - &settings, - CefAppCppToC::Wrap(application)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL void CefShutdown() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_shutdown(); - -#ifndef NDEBUG - // Check that all wrapper objects have been destroyed - DCHECK_EQ(CefAuthCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefBeforeDownloadCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefBinaryValueCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefBrowserCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefBrowserHostCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefBrowserProcessHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefContextMenuHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefContextMenuParamsCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefCookieManagerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefCookieVisitorCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDOMDocumentCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDOMEventCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDOMEventListenerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDOMNodeCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDOMVisitorCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDialogHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDictionaryValueCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDisplayHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDownloadHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefDownloadItemCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefDownloadItemCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefFileDialogCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefFocusHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefFrameCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefGeolocationCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefGeolocationHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefGetGeolocationCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefJSDialogCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefJSDialogHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefKeyboardHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefLifeSpanHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefListValueCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefLoadHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefMenuModelCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefProcessMessageCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefProxyHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefQuotaCallbackCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefReadHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefRenderHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefRenderProcessHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefRequestHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefResourceBundleHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefResourceHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefRunFileDialogCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefSchemeHandlerFactoryCppToC::DebugObjCt, 0); - DCHECK_EQ(CefSchemeRegistrarCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefStreamReaderCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefStreamWriterCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefStringVisitorCppToC::DebugObjCt, 0); - DCHECK_EQ(CefTaskCppToC::DebugObjCt, 0); - DCHECK_EQ(CefTaskRunnerCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefTraceClientCppToC::DebugObjCt, 0); - DCHECK_EQ(CefURLRequestCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefURLRequestClientCppToC::DebugObjCt, 0); - DCHECK_EQ(CefV8AccessorCppToC::DebugObjCt, 0); - DCHECK_EQ(CefV8ContextCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefV8ExceptionCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefV8HandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefV8StackFrameCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefV8StackTraceCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefV8ValueCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefWebPluginInfoCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefWebPluginInfoVisitorCppToC::DebugObjCt, 0); - DCHECK_EQ(CefWebPluginUnstableCallbackCppToC::DebugObjCt, 0); - DCHECK_EQ(CefWriteHandlerCppToC::DebugObjCt, 0); - DCHECK_EQ(CefXmlReaderCToCpp::DebugObjCt, 0); - DCHECK_EQ(CefZipReaderCToCpp::DebugObjCt, 0); -#endif // !NDEBUG -} - -CEF_GLOBAL void CefDoMessageLoopWork() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_do_message_loop_work(); -} - -CEF_GLOBAL void CefRunMessageLoop() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_run_message_loop(); -} - -CEF_GLOBAL void CefQuitMessageLoop() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_quit_message_loop(); -} - -CEF_GLOBAL bool CefGetGeolocation( - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return false; - - // Execute - int _retval = cef_get_geolocation( - CefGetGeolocationCallbackCppToC::Wrap(callback)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, - const CefString& target_protocol, const CefString& target_domain, - bool allow_target_subdomains) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: source_origin; type: string_byref_const - DCHECK(!source_origin.empty()); - if (source_origin.empty()) - return false; - // Verify param: target_protocol; type: string_byref_const - DCHECK(!target_protocol.empty()); - if (target_protocol.empty()) - return false; - // Unverified params: target_domain - - // Execute - int _retval = cef_add_cross_origin_whitelist_entry( - source_origin.GetStruct(), - target_protocol.GetStruct(), - target_domain.GetStruct(), - allow_target_subdomains); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefRemoveCrossOriginWhitelistEntry( - const CefString& source_origin, const CefString& target_protocol, - const CefString& target_domain, bool allow_target_subdomains) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: source_origin; type: string_byref_const - DCHECK(!source_origin.empty()); - if (source_origin.empty()) - return false; - // Verify param: target_protocol; type: string_byref_const - DCHECK(!target_protocol.empty()); - if (target_protocol.empty()) - return false; - // Unverified params: target_domain - - // Execute - int _retval = cef_remove_cross_origin_whitelist_entry( - source_origin.GetStruct(), - target_protocol.GetStruct(), - target_domain.GetStruct(), - allow_target_subdomains); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefClearCrossOriginWhitelist() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_clear_cross_origin_whitelist(); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_get_path( - key, - path.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefLaunchProcess(CefRefPtr command_line) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: command_line; type: refptr_same - DCHECK(command_line.get()); - if (!command_line.get()) - return false; - - // Execute - int _retval = cef_launch_process( - CefCommandLineCToCpp::Unwrap(command_line)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefRegisterSchemeHandlerFactory(const CefString& scheme_name, - const CefString& domain_name, - CefRefPtr factory) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: scheme_name; type: string_byref_const - DCHECK(!scheme_name.empty()); - if (scheme_name.empty()) - return false; - // Unverified params: domain_name, factory - - // Execute - int _retval = cef_register_scheme_handler_factory( - scheme_name.GetStruct(), - domain_name.GetStruct(), - CefSchemeHandlerFactoryCppToC::Wrap(factory)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefClearSchemeHandlerFactories() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_clear_scheme_handler_factories(); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefCurrentlyOn(CefThreadId threadId) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_currently_on( - threadId); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefPostTask(CefThreadId threadId, CefRefPtr task) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = cef_post_task( - threadId, - CefTaskCppToC::Wrap(task)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefPostDelayedTask(CefThreadId threadId, - CefRefPtr task, int64 delay_ms) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: task; type: refptr_diff - DCHECK(task.get()); - if (!task.get()) - return false; - - // Execute - int _retval = cef_post_delayed_task( - threadId, - CefTaskCppToC::Wrap(task), - delay_ms); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefBeginTracing(CefRefPtr client, - const CefString& categories) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Unverified params: client, categories - - // Execute - int _retval = cef_begin_tracing( - CefTraceClientCppToC::Wrap(client), - categories.GetStruct()); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefGetTraceBufferPercentFullAsync() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_get_trace_buffer_percent_full_async(); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefEndTracingAsync() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_end_tracing_async(); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefParseURL(const CefString& url, CefURLParts& parts) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: url; type: string_byref_const - DCHECK(!url.empty()); - if (url.empty()) - return false; - - // Execute - int _retval = cef_parse_url( - url.GetStruct(), - &parts); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefCreateURL(const CefURLParts& parts, CefString& url) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = cef_create_url( - &parts, - url.GetWritableStruct()); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL bool CefRegisterExtension(const CefString& extension_name, - const CefString& javascript_code, CefRefPtr handler) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: extension_name; type: string_byref_const - DCHECK(!extension_name.empty()); - if (extension_name.empty()) - return false; - // Verify param: javascript_code; type: string_byref_const - DCHECK(!javascript_code.empty()); - if (javascript_code.empty()) - return false; - // Unverified params: handler - - // Execute - int _retval = cef_register_extension( - extension_name.GetStruct(), - javascript_code.GetStruct(), - CefV8HandlerCppToC::Wrap(handler)); - - // Return type: bool - return _retval?true:false; -} - -CEF_GLOBAL void CefVisitWebPluginInfo( - CefRefPtr visitor) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: visitor; type: refptr_diff - DCHECK(visitor.get()); - if (!visitor.get()) - return; - - // Execute - cef_visit_web_plugin_info( - CefWebPluginInfoVisitorCppToC::Wrap(visitor)); -} - -CEF_GLOBAL void CefRefreshWebPlugins() { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_refresh_web_plugins(); -} - -CEF_GLOBAL void CefAddWebPluginPath(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_add_web_plugin_path( - path.GetStruct()); -} - -CEF_GLOBAL void CefAddWebPluginDirectory(const CefString& dir) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: dir; type: string_byref_const - DCHECK(!dir.empty()); - if (dir.empty()) - return; - - // Execute - cef_add_web_plugin_directory( - dir.GetStruct()); -} - -CEF_GLOBAL void CefRemoveWebPluginPath(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_remove_web_plugin_path( - path.GetStruct()); -} - -CEF_GLOBAL void CefUnregisterInternalWebPlugin(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_unregister_internal_web_plugin( - path.GetStruct()); -} - -CEF_GLOBAL void CefForceWebPluginShutdown(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_force_web_plugin_shutdown( - path.GetStruct()); -} - -CEF_GLOBAL void CefRegisterWebPluginCrash(const CefString& path) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - - // Execute - cef_register_web_plugin_crash( - path.GetStruct()); -} - -CEF_GLOBAL void CefIsWebPluginUnstable(const CefString& path, - CefRefPtr callback) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: path; type: string_byref_const - DCHECK(!path.empty()); - if (path.empty()) - return; - // Verify param: callback; type: refptr_diff - DCHECK(callback.get()); - if (!callback.get()) - return; - - // Execute - cef_is_web_plugin_unstable( - path.GetStruct(), - CefWebPluginUnstableCallbackCppToC::Wrap(callback)); -} - diff --git a/cef/libcef_dll/wrapper/libcef_dll_wrapper2.cc b/cef/libcef_dll/wrapper/libcef_dll_wrapper2.cc deleted file mode 100644 index dc8ba7b02..000000000 --- a/cef/libcef_dll/wrapper/libcef_dll_wrapper2.cc +++ /dev/null @@ -1,4 +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. - diff --git a/docs/packages/intro.md b/docs/authoring-packages.md similarity index 83% rename from docs/packages/intro.md rename to docs/authoring-packages.md index 7e4d20bfd..417e3363e 100644 --- a/docs/packages/intro.md +++ b/docs/authoring-packages.md @@ -1,6 +1,4 @@ -# Packages - -### Package Layout +# Authoring Packages A package can contain a variety of different resource types to change Atom's behavior. The basic package layout is as follows (not every package will @@ -22,14 +20,14 @@ my-package/ API built into Atom. The goal is to make Atom packages be a superset of NPM packages -#### package.json +## package.json Similar to npm packages, Atom packages can contain a `package.json` file in their top-level directory. This file contains metadata about the package, such as the path to its "main" module, library dependencies, and manifests specifying the order in which its resources should be loaded. -#### Source Code +## Source Code If you want to extend Atom's behavior, your package should contain a single top-level module, which you export from `index.coffee` or another file as @@ -58,7 +56,7 @@ down. If your package is watching any files or holding external resources in any other way, release them here. If you're just subscribing to things on window you don't need to worry because that's getting torn down anyway. -#### A Simple Package Layout: +## A Simple Package Layout: ```text my-package/ @@ -90,19 +88,24 @@ to build out Atom's API organically based on the needs of package authors like you. See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages) for examples of Atom's API in action. -#### Config Settings +## Stylesheets -#### Stylesheets +Stylesheets for your package should be placed in the `stylesheets` directory. +Any stylesheets in this directory will be loaded and attached to the DOM when +your package is activated. An optional `stylesheets` key in your `package.json` +can list the stylesheets by name in order to specify a load order; otherwise +stylesheets are loaded alphabetically. -#### Keymaps (Not Implemented) +## Keymaps Keymaps are placed in the `keymaps` subdirectory. By default, all keymaps will be loaded in alphabetical order unless there is a `keymaps` array in `package.json` specifying which keymaps to load and in what order. It's a good idea to provide default keymaps for your extension. They can be customized by users later. See -the **main keymaps documentation** (todo) for more information. +the (main keymaps documentation)[#keymaps] for more information on how keymaps +work. -#### Snippets (Not Implemented) +## Snippets An extension can supply snippets in a `snippets` directory as `.cson` or `.json` files: @@ -121,30 +124,10 @@ files: ``` A snippets file contains scope selectors at its top level. Each scope selector -contains a hash of snippets keyed by their name. Each snippet specifies a `prefix` -and a `body` key. +contains a hash of snippets keyed by their name. Each snippet specifies a +`prefix` and a `body` key. All files in the directory will be automatically loaded, unless the -`package.json` supplies a `snippets` key as a manifest. As with all scoped items, -snippets loaded later take precedence over earlier snippets when two snippets -match a scope with the same specificity. - -### Included Packages - -Atom comes with several built-in packages that add features to the default -editor. - -The current built-in packages are: - - * Autocomplete - * Command Logger - * Command Palette - * Fuzzy finder - * [Markdown Preview](#markdown-preview) - * Outline View - * Snippets - * Status Bar - * Strip Trailing Whitespace - * Tabs - * Tree View - * [Wrap Guide](#wrap-guide) +`package.json` supplies a `snippets` key as a manifest. As with all scoped +items, snippets loaded later take precedence over earlier snippets when two +snippets match a scope with the same specificity. diff --git a/docs/authoring-themes.md b/docs/authoring-themes.md new file mode 100644 index 000000000..a91781cfc --- /dev/null +++ b/docs/authoring-themes.md @@ -0,0 +1,55 @@ +# Authoring A Theme + +If you understand CSS, you can write an Atom theme easily. Your theme can style +Atom's user interface, specify the appearance of syntax-highlighted code, or +both. For making a syntax highlighting theme, refer to +[section 12.4 of the TextMate Manual](http://manual.macromates.com/en/language_grammars.html) +for a list of the common scopes used by TextMate grammars. You'll just need to +translate scope names to CSS classes. To theme Atom's user interface, take a +look at the existing light and dark themes for an example. Pressing `alt-meta-i` +and inspecting the Atom's markup directly can also be helpful. + +The most basic theme is just a `.css` file. More complex themes occupy their own +folder, which can contain multiple stylesheets along with an optional +`package.cson` file containing a manifest to control their load-order: + +```text +~/.atom/themes/ + rockstar.css + rainbow/ + package.json + core.css + editor.css + tree-view.css +``` + +package.cson: +```coffee-script +stylesheets: ["core.css", "editor.less", "tree-view.css"] +``` + +The `package.cson` file specifies which stylesheets to load and in what order +with the `stylesheets` key. If no manifest is specified, all stylesheets are +loaded in alphabetical order when the user selects the theme. + + +## Theme Extensions (Not Yet Implemented) + +A theme may need to be extended to cover DOM elements that are introduced by a +third-party Atom package. When a package is loaded, stylesheets with the same +name as the package will automatically be loaded from the `packages` directory +of active themes: + +```text +~/.atom/themes/ + midnight/midnight.less + midnight/packages/terminal.less + midnight/packages/tree-view.less +``` + +In the example above, if the `midnight` theme is active, its `terminal` and +`tree-view` stylesheets will be loaded automatically if and when those packages +are activated. If you author an extension to a theme consider sending its author +a pull request to have it included in the theme by default. Package-specific +theme stylesheets need not be listed in the theme's `package.json` because they +will be loaded automatically when the package is loaded. diff --git a/docs/built-in-packages/command-panel.md b/docs/built-in-packages/command-panel.md new file mode 100644 index 000000000..30efa4a9b --- /dev/null +++ b/docs/built-in-packages/command-panel.md @@ -0,0 +1,25 @@ +## Command Panel + +A partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam) + +*Examples* + +`,` selects entire file + +`1,4` selects lines 1-4 + +`/pattern` selects the first match after the cursor/selection + +`s/pattern/replacement` replace first text matching pattern in current selection + +`s/pattern/replacement/g` replace all text matching pattern in current selection + +`,s/pattern/replacement/g` replace all text matching pattern in file + +`1,4s/pattern/replacement` replace all text matching pattern in lines 1-4 + +`x/pattern` selects all matches in the current selections + +`,x/pattern` selects all matches in the file + +`,x/pattern1/ x/pattern2` "structural regex" - selects all matches of pattern2 inside matches of pattern1 diff --git a/docs/built-in-packages/intro.md b/docs/built-in-packages/intro.md new file mode 100644 index 000000000..2165c7719 --- /dev/null +++ b/docs/built-in-packages/intro.md @@ -0,0 +1,3 @@ +# Built-In Packages + +Atom ships with several optional built-in packages. \ No newline at end of file diff --git a/docs/packages/markdown-preview.md b/docs/built-in-packages/markdown-preview.md similarity index 92% rename from docs/packages/markdown-preview.md rename to docs/built-in-packages/markdown-preview.md index ba9639153..1ae4aa7f8 100644 --- a/docs/packages/markdown-preview.md +++ b/docs/built-in-packages/markdown-preview.md @@ -1,4 +1,4 @@ -### Markdown Preview +## Markdown Preview The `markdown-preview` extension displays the rendered HTML for the markdown in the current editor. diff --git a/docs/packages/wrap-guide.md b/docs/built-in-packages/wrap-guide.md similarity index 78% rename from docs/packages/wrap-guide.md rename to docs/built-in-packages/wrap-guide.md index 237c23846..c16b9e2e2 100644 --- a/docs/packages/wrap-guide.md +++ b/docs/built-in-packages/wrap-guide.md @@ -1,24 +1,22 @@ -### Wrap Guide +## Wrap Guide The `wrap-guide` extension places a vertical line in each editor at a certain column to guide your formatting so lines do not exceed a certain width. By default the wrap-guide is placed at the 80th column. -#### Configuration +### Configuration You can customize where the column is placed using the `wrapGuide.columns` config option. -```json -{ - "wrapGuide": { - "columns": [ - { "pattern": "\.mm$", "column": 200 }, - { "pattern": "\.cc$", "column": 120 } - ] - } -} +config.cson: +```coffee-cript +"wrap-guide": + columns: [ + { pattern: "\.mm$", column: 200 }, + { pattern: "\.cc$", column: 120 } + ] ``` The above config example would place the guide at the 200th column for paths diff --git a/docs/configuring-and-extending.md b/docs/configuring-and-extending.md deleted file mode 100644 index 35ece3c59..000000000 --- a/docs/configuring-and-extending.md +++ /dev/null @@ -1,177 +0,0 @@ -# Configuring Atom - -Atom provides a globally-available configuration database that both the core -system and extensions look to for user- and language-specific settings. A simple -use of the database is to set things like your font-size and whether you want -Atom to hide files ignored by Git. You can assign these settings by editing -`config.cson` in your `.atom` directory: - -```coffeescript -core: - hideGitIgnoredFiles: true -editor: - fontSize: 18 -``` - -NOTE: Currently, we only support the `.json` extension. CSON support is an -aspiration. - -## Writing Config Settings - -As shown above, the config database is automatically populated from `config.cson` -when Atom is started, but you can programmatically write to it in the following -way: - -```coffeescript -# basic key update -config.set("editor.autosave", true) - -config.get("fuzzyFinder.ignoredPaths").push "vendor" -config.update() # be sure to call `config.update` after the change -``` - -You can also use `setDefaults`, which will assign default values for keys that -are always overridden by values assigned with `set`. Defaults are not written out -to the the `config.json` file to prevent it from becoming cluttered. - -```coffeescript -config.setDefaults("editor", fontSize: 18, showInvisibles: true) -``` - -See the *configuration key reference* (todo) for information on specific keys you -can use to change Atom's behavior. - -## Reading Config Settings - -You can read a value from `config` with `config.get`: - -```coffeescript -# read a value with `config.get` -@autosave() if config.get "editor.autosave" -``` - -Or you can use `observeConfig` to track changes from a view object. - -```coffeescript -class MyView extends View - initialize: -> - @observeConfig 'editor.fontSize', () => - @adjustFontSize() -``` - -The `observeConfig` method will call the given callback immediately with the -current value for the specified key path, and it will also call it in the future -whenever the value of that key path changes. - -Subscriptions made with `observeConfig` are automatically cancelled when the -view is removed. You can cancel config subscriptions manually via the -`unobserveConfig` method. - -```coffeescript -view1.unobserveConfig() # unobserve all properties -``` - -You can add the ability to observe config values to non-view classes by -extending their prototype with the `ConfigObserver` mixin: - -```coffeescript -ConfigObserver = require 'config-observer' -_.extend MyClass.prototype, ConfigObserver -``` - -# Themes - -## Selecting A Theme - -Atom comes bundles with two themes "Atom - Dark" and "Atom - Light". You can -select a theme in your core preferences pane. - -Because Atom themes are based on CSS, it's possible to have multiple themes -active at the same time. For example, you might select a theme for the UI, and -another theme for syntax highlighting. You select your theme(s) in the core -preferences pane, by selecting themes from the available list and dragging them -in your preferred order. You can also edit the selected themes manually with the -`config.core.themes` array. For example. - -```js -{ - "core": { - "themes": ["Atom - Light", "Mac Classic"] - }, - "editor": { - "fontSize": 15 - } -} -``` - -## Installing A Theme - -You install themes by placing them in the `~/.atom/themes` directory. The most -basic theme is just a `.css` or `.less` file. More complex occupy their own -folder, which can contain multiple stylesheets along with an optional -`package.json` file with a manifest to control their load-order: - -```text -~/.atom/themes/ - midnight.less - rockstar.css - rainbow/ - package.json - core.less - editor.less - tree-view.less -``` - -package.json: -```json -{ - "stylesheets": ["core.css", "editor.less", "tree-view.css"] -} -``` - -The package.json specifies which stylesheets to load and in what order with the -`stylesheets` key. If no manifest is specified, all stylesheets are loaded in -alphabetical order when the user selects the theme. - -## Authoring A Theme - -If you understand CSS, you can write an Atom theme easily. Your theme can style -Atom's user interface, specify the appearance of syntax-highlighted code, or -both. For making a syntax highlighting theme, refer to [section 12.4 of the -TextMate Manual](http://manual.macromates.com/en/language_grammars.html) for a -list of the common scopes used by TextMate grammars. You'll just need to -scope names to CSS classes. To theme Atom's user interface, refer to -[Classnames for Extension and Theme Authors]() for information about the CSS -classes used in Atom's core and the most common classes employed by -extensions. - -## Theme Extensions - -A theme will often cover the stock features of Atom, but may need to be extended -to cover extensions that weren't covered by its original author. Theme extensions -make this easy to organize. To make a theme extension, just add a theme that -matches the name of the original with an additional filename extension: - -```text -~/.atom/themes/ - midnight/midnight.less - midnight/packages/terminal.less - midnight/packages/tree-view.less -``` - -In the example above, when the `midnight` theme is loaded, its `terminal` and -`tree-view` extensions will be loaded with it. If you author a theme extension, -consider sending its author a pull request to have it included in the theme's -core. Package theme extensions, do not need to be in `package.json` because they -will be loaded when needed by the package. - -## TextMate Compatibility - -If you place a TextMate theme (either `.tmTheme` or `.plist`) in the `themes` -directory, it will automatically be translated from TextMate's format to CSS -so it works with Atom. There are a few slight differences between TextMate's -semantics and those of stylesheets, but they should be negligible in practice. - -### Grammars - -## TextMate Compatibility diff --git a/docs/features.md b/docs/features.md deleted file mode 100644 index ead022319..000000000 --- a/docs/features.md +++ /dev/null @@ -1 +0,0 @@ -# Features diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 000000000..e7b592b89 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,260 @@ +# Getting Started + +Welcome to Atom. This documentation is intented to offer a basic introduction +of how to get productive with this editor. Then we'll delve into more details +about configuring, theming, and extending Atom. + +## The Command Palette + +If there's one key-command you learn in Atom, it should be `meta-p`. You can +always hit `meta-p` to bring up a list of commands that are relevant to the +currently focused UI element. If there is a key binding for a given command, it +is also displayed. This is a great way to explore the system and get to know the +key commands interactively. If you'd like to add or change a binding for a +command, refer to the [keymaps](#keymaps) section to learn how. + +![Command Palette](http://f.cl.ly/items/32041o3w471F3C0F0V2O/Screen%20Shot%202013-02-13%20at%207.27.41%20PM.png) + +## Basic Key Bindings +Remember you can always use `meta-p` to explore available commands and their +bindings, but here's a list of a few useful commands. + +- `meta-o` : open file/directory +- `meta-n` : new window +- `meta-r` : reload the current window +- `meta-alt-ctrl-s` : run specs +- `meta-t` : open fuzzy file finder +- `meta-;` : open command prompt +- `meta-f` : open command prompt with `/` +- `meta-g` : repeat the last local search +- `meta-shift-f` : open command prompt with `Xx/` for a project-wide search +- `meta-\` : focus/open tree view, or close it when it is focused +- `meta-shift-\` : open tree view with the current file selected +- `ctrl-w v`, `ctrl-|` : split screen vertically +- `ctrl-w s`, `ctrl--` : split screen horizontally +- `meta-l` : go to line + +## Usage Basics + +### Working With Files + +#### Finding Files + +The fastest way to find a file in your project is to use the fuzzy finder. Just +hit `meta-t` and start typing the name of the file you're looking for. If you +already have the file open and want to jump to it, hit `meta-b` to bring up a +searchable list of open buffers. + +You can also use the tree view to navigate to a file. To open or move focus to +the tree view, hit `meta-\`. You can then navigate to a file and select it with +`return`. + +#### Adding, Moving, Deleting Files + +Currently, all file modification is performed via the tree view. To add a file, +select a directory in the tree view and press `a`. Then type the name of the +file. Any intermediate directories you type will be created automatically if +needed. + +To move or rename a file or directory, select it in the tree view and hit `m`. +To delete a file, select it in the tree view and hit `delete`. + +### Searching For Stuff + +#### Using the Command Line + +Atom has a command line similar to editors Emacs and Vim, which is currently the +only interface for performing searches. Hitting `meta-f` will open the command +line prepopulated with the `/` command, which finds forward in the current +buffer from the location of the cursor. Pressing `meta-g` will repeat the +search. Hitting `meta-shift-f` will open the command line prepopulated with +`Xx/`, which is a composite command that performs a global search. The results +of the search will appear in the operation preview list, which you can focus +with `meta-:`. + +Atom's command language is still under construction and is loosely based on +the [Sam editor](http://doc.cat-v.org/bell_labs/sam_lang_tutorial/) from the +Plan 9 operating system. It's similar to Ex mode in Vim, but is selection-based +rather than line-based. It allows you to compose commands together in +interesting ways. + +#### Navigating By Symbols + +If you want to jump to a method, you can use the ctags-based symbols package. +The `meta-j` binding will open a list of all symbols in the current file. The +`meta-shift-j` binding will open a list of all symbols for the current project +based on a tags file. And `meta-.` will jump to the tag for the word currently +under the cursor. Make sure you have a tags file generated for the project for +the latter of these two bindings to work. Also, if you're editing CoffeeScript, +it's a good idea to update your `~/.ctags` file to understand the language. Here +is [a good example](https://github.com/kevinsawicki/dotfiles/blob/master/.ctags). + +### Replacing Stuff + +To perform a replacement, open up the command line with `meta-;` and use the `s` +command, as follows: `s/foo/bar/g`. Note that if you have a selection, the +replacement will only occur inside the selected text. An empty selection will +cause the replacement to occur across the whole buffer. If you want to run the +command on the whole buffer even if you have a selection, precede your +substitution with the `,` address, which specifies that the command following it +operate on the whole buffer. + +### Split Panes + +You can split any editor pane horizontally or vertically by using `alt-command` +plus the arrow in the direction you wand to split. Once you have a split pane, +you can move focus between them with `ctrl-w w`. To close a pane, close all tabs +inside it. + +### Folding + +You can fold everything with `ctrl-shift-[` and unfold everything with +`ctrl-shift-]`. Or, you can fold / unfold by a single level with `ctrl-[` and +`ctrl-]`. The user interaction around folds is still a bit rough, but we're +planning to improve it soon. + +### Soft-Wrap + +If you want to toggle soft wrap, trigger the command from the command palette. +Press `meta-p` to open the palette, then type "wrap" to find the correct +command. + +## Your .atom Directory + +When you install Atom, a `.atom` directory is created in your home directory. +If you press `meta-,`, that directory will be opened in a new window. For the +time being, this will serve as the primary interface for adjusting configuration +settings, adding and changing key bindings, tweaking styles, etc. + +## Configuration Settings + +Atom loads configuration settings from the `config.cson` file in your `~/.atom` +directory, which contains CoffeeScript-style JSON: + +```coffeescript +core: + hideGitIgnoredFiles: true +editor: + fontSize: 18 +``` + +Configuration is broken into namespaces, which are defined by the config hash's +top-level keys. In addition to Atom's core components, each package may define +its own namespace. + +### Glossary of Config Keys + +- core + - disablePackages: An array of package names to disable + - hideGitIgnoredFiles: Whether files in the .gitignore should be hidden + - ignoredNames: File names to ignore across all of atom (not fully implemented) + - themes: An array of theme names to load, in cascading order +- editor + - autoIndent: Enable/disable basic auto-indent (defaults to true) + - autoIndentOnPaste: Enable/disable auto-indented pasted text (defaults to false) + - autosave: Save a file when an editor loses focus + - nonWordCharacters: A string of non-word characters to define word boundaries + - fontSize + - fontFamily + - invisibles: Specify characters that Atom renders for invisibles in this hash + - tab: Hard tab characters + - cr: Carriage return (For Microsoft-style line endings) + - eol: `\n` characters + - space: Leading and trailing space characters + - preferredLineLength: Packages such as autoflow use this (defaults to 80) + - showInvisibles: Whether to render placeholders for invisible characters (defaults to false) +- fuzzyFinder + - ignoredNames: Files to ignore *only* in the fuzzy-finder +- stripTrailingWhitespace + - singleTrailingNewline: Whether to reduce multiple newlines to one at the end of files +- wrapGuide + - columns: Array of hashes with a `pattern` and `column` key to match the + the path of the current editor to a column position. + +## Customizing Key Bindings + +Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors +to apply styles to elements, Atom keymaps use selectors to associate keystrokes +with events in specific contexts. Here's a small example, excerpted from Atom's +built-in keymaps: + +```coffee-script +'.editor': + 'enter': 'editor:newline' + +".select-list .editor.mini": + 'enter': 'core:confirm', +``` + +This keymap defines the meaning of `enter` in two different contexts. In a +normal editor, pressing `enter` emits the `editor:newline` event, which causes +the editor to insert a newline. But if the same keystroke occurs inside of a +select list's mini-editor, it instead emits the `core:confirm` event based on +the binding in the more-specific selector. + +By default, any keymap files in your `~/.atom/keymaps` directory will be loaded +in alphabetical order when Atom is started. They will always be loaded last, +giving you the chance to override bindings that are defined by Atom's core +keymaps or third-party packages. + +## Changing The Theme + +Atom comes bundles with two themes `atom-dark-*` and `atom-light-*`. + +Because Atom themes are based on CSS, it's possible to have multiple themes +active at the same time. For example, you'll usually select a theme for the UI +and another theme for syntax highlighting. You can select themes by specifying +them in the `core.themes` array in your `config.cson`: + +```coffee-script +core: + themes: ["atom-light-ui", "atom-light-syntax"] + # or, if the sun is going down: + # themes: ["atom-dark-ui", "atom-dark-syntax"] +``` + +You install new themes by placing them in the `~/.atom/themes` directory. A +theme can be a CSS file, a directory containing multiple CSS files, or a +TextMate theme (either `.tmTheme` or `.plist`). + + +## Installing Packages (Partially Implemented) + +To install a package, clone it into the `~/.atom/packages` directory. Atom will +also load grammars and snippets from TextMate bundles. If you want to disable a +package without removing it from the packages directory, insert its name into +`config.core.disabledPackages`: + +config.cson: +```coffeescript +core: + disabledPackages: [ + "fuzzy-finder", + "tree-view" + ] +``` + +## Quick Personal Hacks + +### user.coffee + +When Atom finishes loading, it will evaluate `user.coffee` in your `~/.atom` +directory, giving you a chance to run arbitrary personal CoffeeScript code to +make customizations. You have full access to Atom's API from code in this file. +Please refer to the Atom Internals Guide for more information. If your +customizations become extensive, consider creating a package. + +### user.css + +If you want to apply quick-and-dirty personal styling changes without creating +an entire theme that you intend to distribute, you can add styles to +`user.css` in your `~/.atom` directory. + +For example to change the color of the highlighted line number for the line that +contains the cursor, you could add the following style to `user.css`: + +```css +.editor .line-number.cursor-line { + color: pink; +} +``` diff --git a/docs/internals/configuration.md b/docs/internals/configuration.md new file mode 100644 index 000000000..c25b0155d --- /dev/null +++ b/docs/internals/configuration.md @@ -0,0 +1,64 @@ +## Configuration API + +### Reading Config Settings + +If you are writing a package that you want to make configurable, you'll need to +read config settings. You can read a value from `config` with `config.get`: + +```coffeescript +# read a value with `config.get` +@autosave() if config.get "editor.autosave" +``` + +Or you can use `observeConfig` to track changes from a view object. + +```coffeescript +class MyView extends View + initialize: -> + @observeConfig 'editor.fontSize', () => + @adjustFontSize() +``` + +The `observeConfig` method will call the given callback immediately with the +current value for the specified key path, and it will also call it in the future +whenever the value of that key path changes. + +Subscriptions made with `observeConfig` are automatically cancelled when the +view is removed. You can cancel config subscriptions manually via the +`unobserveConfig` method. + +```coffeescript +view1.unobserveConfig() # unobserve all properties +``` + +You can add the ability to observe config values to non-view classes by +extending their prototype with the `ConfigObserver` mixin: + +```coffeescript +ConfigObserver = require 'config-observer' +_.extend MyClass.prototype, ConfigObserver +``` + +### Writing Config Settings + +As discussed above, the config database is automatically populated from +`config.cson` when Atom is started, but you can programmatically write to it in +the following way: + +```coffeescript +# basic key update +config.set("editor.autosave", true) + +# if you mutate a config key, you'll need to call `config.update` to inform +# observers of the change +config.get("fuzzyFinder.ignoredPaths").push "vendor" +config.update() +``` + +You can also use `setDefaults`, which will assign default values for keys that +are always overridden by values assigned with `set`. Defaults are not written out +to the the `config.json` file to prevent it from becoming cluttered. + +```coffeescript +config.setDefaults("editor", fontSize: 18, showInvisibles: true) +``` diff --git a/docs/internals/intro.md b/docs/internals/intro.md new file mode 100644 index 000000000..86cf06e84 --- /dev/null +++ b/docs/internals/intro.md @@ -0,0 +1,6 @@ +# Atom Internals + +To extend Atom effectively, you'll need to understand how it works internally. +This system is evolving fast and it's unlikely that these docs will cover all +of it any time soon, so view this as a jumping-off point. To really understand +how things work, use the web inspector or dive into the code. \ No newline at end of file diff --git a/docs/internals/keymaps.md b/docs/internals/keymaps.md new file mode 100644 index 000000000..55e0580c3 --- /dev/null +++ b/docs/internals/keymaps.md @@ -0,0 +1,69 @@ +## Keymaps In-Depth + +### Structure of a Keymap File + +Keymap files are encoded as JSON or CSON files containing nested hashes. The +top-level keys of a keymap are **CSS 3 selectors**, which specify a particular +context in Atom's interface. Common selectors are `.editor`, which scopes +bindings to just work when an editor is focused, and `body`, which scopes +bindings globally. + +Beneath the selectors are hashes mapping **keystroke patterns** to +**semantic events**. A keystroke pattern looks like the following examples. +Note that the last example describes multiple keystrokes in succession: + +- `p` +- `2` +- `ctrl-p` +- `ctrl-alt-meta-p` +- `tab` +- `escape` +- `enter` +- `ctrl-w w` + +A semantic event is the name of the custom event that will be triggered on the +target of the keydown event when a key binding matches. You can use the command +palette (bound to `meta-p`), to get a list of relevant events and their bindings +in any focused context in Atom. + +### Rules for Mapping A Keydown Event to A Semantic Event + +A keymap's job is to translate a physical keystroke event (like `meta-D`) into a +semantic event (like `editor:duplicate-line`). Whenever a keydown event occurs +on a focused element, it bubbles up the DOM as usual. As soon as an element on +the bubble path matches a key binding for the keystroke, the binding's semantic +event is triggered on the original target of the keydown event. Just as with +CSS, if multiple selectors match an element, the most specific selector is +favored. If two selectors have the same specificity, the selector that occurs +latest in the cascade is favored. + +Currently, there's no way to specify selector ordering within a single keymap, +because JSON hashes do not preserve order. Rather than making the format more +awkward in order to preserve order, we've opted to handle cases where order is +critical by breaking the keymap into two separate files, such as +`snippets-1.cson` and `snippets-2.cson`. + +### Overloading Key Bindings + +Occasionally, it makes sense to layer multiple actions on top of the same key +binding. An example of this is the snippets package. You expand a snippet by +pressing `tab` immediately following a snippet's prefix. But if the cursor is +not following a valid snippet prefix, then we want tab to perform its normal +action (probably inserting a tab character or the appropriate number of spaces). + +To achieve this, the snippets package makes use of the `abortKeyBinding` method +on the event object that's triggered by the binding for `tab`. + +```coffee-script +# pseudo-code +editor.command 'snippets:expand', (e) => + if @cursorFollowsValidPrefix() + @expandSnippet() + else + e.abortKeyBinding() +``` + +When the event handler observes that the cursor does not follow a valid prefix, +it calls `e.abortKeyBinding()`, which tells the keymap system to continue +searching up the cascade for another matching binding. In this case, the default +implementation of `tab` ends up getting triggered. diff --git a/docs/internals-guide.md b/docs/internals/view-system.md similarity index 98% rename from docs/internals-guide.md rename to docs/internals/view-system.md index 678333970..cdf6248ad 100644 --- a/docs/internals-guide.md +++ b/docs/internals/view-system.md @@ -1,6 +1,4 @@ -# A Guide to Atom's Internals - -## Views +## Atom's View System ### SpacePen Basics @@ -64,5 +62,3 @@ rootView.horizontal.prepend(new MyView) # place a view below the panes (or use .prepend() to place it above) rootView.vertical.append(new MyOtherView) ``` - -## Models \ No newline at end of file diff --git a/docs/intro.md b/docs/intro.md deleted file mode 100644 index 32a838246..000000000 --- a/docs/intro.md +++ /dev/null @@ -1,3 +0,0 @@ -# The Atom Guide - -Welcome! diff --git a/docs/manifest.txt b/docs/manifest.txt new file mode 100644 index 000000000..0329df5de --- /dev/null +++ b/docs/manifest.txt @@ -0,0 +1,11 @@ +getting-started.md +built-in-packages/intro.md +built-in-packages/command-panel.md +built-in-packages/markdown-preview.md +built-in-packages/wrap-guide.md +authoring-themes.md +authoring-packages..md +internals/intro.md +internals/configuration.md +internals/keymaps.md +internals/view-system.md diff --git a/docs/packages/installing.md b/docs/packages/installing.md deleted file mode 100644 index 38dc43160..000000000 --- a/docs/packages/installing.md +++ /dev/null @@ -1,14 +0,0 @@ -## Installing Packages (Partially Implemented) - -To install a package, clone it into the `~/.atom/packages` directory. -If you want to disable a package without removing it from the packages -directory, insert its name into `config.core.disabledPackages`: - -config.cson: -```coffeescript -core: - disabledPackages: [ - "fuzzy-finder", - "tree-view" - ] -``` diff --git a/docs/styling.md b/docs/styling.md deleted file mode 100644 index 47a3795ae..000000000 --- a/docs/styling.md +++ /dev/null @@ -1,24 +0,0 @@ -## Styling Tweaks - -### Cursor Line Highlighting - -Atom highlights the background color of the entire line where the cursor -currently is and also changes the foreground color of the line number in the -gutter. - -You can change the background color using the following CSS: - -```css -.editor .line.cursor-line, -.editor .line-number.cursor-line { - background-color: green; -} -``` - -You can change the line number foreground color using the following CSS: - -```css -.editor .line-number.cursor-line { - color: blue; -} -``` diff --git a/.atom/config.cson b/dot-atom/config.cson similarity index 100% rename from .atom/config.cson rename to dot-atom/config.cson diff --git a/.atom/packages/README.md b/dot-atom/packages/README.md similarity index 100% rename from .atom/packages/README.md rename to dot-atom/packages/README.md diff --git a/.atom/snippets/coffee.cson b/dot-atom/snippets/coffee.cson similarity index 100% rename from .atom/snippets/coffee.cson rename to dot-atom/snippets/coffee.cson diff --git a/.atom/themes/README.md b/dot-atom/themes/README.md similarity index 100% rename from .atom/themes/README.md rename to dot-atom/themes/README.md diff --git a/.atom/user.coffee b/dot-atom/user.coffee similarity index 70% rename from .atom/user.coffee rename to dot-atom/user.coffee index 82a9bc82a..60880641d 100644 --- a/.atom/user.coffee +++ b/dot-atom/user.coffee @@ -1 +1 @@ -# For more on how to configure atom open `~/github/atom/docs/configuring-and-extending.md` \ No newline at end of file +# For more on how to configure atom open `~/github/atom/docs/configuring-and-extending.md` diff --git a/.atom/user.css b/dot-atom/user.css similarity index 100% rename from .atom/user.css rename to dot-atom/user.css diff --git a/native/atom_application.h b/native/atom_application.h index 29ad86adf..7db0bece8 100644 --- a/native/atom_application.h +++ b/native/atom_application.h @@ -6,8 +6,10 @@ class AtomCefClient; @interface AtomApplication : NSApplication { NSWindowController *_backgroundWindowController; NSDictionary *_arguments; + NSInvocation *_updateInvocation; + NSString *_updateStatus; BOOL _filesOpened; - BOOL handlingSendEvent_; + BOOL _handlingSendEvent; } + (AtomApplication *)sharedApplication; @@ -21,6 +23,8 @@ class AtomCefClient; - (void)runSpecsThenExit:(BOOL)exitWhenDone; - (NSDictionary *)arguments; - (void)runBenchmarksThenExit:(BOOL)exitWhenDone; +- (NSString *)updateStatus; +- (void)installUpdate; @property (nonatomic, retain) NSDictionary *arguments; diff --git a/native/atom_application.mm b/native/atom_application.mm index 1e36ce37d..102774de5 100644 --- a/native/atom_application.mm +++ b/native/atom_application.mm @@ -25,10 +25,6 @@ + (NSDictionary *)parseArguments:(char **)argv count:(int)argc { NSMutableDictionary *arguments = [[NSMutableDictionary alloc] init]; - #ifdef RESOURCE_PATH - [arguments setObject:[NSString stringWithUTF8String:RESOURCE_PATH] forKey:@"resource-path"]; - #endif - // Remove non-posix (i.e. -long_argument_with_one_leading_hyphen) added by OS X from the command line int cleanArgc = argc; size_t argvSize = argc * sizeof(char *); @@ -139,6 +135,7 @@ - (void)dealloc { [_backgroundWindowController release]; [_arguments release]; + [_updateInvocation release]; [super dealloc]; } @@ -210,12 +207,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification { if (!_filesOpened && [self shouldOpenFiles]) { NSString *path = [self.arguments objectForKey:@"path"]; - - // Just a hack to open the Atom src by default when we run from xcode - #ifdef RESOURCE_PATH - if (!path) path = [NSString stringWithUTF8String:RESOURCE_PATH]; - #endif - NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil; [self open:path pidToKillWhenWindowCloses:pid]; } @@ -246,11 +237,11 @@ # pragma mark CefAppProtocol - (BOOL)isHandlingSendEvent { - return handlingSendEvent_; + return _handlingSendEvent; } - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { - handlingSendEvent_ = handlingSendEvent; + _handlingSendEvent = handlingSendEvent; } - (void)sendEvent:(NSEvent*)event { @@ -266,26 +257,35 @@ } } +- (NSString *)updateStatus { + return _updateStatus ? _updateStatus : @"idle"; +} + +- (void)installUpdate { + if (_updateInvocation) [_updateInvocation invoke]; +} + #pragma mark SUUpdaterDelegate - (void)updaterDidNotFindUpdate:(SUUpdater *)update { - NSLog(@"No update found"); + _updateStatus = @"current"; } - (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update { - NSLog(@"Found Update"); + _updateStatus = @"downloading"; } - (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update { - NSLog(@"Extract update"); + _updateStatus = @"installing"; } - (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation { - NSLog(@"Install Update"); + _updateInvocation = invocation; + _updateStatus = @"ready"; } - (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update { - NSLog(@"Cancel Update Install"); + _updateStatus = @"current"; } @end diff --git a/native/atom_cef_client.cpp b/native/atom_cef_client.cpp index 34e679124..61be7900e 100644 --- a/native/atom_cef_client.cpp +++ b/native/atom_cef_client.cpp @@ -84,6 +84,12 @@ bool AtomCefClient::OnProcessMessageReceived(CefRefPtr browser, else if (name == "toggleFullScreen") { ToggleFullScreen(browser); } + else if (name == "update") { + Update(); + } + else if (name == "getUpdateStatus") { + GetUpdateStatus(messageId, browser); + } else { return false; } diff --git a/native/atom_cef_client.h b/native/atom_cef_client.h index 16a80298b..812559c32 100644 --- a/native/atom_cef_client.h +++ b/native/atom_cef_client.h @@ -126,6 +126,8 @@ class AtomCefClient : public CefClient, void Log(const char *message); void Show(CefRefPtr browser); void ToggleFullScreen(CefRefPtr browser); + void Update(); + void GetUpdateStatus(int replyId, CefRefPtr browser); IMPLEMENT_REFCOUNTING(AtomCefClient); IMPLEMENT_LOCKING(AtomCefClient); diff --git a/native/atom_cef_client_mac.mm b/native/atom_cef_client_mac.mm index fdb398732..0ef9c0cbc 100644 --- a/native/atom_cef_client_mac.mm +++ b/native/atom_cef_client_mac.mm @@ -5,6 +5,7 @@ #import "native/atom_cef_client.h" #import "atom_application.h" #import "atom_window_controller.h" +#import "atom_application.h" void AtomCefClient::FocusNextWindow() { NSArray *windows = [NSApp windows]; @@ -157,3 +158,18 @@ void AtomCefClient::Exit(int status) { void AtomCefClient::Log(const char *message) { std::cout << message << "\n"; } + +void AtomCefClient::Update() { + [(AtomApplication *)NSApp installUpdate]; +} + +void AtomCefClient::GetUpdateStatus(int replyId, CefRefPtr browser) { + CefRefPtr replyMessage = CefProcessMessage::Create("reply"); + CefRefPtr replyArguments = replyMessage->GetArgumentList(); + + replyArguments->SetSize(2); + replyArguments->SetString(1, [[(AtomApplication *)NSApp updateStatus] UTF8String]); + replyArguments->SetList(0, CreateReplyDescriptor(replyId, 0)); + + browser->SendProcessMessage(PID_RENDERER, replyMessage); +} \ No newline at end of file diff --git a/native/atom_cef_render_process_handler.mm b/native/atom_cef_render_process_handler.mm index 3f74f92aa..fe49a8935 100644 --- a/native/atom_cef_render_process_handler.mm +++ b/native/atom_cef_render_process_handler.mm @@ -1,4 +1,4 @@ -#include "atom_cef_render_process_handler.h" +#import #import "native/v8_extensions/atom.h" #import "native/v8_extensions/native.h" #import "native/v8_extensions/onig_reg_exp.h" @@ -7,7 +7,7 @@ #import "native/v8_extensions/tags.h" #import "native/message_translation.h" #import "path_watcher.h" -#include +#import "atom_cef_render_process_handler.h" void AtomCefRenderProcessHandler::OnWebKitInitialized() { @@ -57,8 +57,8 @@ bool AtomCefRenderProcessHandler::OnProcessMessageReceived(CefRefPtr return true; } else if (name == "shutdown") { - Shutdown(browser); - return true; + Shutdown(browser); + return true; } else { return CallMessageReceivedHandler(browser->GetMainFrame()->GetV8Context(), message); diff --git a/prebuilt-cef b/prebuilt-cef new file mode 160000 index 000000000..72832297a --- /dev/null +++ b/prebuilt-cef @@ -0,0 +1 @@ +Subproject commit 72832297ab8e4e665a9bdeb4f700fc543e053cca diff --git a/script/copy-files-to-bundle b/script/copy-files-to-bundle index c8ab8dd4f..c509e7aef 100755 --- a/script/copy-files-to-bundle +++ b/script/copy-files-to-bundle @@ -10,15 +10,12 @@ if [ -f /opt/github/env.sh ]; then fi RESOUCES_PATH="$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" -mkdir -p "$RESOUCES_PATH/v8_extensions" -cp "$PROJECT_DIR/native/v8_extensions/"*.js "$RESOUCES_PATH/v8_extensions/" DIRS="src static vendor" # Compile .coffee files into bundle COFFEE_FILES=$(find $DIRS -type file -name '*.coffee') for COFFEE_FILE in $COFFEE_FILES; do - echo $COFFEE_FILE JS_FILE=$(echo "$RESOUCES_PATH/$COFFEE_FILE" | sed 's/.coffee/.js/' ) OUTPUT_PATH="$RESOUCES_PATH/$(dirname "$COFFEE_FILE")" @@ -31,7 +28,6 @@ done; # Compile .cson files into bundle CSON_FILES=$(find $DIRS -type file -name '*.cson') for CSON_FILE in $CSON_FILES; do - echo $CSON_FILE JSON_FILE=$(echo "$RESOUCES_PATH/$CSON_FILE" | sed 's/.cson/.json/' ) OUTPUT_PATH="$RESOUCES_PATH/$(dirname "$CSON_FILE")" diff --git a/script/update-cef b/script/update-cef deleted file mode 100755 index 817c65575..000000000 --- a/script/update-cef +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -usage() { - echo 'usage: update-cef chromium-dir [cef-release-branch] 1>&2' - echo - echo 'chromium-dir is the root of the chromium directory (i.e. ~/code/chromium)' - echo 'CEF release branches can be found at http://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding' - exit 1 -} - -if [ ! $1 ]; then - usage -fi - -ATOM_ROOT=$(cd $(dirname $0); pwd -P)/.. -CHROMIUM_DIR=$1 -CEF_DIR=$CHROMIUM_DIR/src/cef -CEF_RELEASE_BRANCH=${2:-1271} -CEF_REVISION=$(svnversion $CEF_DIR) -CEF_BINARY_PATH=$(echo ${CEF_DIR}/binary_distrib/cef_binary_3.${CEF_RELEASE_BRANCH}.${CEF_REVISION}_macosx/) # Expand the path - -echo "CEF_RELEASE_BRANCH=$CEF_RELEASE_BRANCH" -echo "CEF_BINARY_PATH=$CEF_BINARY_PATH" - -# Update and compile CEF -CEF_AUTOMATE_SCRIPT_PATH=/tmp/cef-update -rm -rf $CEF_AUTOMATE_SCRIPT_PATH -svn checkout http://chromiumembedded.googlecode.com/svn/trunk/cef1/tools/automate $CEF_AUTOMATE_SCRIPT_PATH -cd $CEF_AUTOMATE_SCRIPT_PATH -python automate.py --download-dir="$(dirname $CHROMIUM_DIR)" --url=http://chromiumembedded.googlecode.com/svn/branches/$CEF_RELEASE_BRANCH/cef3 - -# Copy the CEF gypi files and update their paths to match Atom's file layout -for GYPI_PATH in "$CEF_DIR/cef_paths.gypi" "$CEF_DIR/cef_paths2.gypi"; do - sed "s/include\//cef\/include\//;s/libcef_dll\//cef\/libcef_dll\//" $GYPI_PATH > $ATOM_ROOT/cef/$(basename $GYPI_PATH) -done - -# Copy the framework files -for FRAMEWORK_PATH in ffmpegsumo.so libcef.dylib; do - cp "$CEF_BINARY_PATH/Release/$FRAMEWORK_PATH" $ATOM_ROOT/cef/frameworks/ -done - -cp -R "$CEF_BINARY_PATH/include" $ATOM_ROOT/cef/ -cp -R "$CEF_BINARY_PATH/libcef_dll" $ATOM_ROOT/cef/ -cp -R "$CEF_BINARY_PATH/Resources/" $ATOM_ROOT/cef/Resources diff --git a/spec/app/atom-package-spec.coffee b/spec/app/atom-package-spec.coffee index f483f74ab..067f2e0e4 100644 --- a/spec/app/atom-package-spec.coffee +++ b/spec/app/atom-package-spec.coffee @@ -4,14 +4,13 @@ fs = require 'fs' describe "AtomPackage", -> describe ".load()", -> - afterEach -> - rootView.deactivate() + beforeEach -> + window.rootView = new RootView describe "when the package metadata includes activation events", -> [packageMainModule, pack] = [] beforeEach -> - new RootView(fixturesProject.getPath()) pack = new AtomPackage(fs.resolve(config.packageDirPaths..., 'package-with-activation-events')) packageMainModule = require 'fixtures/packages/package-with-activation-events/main' spyOn(packageMainModule, 'activate').andCallThrough() @@ -39,7 +38,6 @@ describe "AtomPackage", -> describe "when the package does not specify a main module", -> describe "when the package has an index.coffee", -> it "uses index.coffee as the main module", -> - new RootView(fixturesProject.getPath()) pack = new AtomPackage(fs.resolve(config.packageDirPaths..., 'package-with-module')) packageMainModule = require 'fixtures/packages/package-with-module' spyOn(packageMainModule, 'activate').andCallThrough() @@ -52,7 +50,6 @@ describe "AtomPackage", -> it "does not throw an exception or log an error", -> spyOn(console, "error") spyOn(console, "warn") - new RootView(fixturesProject.getPath()) pack = new AtomPackage(fs.resolve(config.packageDirPaths..., 'package-with-keymaps-manifest')) expect(-> pack.load()).not.toThrow() @@ -62,6 +59,6 @@ describe "AtomPackage", -> describe "when a package is activated", -> it "loads config defaults based on the `configDefaults` key", -> expect(config.get('package-with-module.numbers.one')).toBeUndefined() - atom.loadPackage("package-with-module") + window.loadPackage("package-with-module") expect(config.get('package-with-module.numbers.one')).toBe 1 expect(config.get('package-with-module.numbers.two')).toBe 2 diff --git a/spec/app/atom-spec.coffee b/spec/app/atom-spec.coffee index 3638f0d61..2c34de5ee 100644 --- a/spec/app/atom-spec.coffee +++ b/spec/app/atom-spec.coffee @@ -3,12 +3,9 @@ RootView = require 'root-view' describe "the `atom` global", -> beforeEach -> - new RootView + window.rootView = new RootView - afterEach -> - rootView.deactivate() - - describe ".loadPackage(name)", -> + describe "when a package is built and loaded", -> [extension, stylesheetPath] = [] beforeEach -> @@ -20,13 +17,13 @@ describe "the `atom` global", -> it "requires and activates the package's main module if it exists", -> spyOn(atom, 'activateAtomPackage').andCallThrough() - atom.loadPackage("package-with-module") + window.loadPackage("package-with-module") expect(atom.activateAtomPackage).toHaveBeenCalled() it "logs warning instead of throwing an exception if a package fails to load", -> config.set("core.disabledPackages", []) spyOn(console, "warn") - expect(-> atom.loadPackage("package-that-throws-an-exception")).not.toThrow() + expect(-> window.loadPackage("package-that-throws-an-exception")).not.toThrow() expect(console.warn).toHaveBeenCalled() describe "keymap loading", -> @@ -40,7 +37,7 @@ describe "the `atom` global", -> expect(keymap.bindingsForElement(element2)['ctrl-z']).toBeUndefined() expect(keymap.bindingsForElement(element3)['ctrl-z']).toBeUndefined() - atom.loadPackage("package-with-module") + window.loadPackage("package-with-module") expect(keymap.bindingsForElement(element1)['ctrl-z']).toBe "test-1" expect(keymap.bindingsForElement(element2)['ctrl-z']).toBe "test-2" @@ -53,7 +50,7 @@ describe "the `atom` global", -> expect(keymap.bindingsForElement(element1)['ctrl-z']).toBeUndefined() - atom.loadPackage("package-with-keymaps-manifest") + window.loadPackage("package-with-keymaps-manifest") expect(keymap.bindingsForElement(element1)['ctrl-z']).toBe 'keymap-1' expect(keymap.bindingsForElement(element1)['ctrl-n']).toBe 'keymap-2' @@ -62,83 +59,75 @@ describe "the `atom` global", -> it "loads stylesheets associated with the package", -> stylesheetPath = require.resolve("fixtures/packages/package-with-module/stylesheets/styles.css") expect(stylesheetElementForId(stylesheetPath).length).toBe 0 - atom.loadPackage("package-with-module") + window.loadPackage("package-with-module") expect(stylesheetElementForId(stylesheetPath).length).toBe 1 describe ".loadPackages()", -> beforeEach -> spyOn(syntax, 'addGrammar') - it "terminates the worker when all packages have been loaded", -> - spyOn(Worker.prototype, 'terminate').andCallThrough() + it "aborts the worker when all packages have been loaded", -> + LoadTextMatePackagesTask = require 'load-text-mate-packages-task' + spyOn(LoadTextMatePackagesTask.prototype, 'abort').andCallThrough() eventHandler = jasmine.createSpy('eventHandler') syntax.on 'grammars-loaded', eventHandler - disabledPackages = config.get("core.disabledPackages") - disabledPackages.push('textmate-package.tmbundle') - disabledPackages.push('package-with-snippets') - config.set "core.disabledPackages", disabledPackages + config.get("core.disabledPackages").push('textmate-package.tmbundle', 'package-with-snippets') atom.loadPackages() waitsFor "all packages to load", 5000, -> eventHandler.callCount > 0 runs -> - expect(Worker.prototype.terminate).toHaveBeenCalled() - expect(Worker.prototype.terminate.calls.length).toBe 1 + expect(LoadTextMatePackagesTask.prototype.abort).toHaveBeenCalled() + expect(LoadTextMatePackagesTask.prototype.abort.calls.length).toBe 1 describe "package lifecycle", -> - [pack, packageModule] = [] - - beforeEach -> - pack = - name: "package" - packageMain: - activate: jasmine.createSpy("activate") - deactivate: -> - serialize: -> "it worked" - - packageModule = pack.packageMain - - describe ".activateAtomPackage(package)", -> - it "calls activate on the package", -> - atom.activateAtomPackage(pack) - expect(packageModule.activate).toHaveBeenCalledWith(undefined) - - it "calls activate on the package module with its previous state", -> - atom.activateAtomPackage(pack) - packageModule.activate.reset() + describe "activation", -> + it "calls activate on the package main with its previous state", -> + pack = window.loadPackage('package-with-module') + spyOn(pack.packageMain, 'activate') serializedState = rootView.serialize() rootView.deactivate() RootView.deserialize(serializedState) + window.loadPackage('package-with-module') - atom.activateAtomPackage(pack) - expect(packageModule.activate).toHaveBeenCalledWith("it worked") + expect(pack.packageMain.activate).toHaveBeenCalledWith(someNumber: 1) - describe ".deactivateAtomPackages()", -> + describe "deactivation", -> it "deactivates and removes the package module from the package module map", -> - atom.activateAtomPackage(pack) - spyOn(packageModule, "deactivate").andCallThrough() + pack = window.loadPackage('package-with-module') + expect(atom.activatedAtomPackages.length).toBe 1 + spyOn(pack.packageMain, "deactivate").andCallThrough() atom.deactivateAtomPackages() - expect(packageModule.deactivate).toHaveBeenCalled() - expect(rootView.packages.length).toBe 0 + expect(pack.packageMain.deactivate).toHaveBeenCalled() + expect(atom.activatedAtomPackages.length).toBe 0 + + describe "serialization", -> + it "uses previous serialization state on unactivated packages", -> + atom.atomPackageStates['package-with-activation-events'] = {previousData: 'exists'} + unactivatedPackage = window.loadPackage('package-with-activation-events') + activatedPackage = window.loadPackage('package-with-module') + + expect(atom.serializeAtomPackages()).toEqual + 'package-with-module': + 'someNumber': 1 + 'package-with-activation-events': + 'previousData': 'exists' + + # ensure serialization occurs when the packageis activated + unactivatedPackage.activatePackageMain() + expect(atom.serializeAtomPackages()).toEqual + 'package-with-module': + 'someNumber': 1 + 'package-with-activation-events': + 'previousData': 'overwritten' - describe ".serializeAtomPackages()", -> it "absorbs exceptions that are thrown by the package module's serialize methods", -> spyOn(console, 'error') - - atom.activateAtomPackage - name: "bad-egg" - packageMain: - activate: -> - serialize: -> throw new Error("I'm broken") - - atom.activateAtomPackage - name: "good-egg" - packageMain: - activate: -> - serialize: -> "I still get called" + window.loadPackage('package-with-module') + window.loadPackage('package-with-serialize-error', activateImmediately: true) packageStates = atom.serializeAtomPackages() - expect(packageStates['good-egg']).toBe "I still get called" - expect(packageStates['bad-egg']).toBeUndefined() + expect(packageStates['package-with-module']).toEqual someNumber: 1 + expect(packageStates['package-with-serialize-error']).toBeUndefined() expect(console.error).toHaveBeenCalled() diff --git a/spec/app/buffer-spec.coffee b/spec/app/buffer-spec.coffee index 86cd15dbc..635f7d519 100644 --- a/spec/app/buffer-spec.coffee +++ b/spec/app/buffer-spec.coffee @@ -155,9 +155,11 @@ describe 'Buffer', -> expect(bufferToDelete.getPath()).toBe path expect(bufferToDelete.isModified()).toBeFalsy() + removeHandler = jasmine.createSpy('removeHandler') + bufferToDelete.file.on 'removed', removeHandler fs.remove(path) - waitsFor "file to be removed", (done) -> - bufferToDelete.file.one 'removed', done + waitsFor "file to be removed", -> + removeHandler.callCount > 0 afterEach -> bufferToDelete.destroy() @@ -173,8 +175,10 @@ describe 'Buffer', -> fs.write(path, 'moo') - waitsFor 'change event', (done) -> - bufferToDelete.one 'changed', done + changeHandler = jasmine.createSpy('changeHandler') + bufferToDelete.on 'changed', changeHandler + waitsFor 'change event', -> + changeHandler.callCount > 0 describe ".isModified()", -> it "returns true when user changes buffer", -> @@ -980,9 +984,11 @@ describe 'Buffer', -> expect(bufferToDelete.isModified()).toBeFalsy() expect(contentsModifiedHandler).not.toHaveBeenCalled() + removeHandler = jasmine.createSpy('removeHandler') + bufferToDelete.file.on 'removed', removeHandler fs.remove(path) - waitsFor "file to be removed", (done) -> - bufferToDelete.file.one 'removed', done + waitsFor "file to be removed", -> + removeHandler.callCount > 0 runs -> expect(contentsModifiedHandler).toHaveBeenCalledWith(differsFromDisk:true) diff --git a/spec/app/display-buffer-spec.coffee b/spec/app/display-buffer-spec.coffee index 7b75bdc9f..34f8fc74b 100644 --- a/spec/app/display-buffer-spec.coffee +++ b/spec/app/display-buffer-spec.coffee @@ -185,6 +185,22 @@ describe "DisplayBuffer", -> displayBuffer.foldBufferRow(1) expect(displayBuffer.lineForRow(0).fold).toBeDefined() + describe "when the bufferRow is in a multi-line comment", -> + it "searches upward and downward for surrounding comment lines and folds them as a single fold", -> + buffer.insert([1,0], " //this is a comment\n // and\n //more docs\n\n//second comment") + displayBuffer.foldBufferRow(1) + fold = displayBuffer.lineForRow(1).fold + expect(fold.startRow).toBe 1 + expect(fold.endRow).toBe 3 + + describe "when the bufferRow is a single-line comment", -> + it "searches upward for the first row that begins a syntatic region containing the folded row (and folds it)", -> + buffer.insert([1,0], " //this is a single line comment\n") + displayBuffer.foldBufferRow(1) + fold = displayBuffer.lineForRow(0).fold + expect(fold.startRow).toBe 0 + expect(fold.endRow).toBe 13 + describe ".unfoldBufferRow(bufferRow)", -> describe "when bufferRow can be unfolded", -> it "destroys a fold based on the syntactic region starting at the given row", -> @@ -732,11 +748,39 @@ describe "DisplayBuffer", -> displayBuffer.unfoldBufferRow(4) expect(observeHandler).not.toHaveBeenCalled() + it "updates the position of markers before emitting buffer change events, but does not notify their observers until the change event", -> + changeHandler = jasmine.createSpy("changeHandler").andCallFake -> + # calls change handler first + expect(observeHandler).not.toHaveBeenCalled() + # but still updates the markers + expect(displayBuffer.getMarkerScreenRange(marker)).toEqual [[5, 7], [5, 13]] + expect(displayBuffer.getMarkerHeadScreenPosition(marker)).toEqual [5, 13] + expect(displayBuffer.getMarkerTailScreenPosition(marker)).toEqual [5, 7] + + displayBuffer.on 'changed', changeHandler + + buffer.insert([8, 1], "...") + + expect(changeHandler).toHaveBeenCalled() + expect(observeHandler).toHaveBeenCalled() + + it "updates the position of markers before emitting change events that aren't caused by a buffer change", -> + changeHandler = jasmine.createSpy("changeHandler").andCallFake -> + # calls change handler first + expect(observeHandler).not.toHaveBeenCalled() + # but still updates the markers + expect(displayBuffer.getMarkerScreenRange(marker)).toEqual [[8, 4], [8, 10]] + expect(displayBuffer.getMarkerHeadScreenPosition(marker)).toEqual [8, 10] + expect(displayBuffer.getMarkerTailScreenPosition(marker)).toEqual [8, 4] + displayBuffer.on 'changed', changeHandler + + displayBuffer.unfoldBufferRow(4) + + expect(changeHandler).toHaveBeenCalled() + expect(observeHandler).toHaveBeenCalled() + describe "marker destruction", -> it "allows markers to be destroyed", -> marker = displayBuffer.markScreenRange([[5, 4], [5, 10]]) displayBuffer.destroyMarker(marker) expect(displayBuffer.getMarkerBufferRange(marker)).toBeUndefined() - - - diff --git a/spec/app/edit-session-spec.coffee b/spec/app/edit-session-spec.coffee index f4ec19ac4..51a1fa12f 100644 --- a/spec/app/edit-session-spec.coffee +++ b/spec/app/edit-session-spec.coffee @@ -1015,6 +1015,14 @@ describe "EditSession", -> expect(cursor2.getBufferPosition()).toEqual [8,0] describe ".insertNewlineBelow()", -> + describe "when the operation is undone", -> + it "places the cursor back at the previous location", -> + editSession.setCursorBufferPosition([0,2]) + editSession.insertNewlineBelow() + expect(editSession.getCursorBufferPosition()).toEqual [1,0] + editSession.undo() + expect(editSession.getCursorBufferPosition()).toEqual [0,2] + xit "inserts a newline below the cursor's current line, autoindents it, and moves the cursor to the end of the line", -> editSession.setAutoIndent(true) editSession.insertNewlineBelow() @@ -1022,6 +1030,25 @@ describe "EditSession", -> expect(buffer.lineForRow(1)).toBe " " expect(editSession.getCursorBufferPosition()).toEqual [1, 2] + describe ".insertNewlineAbove()", -> + describe "when the cursor is on first line", -> + it "inserts a newline on the first line and moves the cursor to the first line", -> + editSession.setCursorBufferPosition([0]) + editSession.insertNewlineAbove() + expect(editSession.getCursorBufferPosition()).toEqual [0,0] + expect(editSession.lineForBufferRow(0)).toBe '' + expect(editSession.lineForBufferRow(1)).toBe 'var quicksort = function () {' + expect(editSession.buffer.getLineCount()).toBe 14 + + describe "when the cursor is not on the first line", -> + it "inserts a newline above the current line and moves the cursor to the inserted line", -> + editSession.setCursorBufferPosition([3]) + editSession.insertNewlineAbove() + expect(editSession.getCursorBufferPosition()).toEqual [3,0] + expect(editSession.lineForBufferRow(3)).toBe '' + expect(editSession.lineForBufferRow(4)).toBe ' var pivot = items.shift(), current, left = [], right = [];' + expect(editSession.buffer.getLineCount()).toBe 14 + describe ".backspace()", -> describe "when there is a single cursor", -> changeScreenRangeHandler = null diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index a9f020799..1cb279da1 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -10,19 +10,19 @@ _ = require 'underscore' fs = require 'fs' describe "Editor", -> - [rootView, project, buffer, editor, cachedLineHeight] = [] + [buffer, editor, cachedLineHeight] = [] getLineHeight = -> return cachedLineHeight if cachedLineHeight? - editorForMeasurement = new Editor(editSession: rootView.project.buildEditSessionForPath('sample.js')) + editorForMeasurement = new Editor(editSession: project.buildEditSessionForPath('sample.js')) editorForMeasurement.attachToDom() cachedLineHeight = editorForMeasurement.lineHeight editorForMeasurement.remove() cachedLineHeight beforeEach -> - rootView = new RootView(require.resolve('fixtures/sample.js')) - project = rootView.project + window.rootView = new RootView + rootView.open('sample.js') editor = rootView.getActiveEditor() buffer = editor.getBuffer() @@ -35,9 +35,6 @@ describe "Editor", -> editor.enableKeymap() editor.isFocused = true - afterEach -> - rootView.remove() - describe "construction", -> it "throws an error if no editor session is given unless deserializing", -> expect(-> new Editor).toThrow() @@ -49,7 +46,7 @@ describe "Editor", -> rootView.height(8 * editor.lineHeight) rootView.width(50 * editor.charWidth) - editor.edit(rootView.project.buildEditSessionForPath('two-hundred.txt')) + editor.edit(project.buildEditSessionForPath('two-hundred.txt')) editor.setCursorScreenPosition([5, 1]) editor.scrollTop(1.5 * editor.lineHeight) editor.scrollView.scrollLeft(44) @@ -78,7 +75,7 @@ describe "Editor", -> it "does not blow up if no file exists for a previous edit session, but prints a warning", -> spyOn(console, 'warn') fs.write('/tmp/delete-me') - editor.edit(rootView.project.buildEditSessionForPath('/tmp/delete-me')) + editor.edit(project.buildEditSessionForPath('/tmp/delete-me')) fs.remove('/tmp/delete-me') newEditor = editor.copy() expect(console.warn).toHaveBeenCalled() @@ -140,7 +137,7 @@ describe "Editor", -> describe ".remove()", -> it "removes subscriptions from all edit session buffers", -> previousEditSession = editor.activeEditSession - otherEditSession = rootView.project.buildEditSessionForPath(rootView.project.resolve('sample.txt')) + otherEditSession = project.buildEditSessionForPath(project.resolve('sample.txt')) expect(previousEditSession.buffer.subscriptionCount()).toBeGreaterThan 1 editor.edit(otherEditSession) @@ -151,8 +148,18 @@ describe "Editor", -> expect(otherEditSession.buffer.subscriptionCount()).toBe 0 describe "when 'close' is triggered", -> + it "adds a closed session path to the array", -> + editor.edit(project.buildEditSessionForPath()) + editSession = editor.activeEditSession + expect(editor.closedEditSessions.length).toBe 0 + editor.trigger "core:close" + expect(editor.closedEditSessions.length).toBe 0 + editor.edit(project.buildEditSessionForPath(project.resolve('sample.txt'))) + editor.trigger "core:close" + expect(editor.closedEditSessions.length).toBe 1 + it "closes the active edit session and loads next edit session", -> - editor.edit(rootView.project.buildEditSessionForPath()) + editor.edit(project.buildEditSessionForPath()) editSession = editor.activeEditSession spyOn(editSession.buffer, 'isModified').andReturn false spyOn(editSession, 'destroy').andCallThrough() @@ -163,7 +170,7 @@ describe "Editor", -> expect(editor.getBuffer()).toBe buffer it "triggers the 'editor:edit-session-removed' event with the edit session and its former index", -> - editor.edit(rootView.project.buildEditSessionForPath()) + editor.edit(project.buildEditSessionForPath()) editSession = editor.activeEditSession index = editor.getActiveEditSessionIndex() spyOn(editSession.buffer, 'isModified').andReturn false @@ -211,7 +218,7 @@ describe "Editor", -> otherEditSession = null beforeEach -> - otherEditSession = rootView.project.buildEditSessionForPath() + otherEditSession = project.buildEditSessionForPath() describe "when the edit session wasn't previously assigned to this editor", -> it "adds edit session to editor and triggers the 'editor:edit-session-added' event", -> @@ -247,16 +254,24 @@ describe "Editor", -> editor.insertText("def\n") expect(editor.lineElementForScreenRow(0).text()).toBe 'def' + it "removes the opened session from the closed sessions array", -> + editor.edit(project.buildEditSessionForPath('sample.txt')) + expect(editor.closedEditSessions.length).toBe 0 + editor.trigger "core:close" + expect(editor.closedEditSessions.length).toBe 1 + editor.edit(project.buildEditSessionForPath('sample.txt')) + expect(editor.closedEditSessions.length).toBe 0 + describe "switching edit sessions", -> [session0, session1, session2] = [] beforeEach -> session0 = editor.activeEditSession - editor.edit(rootView.project.buildEditSessionForPath('sample.txt')) + editor.edit(project.buildEditSessionForPath('sample.txt')) session1 = editor.activeEditSession - editor.edit(rootView.project.buildEditSessionForPath('two-hundred.txt')) + editor.edit(project.buildEditSessionForPath('two-hundred.txt')) session2 = editor.activeEditSession describe ".setActiveEditSessionIndex(index)", -> @@ -339,14 +354,11 @@ describe "Editor", -> tempFilePath = null beforeEach -> - rootView.remove() - + project.setPath('/tmp') tempFilePath = '/tmp/atom-temp.txt' fs.write(tempFilePath, "") - rootView = new RootView(tempFilePath) + rootView.open(tempFilePath) editor = rootView.getActiveEditor() - project = rootView.project - expect(editor.getPath()).toBe tempFilePath afterEach -> @@ -364,7 +376,7 @@ describe "Editor", -> describe "when the current buffer has no path", -> selectedFilePath = null beforeEach -> - editor.edit(rootView.project.buildEditSessionForPath()) + editor.edit(project.buildEditSessionForPath()) expect(editor.getPath()).toBeUndefined() editor.getBuffer().setText 'Save me to a new path' @@ -464,13 +476,13 @@ describe "Editor", -> openHandler = jasmine.createSpy('openHandler') editor.on 'editor:attached', openHandler - editor.simulateDomAttachment() + editor.attachToDom() expect(openHandler).toHaveBeenCalled() [event, eventEditor] = openHandler.argsForCall[0] expect(eventEditor).toBe editor openHandler.reset() - editor.simulateDomAttachment() + editor.attachToDom() expect(openHandler).not.toHaveBeenCalled() describe "editor-path-changed event", -> @@ -491,7 +503,7 @@ describe "Editor", -> it "emits event when editor receives a new buffer", -> eventHandler = jasmine.createSpy('eventHandler') editor.on 'editor:path-changed', eventHandler - editor.edit(rootView.project.buildEditSessionForPath(path)) + editor.edit(project.buildEditSessionForPath(path)) expect(eventHandler).toHaveBeenCalled() it "stops listening to events on previously set buffers", -> @@ -499,7 +511,7 @@ describe "Editor", -> oldBuffer = editor.getBuffer() editor.on 'editor:path-changed', eventHandler - editor.edit(rootView.project.buildEditSessionForPath(path)) + editor.edit(project.buildEditSessionForPath(path)) expect(eventHandler).toHaveBeenCalled() eventHandler.reset() @@ -523,6 +535,9 @@ describe "Editor", -> expect($("head style.font-family")).not.toExist() describe "when the font family changes", -> + afterEach -> + editor.clearFontFamily() + it "updates the font family on new and existing editors", -> rootView.attachToDom() rootView.height(200) @@ -531,7 +546,7 @@ describe "Editor", -> config.set("editor.fontFamily", "Courier") newEditor = editor.splitRight() - expect($("head style.font-family").text()).toMatch "{font-family: Courier}" + expect($("head style.editor-font-family").text()).toMatch "{font-family: Courier}" expect(editor.css('font-family')).toBe 'Courier' expect(newEditor.css('font-family')).toBe 'Courier' @@ -542,7 +557,7 @@ describe "Editor", -> lineHeightBefore = editor.lineHeight charWidthBefore = editor.charWidth - config.set("editor.fontFamily", "Inconsolata") + config.set("editor.fontFamily", "Courier") editor.setCursorScreenPosition [5, 6] expect(editor.charWidth).not.toBe charWidthBefore expect(editor.getCursorView().position()).toEqual { top: 5 * editor.lineHeight, left: 6 * editor.charWidth } @@ -615,7 +630,7 @@ describe "Editor", -> expect(editor.renderedLines.find(".line").length).toBeGreaterThan originalLineCount describe "when the editor is detached", -> - it "updates the font-size correctly and recalculates the dimensions by placing the rendered lines on the DOM", -> + it "redraws the editor according to the new font size when it is reattached", -> rootView.attachToDom() rootView.height(200) rootView.width(200) @@ -651,6 +666,18 @@ describe "Editor", -> editor.renderedLines.trigger mousedownEvent(editor: editor, point: [3, 50]) expect(editor.getCursorBufferPosition()).toEqual(row: 3, column: 50) + describe "when the editor is using a variable-width font", -> + beforeEach -> + editor.setFontFamily('sans-serif') + + afterEach -> + editor.clearFontFamily() + + it "positions the cursor to the clicked row and column", -> + {top, left} = editor.pixelOffsetForScreenPosition([3, 30]) + editor.renderedLines.trigger mousedownEvent(pageX: left, pageY: top) + expect(editor.getCursorScreenPosition()).toEqual [3, 30] + describe "double-click", -> it "selects the word under the cursor, and expands the selection wordwise in either direction on a subsequent shift-click", -> expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0) @@ -1080,6 +1107,19 @@ describe "Editor", -> expect(editor.getSelection().isEmpty()).toBeTruthy() expect(cursorView).toBeVisible() + describe "when the editor is using a variable-width font", -> + beforeEach -> + editor.setFontFamily('sans-serif') + + afterEach -> + editor.clearFontFamily() + + it "correctly positions the cursor", -> + editor.setCursorBufferPosition([3, 30]) + expect(editor.getCursorView().position()).toEqual {top: 3 * editor.lineHeight, left: 178} + editor.setCursorBufferPosition([3, Infinity]) + expect(editor.getCursorView().position()).toEqual {top: 3 * editor.lineHeight, left: 353} + describe "autoscrolling", -> it "only autoscrolls when the last cursor is moved", -> editor.setCursorBufferPosition([11,0]) @@ -1109,6 +1149,15 @@ describe "Editor", -> editor.setCursorBufferPosition([4, 10]) expect(editor.scrollToPixelPosition).toHaveBeenCalled() + it "does not autoscroll the cursor based on a buffer change, unless the buffer change was initiated by the cursor", -> + lastVisibleRow = editor.getLastVisibleScreenRow() + editor.addCursorAtBufferPosition([lastVisibleRow, 0]) + spyOn(editor, 'scrollToPixelPosition') + buffer.insert([lastVisibleRow, 0], "\n\n") + expect(editor.scrollToPixelPosition).not.toHaveBeenCalled() + editor.insertText('\n\n') + expect(editor.scrollToPixelPosition.callCount).toBe 1 + describe "when the last cursor exceeds the upper or lower scroll margins", -> describe "when the editor is taller than twice the vertical scroll margin", -> it "sets the scrollTop so the cursor remains within the scroll margin", -> @@ -1252,7 +1301,27 @@ describe "Editor", -> expect(span0.children('span:eq(2)').text()).toBe "{" line12 = editor.renderedLines.find('.line:eq(11)') - expect(line12.find('span:eq(1)')).toMatchSelector '.keyword' + expect(line12.find('span:eq(2)')).toMatchSelector '.keyword' + + it "wraps hard tabs in a span", -> + editor.setText('\t<- hard tab') + line0 = editor.renderedLines.find('.line:first') + span0_0 = line0.children('span:eq(0)').children('span:eq(0)') + expect(span0_0).toMatchSelector '.hard-tab' + expect(span0_0.text()).toBe ' ' + + it "wraps leading whitespace in a span", -> + line1 = editor.renderedLines.find('.line:eq(1)') + span0_0 = line1.children('span:eq(0)').children('span:eq(0)') + expect(span0_0).toMatchSelector '.leading-whitespace' + expect(span0_0.text()).toBe ' ' + + it "wraps trailing whitespace in a span", -> + editor.setText('trailing whitespace -> ') + line0 = editor.renderedLines.find('.line:first') + span0_last = line0.children('span:eq(0)').children('span:last') + expect(span0_last).toMatchSelector '.trailing-whitespace' + expect(span0_last.text()).toBe ' ' describe "when lines are updated in the buffer", -> it "syntax highlights the updated lines", -> @@ -1297,14 +1366,13 @@ describe "Editor", -> it "changes the max line length and repositions the cursor when the window size changes", -> editor.setCursorBufferPosition([3, 60]) setEditorWidthInChars(editor, 40) - $(window).trigger 'resize' expect(editor.renderedLines.find('.line').length).toBe 19 expect(editor.renderedLines.find('.line:eq(4)').text()).toBe "left = [], right = [];" expect(editor.renderedLines.find('.line:eq(5)').text()).toBe " while(items.length > 0) {" expect(editor.bufferPositionForScreenPosition(editor.getCursorScreenPosition())).toEqual [3, 60] it "does not wrap the lines of any newly assigned buffers", -> - otherEditSession = rootView.project.buildEditSessionForPath() + otherEditSession = project.buildEditSessionForPath() otherEditSession.buffer.setText([1..100].join('')) editor.edit(otherEditSession) expect(editor.renderedLines.find('.line').length).toBe(1) @@ -1340,7 +1408,7 @@ describe "Editor", -> expect(editor.getCursorScreenPosition()).toEqual [11, 0] it "calls .setSoftWrapColumn() when the editor is attached because now its dimensions are available to calculate it", -> - otherEditor = new Editor(editSession: rootView.project.buildEditSessionForPath('sample.js')) + otherEditor = new Editor(editSession: project.buildEditSessionForPath('sample.js')) spyOn(otherEditor, 'setSoftWrapColumn') otherEditor.setSoftWrap(true) @@ -1636,7 +1704,7 @@ describe "Editor", -> describe "when autoscrolling at the end of the document", -> it "renders lines properly", -> - editor.edit(rootView.project.buildEditSessionForPath('two-hundred.txt')) + editor.edit(project.buildEditSessionForPath('two-hundred.txt')) editor.attachToDom(heightInLines: 5.5) expect(editor.renderedLines.find('.line').length).toBe 8 @@ -1694,48 +1762,118 @@ describe "Editor", -> expect(rightEditor.find(".line:first").text()).toBe "_tab _;" expect(leftEditor.find(".line:first").text()).toBe "_tab _;" - it "displays trailing carriage return using a visible non-empty value", -> - editor.setText "a line that ends with a carriage return\r\n" - editor.attachToDom() + it "displays trailing carriage return using a visible non-empty value", -> + editor.setText "a line that ends with a carriage return\r\n" + editor.attachToDom() - expect(config.get("editor.showInvisibles")).toBeFalsy() - expect(editor.renderedLines.find('.line:first').text()).toBe "a line that ends with a carriage return" + expect(config.get("editor.showInvisibles")).toBeFalsy() + expect(editor.renderedLines.find('.line:first').text()).toBe "a line that ends with a carriage return" - config.set("editor.showInvisibles", true) - cr = editor.invisibles?.cr - expect(cr).toBeTruthy() - eol = editor.invisibles?.eol - expect(eol).toBeTruthy() - expect(editor.renderedLines.find('.line:first').text()).toBe "a line that ends with a carriage return#{cr}#{eol}" + config.set("editor.showInvisibles", true) + cr = editor.invisibles?.cr + expect(cr).toBeTruthy() + eol = editor.invisibles?.eol + expect(eol).toBeTruthy() + expect(editor.renderedLines.find('.line:first').text()).toBe "a line that ends with a carriage return#{cr}#{eol}" + describe "when wrapping is on", -> + it "doesn't show the end of line invisible at the end of lines broken due to wrapping", -> + editor.setSoftWrapColumn(6) + editor.setText "a line that wraps" + editor.attachToDom() + config.set "editor.showInvisibles", true + space = editor.invisibles?.space + expect(space).toBeTruthy() + eol = editor.invisibles?.eol + expect(eol).toBeTruthy() + expect(editor.renderedLines.find('.line:first').text()).toBe "a line#{space}" + expect(editor.renderedLines.find('.line:last').text()).toBe "wraps#{eol}" - describe "when wrapping is on", -> - it "doesn't show the end of line invisible at the end of lines broken due to wrapping", -> - editor.setSoftWrapColumn(6) - editor.setText "a line that wraps" - editor.attachToDom() - config.set "editor.showInvisibles", true - space = editor.invisibles?.space - expect(space).toBeTruthy() - eol = editor.invisibles?.eol - expect(eol).toBeTruthy() - expect(editor.renderedLines.find('.line:first').text()).toBe "a line#{space}" - expect(editor.renderedLines.find('.line:last').text()).toBe "wraps#{eol}" + it "displays trailing carriage return using a visible non-empty value", -> + editor.setSoftWrapColumn(6) + editor.setText "a line that\r\n" + editor.attachToDom() + config.set "editor.showInvisibles", true + space = editor.invisibles?.space + expect(space).toBeTruthy() + cr = editor.invisibles?.cr + expect(cr).toBeTruthy() + eol = editor.invisibles?.eol + expect(eol).toBeTruthy() + expect(editor.renderedLines.find('.line:first').text()).toBe "a line#{space}" + expect(editor.renderedLines.find('.line:eq(1)').text()).toBe "that#{cr}#{eol}" + expect(editor.renderedLines.find('.line:last').text()).toBe "#{eol}" - it "displays trailing carriage return using a visible non-empty value", -> - editor.setSoftWrapColumn(6) - editor.setText "a line that\r\n" - editor.attachToDom() - config.set "editor.showInvisibles", true - space = editor.invisibles?.space - expect(space).toBeTruthy() - cr = editor.invisibles?.cr - expect(cr).toBeTruthy() - eol = editor.invisibles?.eol - expect(eol).toBeTruthy() - expect(editor.renderedLines.find('.line:first').text()).toBe "a line#{space}" - expect(editor.renderedLines.find('.line:eq(1)').text()).toBe "that#{cr}#{eol}" - expect(editor.renderedLines.find('.line:last').text()).toBe "#{eol}" + describe "when config.editor.showIndentGuide is set to true", -> + it "adds an indent-guide class to each leading whitespace span", -> + editor.attachToDom() + + expect(config.get("editor.showIndentGuide")).toBeFalsy() + config.set("editor.showIndentGuide", true) + expect(editor.showIndentGuide).toBeTruthy() + + expect(editor.renderedLines.find('.line:eq(0) .indent-guide').length).toBe 0 + + expect(editor.renderedLines.find('.line:eq(1) .indent-guide').length).toBe 1 + expect(editor.renderedLines.find('.line:eq(1) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(2) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(2) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(3) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(3) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(4) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(4) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(5) .indent-guide').length).toBe 3 + expect(editor.renderedLines.find('.line:eq(5) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(6) .indent-guide').length).toBe 3 + expect(editor.renderedLines.find('.line:eq(6) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(7) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(7) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(8) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(8) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(9) .indent-guide').length).toBe 1 + expect(editor.renderedLines.find('.line:eq(9) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').length).toBe 1 + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(11) .indent-guide').length).toBe 1 + expect(editor.renderedLines.find('.line:eq(11) .indent-guide').text()).toBe ' ' + + expect(editor.renderedLines.find('.line:eq(12) .indent-guide').length).toBe 0 + + describe "when the indentation level on a line before an empty line is changed", -> + it "updates the indent guide on the empty line", -> + editor.attachToDom() + config.set("editor.showIndentGuide", true) + + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').length).toBe 1 + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').text()).toBe ' ' + + editor.setCursorBufferPosition([9]) + editor.indentSelectedRows() + + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').text()).toBe ' ' + + describe "when a line contains only whitespace", -> + it "displays an indent guide on the line", -> + editor.attachToDom() + config.set("editor.showIndentGuide", true) + + editor.setCursorBufferPosition([10]) + editor.indent() + editor.indent() + expect(editor.getCursorBufferPosition()).toEqual [10, 4] + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').length).toBe 2 + expect(editor.renderedLines.find('.line:eq(10) .indent-guide').text()).toBe ' ' describe "gutter rendering", -> beforeEach -> @@ -1981,7 +2119,7 @@ describe "Editor", -> describe "folding", -> beforeEach -> - editSession = rootView.project.buildEditSessionForPath('two-hundred.txt') + editSession = project.buildEditSessionForPath('two-hundred.txt') buffer = editSession.buffer editor.edit(editSession) editor.attachToDom() @@ -2130,7 +2268,7 @@ describe "Editor", -> expect(editSession.save).toHaveBeenCalled() describe ".checkoutHead()", -> - [repo, path, originalPathText] = [] + [path, originalPathText] = [] beforeEach -> path = require.resolve('fixtures/git/working-dir/file.txt') @@ -2157,21 +2295,44 @@ describe "Editor", -> runs -> expect(editor.getText()).toBe(originalPathText) - describe "when clicking a gutter line", -> + describe "when clicking in the gutter", -> beforeEach -> - rootView.attachToDom() + editor.attachToDom() - it "moves the cursor to the start of the selected line", -> - expect(editor.getCursorScreenPosition()).toEqual [0,0] - editor.gutter.find(".line-number:eq(1)").trigger 'click' - expect(editor.getCursorScreenPosition()).toEqual [1,0] + describe "when single clicking", -> + it "moves the cursor to the start of the selected line", -> + expect(editor.getCursorScreenPosition()).toEqual [0,0] + event = $.Event("mousedown") + event.pageY = editor.gutter.find(".line-number:eq(1)").offset().top + event.originalEvent = {detail: 1} + editor.gutter.find(".line-number:eq(1)").trigger event + expect(editor.getCursorScreenPosition()).toEqual [1,0] - it "selects to the start of the selected line when shift is pressed", -> - expect(editor.getSelection().getScreenRange()).toEqual [[0,0], [0,0]] - event = $.Event("click") - event.shiftKey = true - editor.gutter.find(".line-number:eq(1)").trigger event - expect(editor.getSelection().getScreenRange()).toEqual [[0,0], [1,0]] + describe "when shift-clicking", -> + it "selects to the start of the selected line", -> + expect(editor.getSelection().getScreenRange()).toEqual [[0,0], [0,0]] + event = $.Event("mousedown") + event.pageY = editor.gutter.find(".line-number:eq(1)").offset().top + event.originalEvent = {detail: 1} + event.shiftKey = true + editor.gutter.find(".line-number:eq(1)").trigger event + expect(editor.getSelection().getScreenRange()).toEqual [[0,0], [1,0]] + + describe "when mousing down and then moving across multiple lines before mousing up", -> + it "selects the lines", -> + mousedownEvent = $.Event("mousedown") + mousedownEvent.pageY = editor.gutter.find(".line-number:eq(1)").offset().top + mousedownEvent.originalEvent = {detail: 1} + editor.gutter.find(".line-number:eq(1)").trigger mousedownEvent + + mousemoveEvent = $.Event("mousemove") + mousemoveEvent.pageY = editor.gutter.find(".line-number:eq(5)").offset().top + mousemoveEvent.originalEvent = {detail: 1} + editor.gutter.find(".line-number:eq(5)").trigger mousemoveEvent + + $(document).trigger 'mouseup' + + expect(editor.getSelection().getScreenRange()).toEqual [[1,0], [5,30]] describe "when clicking below the last line", -> beforeEach -> @@ -2248,7 +2409,7 @@ describe "Editor", -> rootView.attachToDom() afterEach -> - rootView.project.removeGrammarOverrideForPath(path) + project.removeGrammarOverrideForPath(path) fs.remove(path) if fs.exists(path) it "updates all the rendered lines when the grammar changes", -> @@ -2258,7 +2419,7 @@ describe "Editor", -> jsGrammar = syntax.grammarForFilePath('/tmp/js.js') expect(jsGrammar.name).toBe 'JavaScript' - rootView.project.addGrammarOverrideForPath(path, jsGrammar) + project.addGrammarOverrideForPath(path, jsGrammar) expect(editor.reloadGrammar()).toBeTruthy() expect(editor.getGrammar()).toBe jsGrammar @@ -2291,7 +2452,7 @@ describe "Editor", -> expect(eventHandler).not.toHaveBeenCalled() jsGrammar = syntax.grammarForFilePath('/tmp/js.js') - rootView.project.addGrammarOverrideForPath(path, jsGrammar) + project.addGrammarOverrideForPath(path, jsGrammar) editor.reloadGrammar() expect(eventHandler).toHaveBeenCalled() @@ -2588,3 +2749,113 @@ describe "Editor", -> expect(buffer.lineForRow(14)).toBe '' expect(buffer.lineForRow(15)).toBeUndefined() expect(editor.getCursorBufferPosition()).toEqual [14, 0] + + describe "when the cursor is on the second to last line and the last line only a newline", -> + it "duplicates the current line below and moves the cursor down one row", -> + editor.moveCursorToBottom() + editor.insertNewline() + editor.setCursorBufferPosition([12]) + editor.trigger 'editor:duplicate-line' + expect(buffer.lineForRow(12)).toBe '};' + expect(buffer.lineForRow(13)).toBe '};' + expect(buffer.lineForRow(14)).toBe '' + expect(buffer.lineForRow(15)).toBeUndefined() + expect(editor.getCursorBufferPosition()).toEqual [13, 0] + + describe ".moveEditSessionToIndex(fromIndex, toIndex)", -> + describe "when the edit session moves to a later index", -> + it "updates the edit session order", -> + jsPath = editor.getPath() + rootView.open("sample.txt") + txtPath = editor.getPath() + expect(editor.editSessions[0].getPath()).toBe jsPath + expect(editor.editSessions[1].getPath()).toBe txtPath + editor.moveEditSessionToIndex(0, 1) + expect(editor.editSessions[0].getPath()).toBe txtPath + expect(editor.editSessions[1].getPath()).toBe jsPath + + it "fires an editor:edit-session-order-changed event", -> + eventHandler = jasmine.createSpy("eventHandler") + rootView.open("sample.txt") + editor.on "editor:edit-session-order-changed", eventHandler + editor.moveEditSessionToIndex(0, 1) + expect(eventHandler).toHaveBeenCalled() + + it "sets the moved session as the editor's active session", -> + jsPath = editor.getPath() + rootView.open("sample.txt") + txtPath = editor.getPath() + expect(editor.activeEditSession.getPath()).toBe txtPath + editor.moveEditSessionToIndex(0, 1) + expect(editor.activeEditSession.getPath()).toBe jsPath + + describe "when the edit session moves to an earlier index", -> + it "updates the edit session order", -> + jsPath = editor.getPath() + rootView.open("sample.txt") + txtPath = editor.getPath() + expect(editor.editSessions[0].getPath()).toBe jsPath + expect(editor.editSessions[1].getPath()).toBe txtPath + editor.moveEditSessionToIndex(1, 0) + expect(editor.editSessions[0].getPath()).toBe txtPath + expect(editor.editSessions[1].getPath()).toBe jsPath + + it "fires an editor:edit-session-order-changed event", -> + eventHandler = jasmine.createSpy("eventHandler") + rootView.open("sample.txt") + editor.on "editor:edit-session-order-changed", eventHandler + editor.moveEditSessionToIndex(1, 0) + expect(eventHandler).toHaveBeenCalled() + + it "sets the moved session as the editor's active session", -> + jsPath = editor.getPath() + rootView.open("sample.txt") + txtPath = editor.getPath() + expect(editor.activeEditSession.getPath()).toBe txtPath + editor.moveEditSessionToIndex(1, 0) + expect(editor.activeEditSession.getPath()).toBe txtPath + + describe ".moveEditSessionToEditor(fromIndex, toEditor, toIndex)", -> + it "closes the edit session in the source editor", -> + jsPath = editor.getPath() + rootView.open("sample.txt") + txtPath = editor.getPath() + rightEditor = editor.splitRight() + expect(editor.editSessions[0].getPath()).toBe jsPath + expect(editor.editSessions[1].getPath()).toBe txtPath + editor.moveEditSessionToEditor(0, rightEditor, 1) + expect(editor.editSessions[0].getPath()).toBe txtPath + expect(editor.editSessions[1]).toBeUndefined() + + it "opens the edit session in the destination editor at the target index", -> + jsPath = editor.getPath() + rootView.open("sample.txt") + txtPath = editor.getPath() + rightEditor = editor.splitRight() + expect(rightEditor.editSessions[0].getPath()).toBe txtPath + expect(rightEditor.editSessions[1]).toBeUndefined() + editor.moveEditSessionToEditor(0, rightEditor, 0) + expect(rightEditor.editSessions[0].getPath()).toBe jsPath + expect(rightEditor.editSessions[1].getPath()).toBe txtPath + + describe "when editor:undo-close-session is triggered", -> + describe "when an edit session is opened back up after it is closed", -> + it "is removed from the undo stack and not reopened when the event is triggered", -> + rootView.open('sample.txt') + expect(editor.getPath()).toBe fixturesProject.resolve('sample.txt') + editor.trigger "core:close" + expect(editor.closedEditSessions.length).toBe 1 + rootView.open('sample.txt') + expect(editor.closedEditSessions.length).toBe 0 + editor.trigger 'editor:undo-close-session' + expect(editor.getPath()).toBe fixturesProject.resolve('sample.txt') + + it "opens the closed session back up at the previous index", -> + rootView.open('sample.txt') + editor.loadPreviousEditSession() + expect(editor.getPath()).toBe fixturesProject.resolve('sample.js') + editor.trigger "core:close" + expect(editor.getPath()).toBe fixturesProject.resolve('sample.txt') + editor.trigger 'editor:undo-close-session' + expect(editor.getPath()).toBe fixturesProject.resolve('sample.js') + expect(editor.getActiveEditSessionIndex()).toBe 0 diff --git a/spec/app/git-spec.coffee b/spec/app/git-spec.coffee index 20edab6bb..fc9c85f46 100644 --- a/spec/app/git-spec.coffee +++ b/spec/app/git-spec.coffee @@ -2,10 +2,14 @@ Git = require 'git' fs = require 'fs' describe "Git", -> + repo = null beforeEach -> fs.remove('/tmp/.git') if fs.isDirectory('/tmp/.git') + afterEach -> + repo.destroy() if repo?.repo? + describe "@open(path)", -> it "returns null when no repository is found", -> expect(Git.open('/tmp/nogit.txt')).toBeNull() @@ -71,7 +75,7 @@ describe "Git", -> expect(repo.isPathModified(newPath)).toBeFalsy() describe ".isPathNew(path)", -> - [repo, path, newPath] = [] + [path, newPath] = [] beforeEach -> repo = new Git(require.resolve('fixtures/git/working-dir')) @@ -90,7 +94,7 @@ describe "Git", -> expect(repo.isPathNew(path)).toBeFalsy() describe ".checkoutHead(path)", -> - [repo, path1, path2, originalPath1Text, originalPath2Text] = [] + [path1, path2, originalPath1Text, originalPath2Text] = [] beforeEach -> repo = new Git(require.resolve('fixtures/git/working-dir')) @@ -127,3 +131,19 @@ describe "Git", -> repo = new Git(require.resolve('fixtures/git/master.git/HEAD')) repo.destroy() expect(-> repo.getHead()).toThrow() + + describe ".getDiffStats(path)", -> + [path, originalPathText] = [] + + beforeEach -> + repo = new Git(require.resolve('fixtures/git/working-dir')) + path = require.resolve('fixtures/git/working-dir/file.txt') + originalPathText = fs.read(path) + + afterEach -> + fs.write(path, originalPathText) + + it "returns the number of lines added and deleted", -> + expect(repo.getDiffStats(path)).toEqual {added: 0, deleted: 0} + fs.write(path, "#{originalPathText} edited line") + expect(repo.getDiffStats(path)).toEqual {added: 1, deleted: 1} diff --git a/spec/app/grammar-view-spec.coffee b/spec/app/grammar-view-spec.coffee index ffe864903..afa03839d 100644 --- a/spec/app/grammar-view-spec.coffee +++ b/spec/app/grammar-view-spec.coffee @@ -6,10 +6,9 @@ describe "GrammarView", -> [editor, textGrammar, jsGrammar] = [] beforeEach -> - path = require.resolve('fixtures/sample.js') - rootView = new RootView() - rootView.project.removeGrammarOverrideForPath(path) - rootView.open(path) + window.rootView = new RootView + project.removeGrammarOverrideForPath('sample.js') + rootView.open('sample.js') editor = rootView.getActiveEditor() rootView.attachToDom() textGrammar = _.find syntax.grammars, (grammar) -> grammar.name is 'Plain Text' @@ -18,9 +17,6 @@ describe "GrammarView", -> expect(jsGrammar).toBeTruthy() expect(editor.getGrammar()).toBe jsGrammar - afterEach -> - rootView.deactivate() - describe "when editor:select-grammar is toggled", -> it "displays a list of all the available grammars", -> editor.trigger 'editor:select-grammar' diff --git a/spec/app/keymap-spec.coffee b/spec/app/keymap-spec.coffee index 01ef31019..b813ad50c 100644 --- a/spec/app/keymap-spec.coffee +++ b/spec/app/keymap-spec.coffee @@ -1,5 +1,6 @@ Keymap = require 'keymap' $ = require 'jquery' +RootView = require 'root-view' describe "Keymap", -> fragment = null @@ -23,8 +24,8 @@ describe "Keymap", -> keymap.bindKeys '.command-mode', 'x': 'deleteChar' keymap.bindKeys '.insert-mode', 'x': 'insertChar' - deleteCharHandler = jasmine.createSpy 'deleteCharHandler' - insertCharHandler = jasmine.createSpy 'insertCharHandler' + deleteCharHandler = jasmine.createSpy('deleteCharHandler') + insertCharHandler = jasmine.createSpy('insertCharHandler') fragment.on 'deleteChar', deleteCharHandler fragment.on 'insertChar', insertCharHandler @@ -34,8 +35,8 @@ describe "Keymap", -> expect(event.keystrokes).toBe 'alt-meta-x' describe "when no binding matches the event's keystroke", -> - it "returns true, so the event continues to propagate", -> - expect(keymap.handleKeyEvent(keydownEvent('0', target: fragment[0]))).toBeTruthy() + it "does not return false so the event continues to propagate", -> + expect(keymap.handleKeyEvent(keydownEvent('0', target: fragment[0]))).not.toBe false describe "when at least one binding fully matches the event's keystroke", -> describe "when the event's target node matches a selector with a matching binding", -> @@ -149,6 +150,19 @@ describe "Keymap", -> keymap.handleKeyEvent(keydownEvent('y', target: target)) expect(bazHandler).toHaveBeenCalled() + describe "when the event's target is the document body", -> + it "triggers the mapped event on the rootView", -> + window.rootView = new RootView + keymap.bindKeys 'body', 'x': 'foo' + fooHandler = jasmine.createSpy("fooHandler") + rootView.on 'foo', fooHandler + + result = keymap.handleKeyEvent(keydownEvent('x', target: document.body)) + expect(result).toBe(false) + expect(fooHandler).toHaveBeenCalled() + expect(deleteCharHandler).not.toHaveBeenCalled() + expect(insertCharHandler).not.toHaveBeenCalled() + describe "when at least one binding partially matches the event's keystroke", -> [quitHandler, closeOtherWindowsHandler] = [] @@ -162,8 +176,8 @@ describe "Keymap", -> fragment.on 'quit', quitHandler fragment.on 'close-other-windows', closeOtherWindowsHandler - it "only matches entire keystroke patters", -> - expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0]))).toBeTruthy() + it "only matches entire keystroke patterns", -> + expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0]))).not.toBe false describe "when the event's target node matches a selector with a partially matching multi-stroke binding", -> describe "when a second keystroke added to the first to match a multi-stroke binding completely", -> @@ -183,12 +197,12 @@ describe "Keymap", -> describe "when a second keystroke added to the first doesn't match any bindings", -> it "clears the queued keystrokes without triggering any events", -> - expect(keymap.handleKeyEvent(keydownEvent('x', target: fragment[0], ctrlKey: true))).toBeFalsy() - expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0]))).toBeFalsy() + expect(keymap.handleKeyEvent(keydownEvent('x', target: fragment[0], ctrlKey: true))).toBe false + expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0]))).toBe false expect(quitHandler).not.toHaveBeenCalled() expect(closeOtherWindowsHandler).not.toHaveBeenCalled() - expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0]))).toBeTruthy() + expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0]))).not.toBe false describe "when the event's target node descends from multiple nodes that match selectors with a partial binding match", -> it "allows any of the bindings to be triggered upon a second keystroke, favoring the most specific selector", -> @@ -216,6 +230,10 @@ describe "Keymap", -> describe "when there is a complete binding with a more specific selector", -> it "favors the more specific complete match", -> + describe "when a tab keystroke does not match any bindings", -> + it "returns false to prevent the browser from transferring focus", -> + expect(keymap.handleKeyEvent(keydownEvent('U+0009', target: fragment[0]))).toBe false + describe ".bindKeys(selector, hash)", -> it "normalizes the key patterns in the hash to put the modifiers in alphabetical order", -> fooHandler = jasmine.createSpy('fooHandler') diff --git a/spec/app/root-view-spec.coffee b/spec/app/root-view-spec.coffee index cc3516b9d..368d095cb 100644 --- a/spec/app/root-view-spec.coffee +++ b/spec/app/root-view-spec.coffee @@ -1,110 +1,59 @@ $ = require 'jquery' fs = require 'fs' +Project = require 'project' RootView = require 'root-view' Buffer = require 'buffer' Editor = require 'editor' {View, $$} = require 'space-pen' describe "RootView", -> - rootView = null - path = null + pathToOpen = null beforeEach -> - path = require.resolve 'fixtures/dir/a' - rootView = new RootView(path) + project.destroy() + project.setPath(project.resolve('dir')) + pathToOpen = project.resolve('a') + window.rootView = new RootView rootView.enableKeymap() + rootView.open(pathToOpen) rootView.focus() - afterEach -> - rootView.deactivate() - - describe ".initialize(pathToOpen)", -> - describe "when called with a pathToOpen", -> - describe "when pathToOpen references a file", -> - it "creates a project for the file's parent directory, then sets the title and opens the file in an editor", -> - expect(rootView.project.getPath()).toBe fs.directory(path) - expect(rootView.getEditors().length).toBe 1 - expect(rootView.getEditors()[0]).toHaveClass 'active' - expect(rootView.getActiveEditor().getPath()).toBe path - expect(rootView.getActiveEditor().editSessions.length).toBe 1 - expect(rootView.getTitle()).toBe "#{fs.base(path)} – #{rootView.project.getPath()}" - - describe "when pathToOpen references a directory", -> - beforeEach -> - rootView.remove() - - it "creates a project for the directory and sets the title, but does not open an editor", -> - path = require.resolve 'fixtures/dir' - rootView = new RootView(path) - rootView.focus() - - expect(rootView.project.getPath()).toBe path - expect(rootView.getEditors().length).toBe 0 - expect(rootView.getTitle()).toBe rootView.project.getPath() - - describe "when called with no pathToOpen", -> - it "opens an empty buffer", -> - rootView.remove() - rootView = new RootView - expect(rootView.getEditors().length).toBe 1 - expect(rootView.getEditors()[0].getText()).toEqual "" - expect(rootView.getTitle()).toBe 'untitled' - - describe ".deactivate()", -> - it "deactivates all packages", -> - pack = atom.loadPackage("package-with-module") - atom.activateAtomPackage(pack) - spyOn(pack.packageMain, "deactivate").andCallThrough() - rootView.deactivate() - expect(pack.packageMain.deactivate).toHaveBeenCalled() - describe "@deserialize()", -> viewState = null describe "when the serialized RootView has an unsaved buffer", -> - buffer = null - - beforeEach -> - rootView.remove() - rootView = new RootView + it "constructs the view with the same panes", -> rootView.open() editor1 = rootView.getActiveEditor() buffer = editor1.getBuffer() editor1.splitRight() viewState = rootView.serialize() + rootView.deactivate() - it "constructs the view with the same panes", -> - rootView = RootView.deserialize(viewState) - expect(rootView.project.getPath()?).toBeFalsy() + window.rootView = RootView.deserialize(viewState) + rootView.focus() expect(rootView.getEditors().length).toBe 2 expect(rootView.getActiveEditor().getText()).toBe buffer.getText() - expect(rootView.getTitle()).toBe 'untitled' + expect(rootView.getTitle()).toBe "untitled – #{project.getPath()}" describe "when the serialized RootView has a project", -> - beforeEach -> - path = require.resolve 'fixtures' - rootView.remove() - rootView = new RootView(path) - describe "when there are open editors", -> - beforeEach -> - rootView.open('dir/a') + it "constructs the view with the same panes", -> editor1 = rootView.getActiveEditor() editor2 = editor1.splitRight() editor3 = editor2.splitRight() editor4 = editor2.splitDown() - editor2.edit(rootView.project.buildEditSessionForPath('dir/b')) - editor3.edit(rootView.project.buildEditSessionForPath('sample.js')) + editor2.edit(project.buildEditSessionForPath('b')) + editor3.edit(project.buildEditSessionForPath('../sample.js')) editor3.setCursorScreenPosition([2, 4]) - editor4.edit(rootView.project.buildEditSessionForPath('sample.txt')) + editor4.edit(project.buildEditSessionForPath('../sample.txt')) editor4.setCursorScreenPosition([0, 2]) rootView.attachToDom() editor2.focus() - viewState = rootView.serialize() - rootView.remove() - it "constructs the view with the same project and panes", -> - rootView = RootView.deserialize(viewState) + viewState = rootView.serialize() + rootView.deactivate() + window.rootView = RootView.deserialize(viewState) rootView.attachToDom() expect(rootView.getEditors().length).toBe 4 @@ -113,11 +62,11 @@ describe "RootView", -> editor2 = rootView.panes.find('.row > .column > .pane .editor:eq(0)').view() editor4 = rootView.panes.find('.row > .column > .pane .editor:eq(1)').view() - expect(editor1.getPath()).toBe require.resolve('fixtures/dir/a') - expect(editor2.getPath()).toBe require.resolve('fixtures/dir/b') - expect(editor3.getPath()).toBe require.resolve('fixtures/sample.js') + expect(editor1.getPath()).toBe project.resolve('a') + expect(editor2.getPath()).toBe project.resolve('b') + expect(editor3.getPath()).toBe project.resolve('../sample.js') expect(editor3.getCursorScreenPosition()).toEqual [2, 4] - expect(editor4.getPath()).toBe require.resolve('fixtures/sample.txt') + expect(editor4.getPath()).toBe project.resolve('../sample.txt') expect(editor4.getCursorScreenPosition()).toEqual [0, 2] # ensure adjust pane dimensions is called @@ -132,38 +81,37 @@ describe "RootView", -> expect(editor3.isFocused).toBeFalsy() expect(editor4.isFocused).toBeFalsy() - expect(rootView.getTitle()).toBe "#{fs.base(editor2.getPath())} – #{rootView.project.getPath()}" + expect(rootView.getTitle()).toBe "#{fs.base(editor2.getPath())} – #{project.getPath()}" describe "where there are no open editors", -> - beforeEach -> - rootView.attachToDom() - viewState = rootView.serialize() - rootView.remove() - it "constructs the view with no open editors", -> - rootView = RootView.deserialize(viewState) - rootView.attachToDom() + rootView.getActiveEditor().remove() + expect(rootView.getEditors().length).toBe 0 - expect(rootView.getEditors().length).toBe 0 + viewState = rootView.serialize() + console.log viewState + rootView.deactivate() + window.rootView = RootView.deserialize(viewState) + + rootView.attachToDom() + expect(rootView.getEditors().length).toBe 0 describe "when a pane's wrapped view cannot be deserialized", -> it "renders an empty pane", -> viewState = panesViewState: - viewClass: "Pane", + deserializer: "Pane", wrappedView: - viewClass: "BogusView" + deserializer: "BogusView" - rootView.remove() - rootView = RootView.deserialize(viewState) + rootView.deactivate() + window.rootView = RootView.deserialize(viewState) expect(rootView.find('.pane').length).toBe 1 expect(rootView.find('.pane').children().length).toBe 0 describe "focus", -> describe "when there is an active editor", -> it "hands off focus to the active editor", -> - rootView.remove() - rootView = new RootView(require.resolve 'fixtures') rootView.attachToDom() rootView.open() # create an editor @@ -175,26 +123,24 @@ describe "RootView", -> expect(rootView.getActiveEditor().isFocused).toBeTruthy() describe "when there is no active editor", -> + beforeEach -> + rootView.getActiveEditor().remove() + rootView.attachToDom() + describe "when are visible focusable elements (with a -1 tabindex)", -> it "passes focus to the first focusable element", -> - rootView.remove() - rootView = new RootView(require.resolve 'fixtures') - rootView.horizontal.append $$ -> @div "One", id: 'one', tabindex: -1 @div "Two", id: 'two', tabindex: -1 - rootView.attachToDom() + rootView.focus() expect(rootView).not.toMatchSelector(':focus') expect(rootView.find('#one')).toMatchSelector(':focus') expect(rootView.find('#two')).not.toMatchSelector(':focus') describe "when there are no visible focusable elements", -> - it "retains focus itself", -> - rootView.remove() - rootView = new RootView(require.resolve 'fixtures') - rootView.attachToDom() - expect(rootView).toMatchSelector(':focus') + it "surrenders focus to the body", -> + expect(document.activeElement).toBe $('body')[0] describe "panes", -> [pane1, newPaneContent] = [] @@ -448,33 +394,33 @@ describe "RootView", -> expect(Object.keys(keybindings).length).toBe 2 expect(keybindings["meta-a"]).toEqual "test-event-a" - describe "when the focused editor changes", -> + describe "when the path of the active editor changes", -> it "changes the title and emits an root-view:active-path-changed event", -> pathChangeHandler = jasmine.createSpy 'pathChangeHandler' rootView.on 'root-view:active-path-changed', pathChangeHandler editor1 = rootView.getActiveEditor() - expect(rootView.getTitle()).toBe "#{fs.base(editor1.getPath())} – #{rootView.project.getPath()}" + expect(rootView.getTitle()).toBe "#{fs.base(editor1.getPath())} – #{project.getPath()}" editor2 = rootView.getActiveEditor().splitLeft() - path = rootView.project.resolve('b') - editor2.edit(rootView.project.buildEditSessionForPath(path)) + path = project.resolve('b') + editor2.edit(project.buildEditSessionForPath(path)) expect(pathChangeHandler).toHaveBeenCalled() - expect(rootView.getTitle()).toBe "#{fs.base(editor2.getPath())} – #{rootView.project.getPath()}" + expect(rootView.getTitle()).toBe "#{fs.base(editor2.getPath())} – #{project.getPath()}" pathChangeHandler.reset() editor1.getBuffer().saveAs("/tmp/should-not-be-title.txt") expect(pathChangeHandler).not.toHaveBeenCalled() - expect(rootView.getTitle()).toBe "#{fs.base(editor2.getPath())} – #{rootView.project.getPath()}" + expect(rootView.getTitle()).toBe "#{fs.base(editor2.getPath())} – #{project.getPath()}" - it "creates a project if there isn't one yet and the buffer was previously unsaved", -> - rootView.remove() - rootView = new RootView + it "sets the project path to the directory of the editor if it was previously unassigned", -> + project.setPath(undefined) + window.rootView = new RootView rootView.open() - expect(rootView.project.getPath()?).toBeFalsy() + expect(project.getPath()?).toBeFalsy() rootView.getActiveEditor().getBuffer().saveAs('/tmp/ignore-me') - expect(rootView.project.getPath()).toBe '/tmp' + expect(project.getPath()).toBe '/tmp' describe "when editors are focused", -> it "triggers 'root-view:active-path-changed' events if the path of the active editor actually changes", -> @@ -502,7 +448,7 @@ describe "RootView", -> describe "when the last editor is removed", -> it "updates the title to the project path", -> rootView.getEditors()[0].remove() - expect(rootView.getTitle()).toBe rootView.project.getPath() + expect(rootView.getTitle()).toBe project.getPath() describe "font size adjustment", -> editor = null @@ -624,12 +570,12 @@ describe "RootView", -> describe ".saveAll()", -> it "saves all open editors", -> - rootView.remove() + project.setPath('/tmp') file1 = '/tmp/atom-temp1.txt' file2 = '/tmp/atom-temp2.txt' fs.write(file1, "file1") fs.write(file2, "file2") - rootView = new RootView(file1) + rootView.open(file1) editor1 = rootView.getActiveEditor() buffer1 = editor1.activeEditSession.buffer @@ -639,7 +585,7 @@ describe "RootView", -> expect(buffer1.isModified()).toBe(true) editor2 = editor1.splitRight() - editor2.edit(rootView.project.buildEditSessionForPath('atom-temp2.txt')) + editor2.edit(project.buildEditSessionForPath('atom-temp2.txt')) buffer2 = editor2.activeEditSession.buffer expect(buffer2.getText()).toBe("file2") expect(buffer2.isModified()).toBe(false) diff --git a/spec/app/syntax-spec.coffee b/spec/app/syntax-spec.coffee index 9660fcecb..5cf79f7e3 100644 --- a/spec/app/syntax-spec.coffee +++ b/spec/app/syntax-spec.coffee @@ -12,6 +12,16 @@ describe "the `syntax` global", -> filePath = require.resolve("fixtures/shebang") expect(syntax.grammarForFilePath(filePath).name).toBe "Ruby" + it "uses the number of newlines in the first line regex to determine the number of lines to test against", -> + fileContent = "first-line\n" + expect(syntax.grammarForFilePath("dummy.coffee", fileContent).name).toBe "CoffeeScript" + + fileContent = '' + expect(syntax.grammarForFilePath("grammar.tmLanguage", fileContent).name).toBe "Plain Text" + + fileContent += '\n' + expect(syntax.grammarForFilePath("grammar.tmLanguage", fileContent).name).toBe "Property List (XML)" + it "doesn't read the file when the file contents are specified", -> filePath = require.resolve("fixtures/shebang") filePathContents = fs.read(filePath) diff --git a/spec/app/text-mate-grammar-spec.coffee b/spec/app/text-mate-grammar-spec.coffee index c1a2fbc62..91f220ecb 100644 --- a/spec/app/text-mate-grammar-spec.coffee +++ b/spec/app/text-mate-grammar-spec.coffee @@ -61,7 +61,7 @@ describe "TextMateGrammar", -> it "creates distinct tokens for nested captures and does not return tokens beyond the scope of the overall capture", -> {tokens} = grammar.tokenizeLine(" destroy: ->") expect(tokens.length).toBe 6 - expect(tokens[0]).toEqual(value: ' ', scopes: ["source.coffee", "meta.function.coffee"]) + expect(tokens[0]).toEqual(value: ' ', scopes: ["source.coffee"]) expect(tokens[1]).toEqual(value: 'destro', scopes: ["source.coffee", "meta.function.coffee", "entity.name.function.coffee"]) # this dangling 'y' with a duplicated scope looks wrong, but textmate yields the same behavior. probably a quirk in the coffee grammar. expect(tokens[2]).toEqual(value: 'y', scopes: ["source.coffee", "meta.function.coffee", "entity.name.function.coffee", "entity.name.function.coffee"]) diff --git a/spec/app/theme-spec.coffee b/spec/app/theme-spec.coffee index aef4aab8e..5afebc983 100644 --- a/spec/app/theme-spec.coffee +++ b/spec/app/theme-spec.coffee @@ -20,13 +20,34 @@ describe "@load(name)", -> expect($(".editor").css("background-color")).toBe("rgb(20, 20, 20)") describe "AtomTheme", -> - it "Loads and applies css from package.json in the correct order", -> - expect($(".editor").css("padding-top")).not.toBe("101px") - expect($(".editor").css("padding-right")).not.toBe("102px") - expect($(".editor").css("padding-bottom")).not.toBe("103px") + describe "when the theme contains a package.json file", -> + it "loads and applies css from package.json in the correct order", -> + expect($(".editor").css("padding-top")).not.toBe("101px") + expect($(".editor").css("padding-right")).not.toBe("102px") + expect($(".editor").css("padding-bottom")).not.toBe("103px") - themePath = require.resolve(fs.join('fixtures', 'test-atom-theme')) - theme = Theme.load(themePath) - expect($(".editor").css("padding-top")).toBe("101px") - expect($(".editor").css("padding-right")).toBe("102px") - expect($(".editor").css("padding-bottom")).toBe("103px") + themePath = fixturesProject.resolve('themes/theme-with-package-file') + theme = Theme.load(themePath) + expect($(".editor").css("padding-top")).toBe("101px") + expect($(".editor").css("padding-right")).toBe("102px") + expect($(".editor").css("padding-bottom")).toBe("103px") + + describe "when the theme is a CSS file", -> + it "loads and applies the stylesheet", -> + expect($(".editor").css("padding-bottom")).not.toBe "1234px" + + themePath = fixturesProject.resolve('themes/theme-stylesheet.css') + theme = Theme.load(themePath) + expect($(".editor").css("padding-top")).toBe "1234px" + + describe "when the theme does not contain a package.json file and is a directory", -> + it "loads all CSS files in the directory", -> + expect($(".editor").css("padding-top")).not.toBe "10px" + expect($(".editor").css("padding-right")).not.toBe "20px" + expect($(".editor").css("padding-bottom")).not.toBe "30px" + + themePath = fixturesProject.resolve('themes/theme-without-package-file') + theme = Theme.load(themePath) + expect($(".editor").css("padding-top")).toBe "10px" + expect($(".editor").css("padding-right")).toBe "20px" + expect($(".editor").css("padding-bottom")).toBe "30px" diff --git a/spec/app/window-spec.coffee b/spec/app/window-spec.coffee index 1c166db8f..f229e426e 100644 --- a/spec/app/window-spec.coffee +++ b/spec/app/window-spec.coffee @@ -2,16 +2,17 @@ $ = require 'jquery' fs = require 'fs' describe "Window", -> - [rootView] = [] + projectPath = null beforeEach -> - window.setUpEventHandlers() - window.attachRootView(require.resolve('fixtures')) - rootView = window.rootView + spyOn(atom, 'getPathToOpen').andReturn(project.getPath()) + window.handleWindowEvents() + window.buildProjectAndRootView() + projectPath = project.getPath() afterEach -> window.shutdown() - atom.setRootViewStateForPath(rootView.project.getPath(), null) + atom.setRootViewStateForPath(projectPath, null) $(window).off 'beforeunload' describe "when the window is loaded", -> @@ -86,12 +87,19 @@ describe "Window", -> removeStylesheet(cssPath) expect($(document.body).css('font-weight')).not.toBe("bold") - describe "before the window is unloaded", -> - it "saves the serialized state of the root view to the atom object so it can be rehydrated after reload", -> - expect(atom.getRootViewStateForPath(window.rootView.project.getPath())).toBeUndefined() - expectedState = JSON.parse(JSON.stringify(window.rootView.serialize())) # JSON.stringify removes keys with undefined values - $(window).trigger 'beforeunload' - expect(atom.getRootViewStateForPath(rootView.project.getPath())).toEqual expectedState + describe ".shutdown()", -> + it "saves the serialized state of the project and root view to the atom object so it can be rehydrated after reload", -> + projectPath = project.getPath() + expect(atom.getRootViewStateForPath(projectPath)).toBeUndefined() + # JSON.stringify removes keys with undefined values + rootViewState = JSON.parse(JSON.stringify(rootView.serialize())) + projectState = JSON.parse(JSON.stringify(project.serialize())) + + window.shutdown() + + expect(atom.getRootViewStateForPath(projectPath)).toEqual + project: projectState + rootView: rootViewState it "unsubscribes from all buffers", -> rootView.open('sample.js') @@ -99,15 +107,12 @@ describe "Window", -> editor2 = editor1.splitRight() expect(window.rootView.getEditors().length).toBe 2 - $(window).trigger 'beforeunload' + window.shutdown() expect(editor1.getBuffer().subscriptionCount()).toBe 0 - describe ".shutdown()", -> - it "only deactivates the RootView the first time it is called", -> - deactivateSpy = spyOn(rootView, "deactivate").andCallThrough() + it "only serializes window state the first time it is called", -> + deactivateSpy = spyOn(atom, "setRootViewStateForPath").andCallThrough() window.shutdown() - expect(rootView.deactivate).toHaveBeenCalled() - deactivateSpy.reset() window.shutdown() - expect(rootView.deactivate).not.toHaveBeenCalled() + expect(atom.setRootViewStateForPath.callCount).toBe 1 diff --git a/spec/atom-reporter.coffee b/spec/atom-reporter.coffee new file mode 100644 index 000000000..c02035cc8 --- /dev/null +++ b/spec/atom-reporter.coffee @@ -0,0 +1,181 @@ +$ = require 'jquery' +{View, $$} = require 'space-pen' +_ = require 'underscore' + +module.exports = +class AtomReporter extends View + @content: -> + @div id: 'HTMLReporter', class: 'jasmine_reporter', => + @div outlet: 'specPopup', class: "spec-popup" + @div outlet: "suites" + @ul outlet: "symbolSummary", class: 'symbolSummary' + @div outlet: "status", class: 'status', => + @div outlet: "time", class: 'time' + @div outlet: "specCount", class: 'spec-count' + @div outlet: "message", class: 'message' + @div outlet: "results", class: 'results' + + startedAt: null + runningSpecCount: 0 + completeSpecCount: 0 + passedCount: 0 + failedCount: 0 + skippedCount: 0 + totalSpecCount: 0 + @timeoutId: 0 + + reportRunnerStarting: (runner) -> + @handleEvents() + @startedAt = new Date() + specs = runner.specs() + @totalSpecCount = specs.length + @addSpecs(specs) + $(document.body).append this + + reportRunnerResults: (runner) -> + if @failedCount == 0 + @message.text "Success!" + else + @message.text "Game Over" + + reportSuiteResults: (suite) -> + + reportSpecResults: (spec) -> + @completeSpecCount++ + @specComplete(spec) + @updateStatusView(spec) + + reportSpecStarting: (spec) -> + @specStarted(spec) + + specFilter: (spec) -> + globalFocusPriority = jasmine.getEnv().focusPriority + parent = spec.parentSuite ? spec.suite + + if !globalFocusPriority + true + else if spec.focusPriority >= globalFocusPriority + true + else if not parent + false + else + @specFilter(parent) + + handleEvents: -> + $(document).on "mouseover", ".spec-summary", ({currentTarget}) => + element = $(currentTarget) + description = element.data("description") + return unless description + + clearTimeout @timeoutId if @timeoutId? + @specPopup.show() + spec = _.find(window.timedSpecs, (spec) -> description is spec.name) + description = "#{description} #{spec.time}ms" if spec + @specPopup.text description + {left, top} = element.offset() + left += 20 + top += 20 + @specPopup.offset({left, top}) + @timeoutId = setTimeout((=> @specPopup.hide()), 3000) + + $(document).on "click", ".spec-toggle", ({currentTarget}) => + element = $(currentTarget) + specFailures = element.parent().find('.spec-failures') + specFailures.toggle() + if specFailures.is(":visible") then element.text "\uf03d" else element.html "\uf03f" + false + + updateStatusView: (spec) -> + if @failedCount > 0 + @status.addClass('failed') unless @status.hasClass('failed') + + if @skippedCount + specCount = "#{@completeSpecCount - @skippedCount}/#{@totalSpecCount - @skippedCount} (#{@skippedCount} skipped)" + else + specCount = "#{@completeSpecCount}/#{@totalSpecCount}" + @specCount.text specCount + + rootSuite = spec.suite + rootSuite = rootSuite.parentSuite while rootSuite.parentSuite + @message.text rootSuite.description + + time = "#{Math.round((new Date().getTime() - @startedAt.getTime()) / 10)}" + time = "0#{time}" if time.length < 3 + @time.text "#{time[0...-2]}.#{time[-2..]}s" + + addSpecs: (specs) -> + for spec in specs + symbol = $$ -> @li class: "spec-summary pending spec-summary-#{spec.id}" + @symbolSummary.append symbol + + specStarted: (spec) -> + @runningSpecCount++ + + specComplete: (spec) -> + specSummaryElement = $(".spec-summary-#{spec.id}") + specSummaryElement.removeClass('pending') + specSummaryElement.data("description", spec.getFullName()) + + results = spec.results() + if results.skipped + specSummaryElement.addClass("skipped") + @skippedCount++ + else if results.passed() + specSummaryElement.addClass("passed") + @passedCount++ + else + specSummaryElement.addClass("failed") + + specView = new SpecResultView(spec) + specView.attach() + @failedCount++ + +class SuiteResultView extends View + @content: -> + @div class: 'suite', => + @div outlet: 'description', class: 'description' + + suite: null + + initialize: (@suite) -> + @addClass("suite-view-#{@suite.id}") + @description.html @suite.description + + attach: -> + (@parentSuiteView() or $('.results')).append this + + parentSuiteView: -> + return unless @suite.parentSuite + + if not suiteView = $(".suite-view-#{@suite.parentSuite.id}").view() + suiteView = new SuiteResultView(@suite.parentSuite) + suiteView.attach() + + suiteView + +class SpecResultView extends View + @content: -> + @div class: 'spec', => + @div "\uf03d", class: 'spec-toggle' + @div outlet: 'description', class: 'description' + @div outlet: 'specFailures', class: 'spec-failures' + spec: null + + initialize: (@spec) -> + @addClass("spec-view-#{@spec.id}") + @description.html @spec.description + + for result in @spec.results().getItems() when not result.passed() + @specFailures.append $$ -> + @div result.message, class: 'resultMessage fail' + @div result.trace.stack, class: 'stackTrace' if result.trace.stack + + attach: -> + @parentSuiteView().append this + + parentSuiteView: -> + if not suiteView = $(".suite-view-#{@spec.suite.id}").view() + suiteView = new SuiteResultView(@spec.suite) + suiteView.attach() + + suiteView diff --git a/spec/fixtures/packages/package-that-throws-an-exception/index.coffee b/spec/fixtures/packages/package-that-throws-an-exception/index.coffee index 9e2c06779..a559d75dc 100644 --- a/spec/fixtures/packages/package-that-throws-an-exception/index.coffee +++ b/spec/fixtures/packages/package-that-throws-an-exception/index.coffee @@ -1 +1 @@ -throw new Error("This package throws an exception") \ No newline at end of file +throw new Error("This package throws an exception") diff --git a/spec/fixtures/packages/package-with-activation-events/main.coffee b/spec/fixtures/packages/package-with-activation-events/main.coffee index fc2588ef9..a591812bd 100644 --- a/spec/fixtures/packages/package-with-activation-events/main.coffee +++ b/spec/fixtures/packages/package-with-activation-events/main.coffee @@ -4,3 +4,6 @@ module.exports = activate: -> rootView.getActiveEditor()?.command 'activation-event', => @activationEventCallCount++ + + serialize: -> + previousData: 'overwritten' diff --git a/spec/fixtures/packages/package-with-module/index.coffee b/spec/fixtures/packages/package-with-module/index.coffee index 49287b94d..84d5c12a1 100644 --- a/spec/fixtures/packages/package-with-module/index.coffee +++ b/spec/fixtures/packages/package-with-module/index.coffee @@ -2,7 +2,12 @@ module.exports = configDefaults: numbers: { one: 1, two: 2 } - activate: -> - @activateCalled = true + someNumber: 0 - deactivate: -> \ No newline at end of file + activate: -> + @someNumber = 1 + + deactivate: -> + + serialize: -> + {@someNumber} diff --git a/spec/fixtures/packages/package-with-serialize-error/index.coffee b/spec/fixtures/packages/package-with-serialize-error/index.coffee new file mode 100644 index 000000000..6e6c455ea --- /dev/null +++ b/spec/fixtures/packages/package-with-serialize-error/index.coffee @@ -0,0 +1,7 @@ +module.exports = + activate: -> + + deactivate: -> + + serialize: -> + throw new Error("I'm no good at this.") diff --git a/spec/fixtures/packages/package-with-serialize-error/package.cson b/spec/fixtures/packages/package-with-serialize-error/package.cson new file mode 100644 index 000000000..a44445394 --- /dev/null +++ b/spec/fixtures/packages/package-with-serialize-error/package.cson @@ -0,0 +1,5 @@ +# This package loads async, otherwise it would log errors when it +# is automatically serialized when rootView is deactivatated + +'main': 'index.coffee' +'activationEvents': ['activation-event'] diff --git a/spec/fixtures/themes/theme-stylesheet.css b/spec/fixtures/themes/theme-stylesheet.css new file mode 100644 index 000000000..f69c961a4 --- /dev/null +++ b/spec/fixtures/themes/theme-stylesheet.css @@ -0,0 +1,3 @@ +.editor { + padding-top: 1234px; +} diff --git a/spec/fixtures/test-atom-theme/first.css b/spec/fixtures/themes/theme-with-package-file/first.css similarity index 100% rename from spec/fixtures/test-atom-theme/first.css rename to spec/fixtures/themes/theme-with-package-file/first.css diff --git a/spec/fixtures/test-atom-theme/last.css b/spec/fixtures/themes/theme-with-package-file/last.css similarity index 100% rename from spec/fixtures/test-atom-theme/last.css rename to spec/fixtures/themes/theme-with-package-file/last.css diff --git a/spec/fixtures/test-atom-theme/package.json b/spec/fixtures/themes/theme-with-package-file/package.json similarity index 100% rename from spec/fixtures/test-atom-theme/package.json rename to spec/fixtures/themes/theme-with-package-file/package.json diff --git a/spec/fixtures/test-atom-theme/second.css b/spec/fixtures/themes/theme-with-package-file/second.css similarity index 100% rename from spec/fixtures/test-atom-theme/second.css rename to spec/fixtures/themes/theme-with-package-file/second.css diff --git a/spec/fixtures/themes/theme-without-package-file/a.css b/spec/fixtures/themes/theme-without-package-file/a.css new file mode 100644 index 000000000..aeb9ea203 --- /dev/null +++ b/spec/fixtures/themes/theme-without-package-file/a.css @@ -0,0 +1,5 @@ +.editor { + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; +} diff --git a/spec/fixtures/themes/theme-without-package-file/b.css b/spec/fixtures/themes/theme-without-package-file/b.css new file mode 100644 index 000000000..111a7c262 --- /dev/null +++ b/spec/fixtures/themes/theme-without-package-file/b.css @@ -0,0 +1,4 @@ +.editor { + padding-right: 20px; + padding-bottom: 20px; +} diff --git a/spec/fixtures/themes/theme-without-package-file/c.css b/spec/fixtures/themes/theme-without-package-file/c.css new file mode 100644 index 000000000..017dea2af --- /dev/null +++ b/spec/fixtures/themes/theme-without-package-file/c.css @@ -0,0 +1,3 @@ +.editor { + padding-bottom: 30px; +} diff --git a/spec/fixtures/themes/theme-without-package-file/d.csv b/spec/fixtures/themes/theme-without-package-file/d.csv new file mode 100644 index 000000000..91e4e7887 --- /dev/null +++ b/spec/fixtures/themes/theme-without-package-file/d.csv @@ -0,0 +1,5 @@ +.editor { + padding-top: 100px; + padding-right: 100px; + padding-bottom: 100px; +} diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index fb7c36cc2..c750bf498 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -1,3 +1,6 @@ +require 'window' +window.setUpEnvironment() + nakedLoad 'jasmine-jquery' $ = require 'jquery' _ = require 'underscore' @@ -7,30 +10,30 @@ Point = require 'point' Project = require 'project' Directory = require 'directory' File = require 'file' -RootView = require 'root-view' Editor = require 'editor' TokenizedBuffer = require 'tokenized-buffer' fs = require 'fs' -require 'window' +RootView = require 'root-view' requireStylesheet "jasmine.css" fixturePackagesPath = require.resolve('fixtures/packages') require.paths.unshift(fixturePackagesPath) +keymap.loadBundledKeymaps() [bindingSetsToRestore, bindingSetsByFirstKeystrokeToRestore] = [] -# Specs rely on TextMate bundles (but not atom packages) -window.loadTextMatePackages = -> - TextMatePackage = require 'text-mate-package' - config.packageDirPaths.unshift(fixturePackagesPath) - window.textMatePackages = [] - for path in atom.getPackagePaths() when TextMatePackage.testName(path) - window.textMatePackages.push atom.loadPackage(fs.base(path)) +$(window).on 'core:close', -> window.close() +$(window).on 'toggle-dev-tools', (e) -> atom.toggleDevTools() +$('html,body').css('overflow', 'auto') -window.loadTextMatePackages() +jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions +jasmine.getEnv().defaultTimeoutInterval = 5000 beforeEach -> + jQuery.fx.off = true window.fixturesProject = new Project(require.resolve('fixtures')) + window.project = fixturesProject window.resetTimeouts() atom.atomPackageStates = {} + atom.loadedPackages = [] # used to reset keymap after each spec bindingSetsToRestore = _.clone(keymap.bindingSets) @@ -62,20 +65,33 @@ beforeEach -> afterEach -> keymap.bindingSets = bindingSetsToRestore keymap.bindingSetsByFirstKeystrokeToRestore = bindingSetsByFirstKeystrokeToRestore - delete window.rootView if window.rootView + if rootView? + rootView.deactivate() + window.rootView = null + if project? + project.destroy() + window.project = null $('#jasmine-content').empty() - window.fixturesProject.destroy() ensureNoPathSubscriptions() waits(0) # yield to ui thread to make screen update more frequently -window.keymap.bindKeys '*', 'meta-w': 'close' -$(document).on 'close', -> window.close() -$(document).on 'toggle-dev-tools', (e) -> - atom.toggleDevTools() if $('#root-view').length is 0 -$('html,body').css('overflow', 'auto') +window.loadPackage = (name, options) -> + Package = require 'package' + packagePath = _.find atom.getPackagePaths(), (packagePath) -> fs.base(packagePath) == name + if pack = Package.build(packagePath) + pack.load(options) + atom.loadedPackages.push(pack) + pack -jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions -jasmine.getEnv().defaultTimeoutInterval = 1000 +# Specs rely on TextMate bundles (but not atom packages) +window.loadTextMatePackages = -> + TextMatePackage = require 'text-mate-package' + config.packageDirPaths.unshift(fixturePackagesPath) + window.textMatePackages = [] + for path in atom.getPackagePaths() when TextMatePackage.testName(path) + window.textMatePackages.push window.loadPackage(fs.base(path)) + +window.loadTextMatePackages() ensureNoPathSubscriptions = -> watchedPaths = $native.getWatchedPaths() @@ -102,9 +118,8 @@ window.keyIdentifierForKey = (key) -> "U+00" + charCode.toString(16) window.keydownEvent = (key, properties={}) -> - event = $.Event "keydown", _.extend({originalEvent: { keyIdentifier: keyIdentifierForKey(key) }}, properties) - # event.keystroke = (new Keymap).keystrokeStringForEvent(event) - event + properties = $.extend({originalEvent: { keyIdentifier: keyIdentifierForKey(key) }}, properties) + $.Event("keydown", properties) window.mouseEvent = (type, properties) -> if properties.point diff --git a/spec/spec-suite.coffee b/spec/spec-suite.coffee index f888d8a0d..67da12ee2 100644 --- a/spec/spec-suite.coffee +++ b/spec/spec-suite.coffee @@ -8,6 +8,6 @@ for path in fs.listTree(require.resolve("spec")) when /-spec\.coffee$/.test path # Run extension specs for packageDirPath in config.packageDirPaths - for packagePath in fs.listTree(packageDirPath) + for packagePath in fs.list(packageDirPath) for path in fs.listTree(fs.join(packagePath, "spec")) when /-spec\.coffee$/.test path require path diff --git a/spec/stdlib/underscore-extensions-spec.coffee b/spec/stdlib/underscore-extensions-spec.coffee index 1ad7130a8..5ae310cde 100644 --- a/spec/stdlib/underscore-extensions-spec.coffee +++ b/spec/stdlib/underscore-extensions-spec.coffee @@ -30,3 +30,27 @@ describe "underscore extensions", -> expect(_.endsWith("test.txt", ".txt2")).toBeFalsy() expect(_.endsWith("test.txt", ".tx")).toBeFalsy() expect(_.endsWith("test.txt", "test")).toBeFalsy() + + describe "camelize(string)", -> + it "converts `string` to camel case", -> + expect(_.camelize("corey_dale_johnson")).toBe "coreyDaleJohnson" + expect(_.camelize("corey-dale-johnson")).toBe "coreyDaleJohnson" + expect(_.camelize("corey_dale-johnson")).toBe "coreyDaleJohnson" + expect(_.camelize("coreyDaleJohnson")).toBe "coreyDaleJohnson" + expect(_.camelize("CoreyDaleJohnson")).toBe "CoreyDaleJohnson" + + describe "dasherize(string)", -> + it "converts `string` to use dashes", -> + expect(_.dasherize("corey_dale_johnson")).toBe "corey-dale-johnson" + expect(_.dasherize("coreyDaleJohnson")).toBe "corey-dale-johnson" + expect(_.dasherize("CoreyDaleJohnson")).toBe "corey-dale-johnson" + expect(_.dasherize("corey-dale-johnson")).toBe "corey-dale-johnson" + + describe "underscore(string)", -> + it "converts `string` to use underscores", -> + expect(_.underscore("corey-dale-johnson")).toBe "corey_dale_johnson" + expect(_.underscore("coreyDaleJohnson")).toBe "corey_dale_johnson" + expect(_.underscore("CoreyDaleJohnson")).toBe "corey_dale_johnson" + expect(_.underscore("corey_dale_johnson")).toBe "corey_dale_johnson" + + diff --git a/spec/time-reporter.coffee b/spec/time-reporter.coffee index 6546a68bd..7004072ef 100644 --- a/spec/time-reporter.coffee +++ b/spec/time-reporter.coffee @@ -3,21 +3,23 @@ _ = require 'underscore' module.exports = class TimeReporter extends jasmine.Reporter - timedSpecs: [] - timedSuites: {} - constructor: -> + window.timedSpecs = [] + window.timedSuites = {} + window.logLongestSpec = -> window.logLongestSpecs(1) + window.logLongestSpecs = (number=10) => console.log "#{number} longest running specs:" - for spec in _.sortBy(@timedSpecs, (spec) -> -spec.time)[0...number] + for spec in _.sortBy(window.timedSpecs, (spec) -> -spec.time)[0...number] console.log "#{spec.time}ms" console.log spec.description window.logLongestSuite = -> window.logLongestSuites(1) + window.logLongestSuites = (number=10) => console.log "#{number} longest running suites:" - suites = _.map(@timedSuites, (key, value) -> [value, key]) + suites = _.map(window.timedSuites, (key, value) -> [value, key]) for suite in _.sortBy(suites, (suite) => -suite[1])[0...number] console.log suite[0], suite[1] @@ -34,16 +36,17 @@ class TimeReporter extends jasmine.Reporter "#{memo}#{_.multiplyString(' ', index)}#{description}\n" @description = _.reduce(stack, reducer, "") - reportSpecResults: -> + reportSpecResults: (spec) -> return unless @time? and @description? duration = new Date().getTime() - @time - @timedSpecs.push + window.timedSpecs.push description: @description time: duration - if @timedSuites[@suite] - @timedSuites[@suite] += duration + name: spec.getFullName() + if timedSuites[@suite] + window.timedSuites[@suite] += duration else - @timedSuites[@suite] = duration + window.timedSuites[@suite] = duration @time = null @description = null diff --git a/src/app/atom-package.coffee b/src/app/atom-package.coffee index d9971e9c5..4c3195b0e 100644 --- a/src/app/atom-package.coffee +++ b/src/app/atom-package.coffee @@ -85,4 +85,4 @@ class AtomPackage extends Package loadStylesheets: -> stylesheetDirPath = fs.join(@path, 'stylesheets') for stylesheetPath in fs.list(stylesheetDirPath) - requireStylesheet(stylesheetPath) \ No newline at end of file + requireStylesheet(stylesheetPath) diff --git a/src/app/atom-theme.coffee b/src/app/atom-theme.coffee index 1d0224acf..6a3e1e379 100644 --- a/src/app/atom-theme.coffee +++ b/src/app/atom-theme.coffee @@ -12,6 +12,11 @@ class AtomTheme extends Theme @loadStylesheet(@path) else metadataPath = fs.resolveExtension(fs.join(@path, 'package'), ['cson', 'json']) - stylesheetNames = fs.readObject(metadataPath).stylesheets - @loadStylesheet(fs.join(@path, name)) for name in stylesheetNames + if fs.isFile(metadataPath) + stylesheetNames = fs.readObject(metadataPath)?.stylesheets + if stylesheetNames + @loadStylesheet(fs.join(@path, name)) for name in stylesheetNames + else + @loadStylesheet(stylesheetPath) for stylesheetPath in fs.list(@path, ['.css']) + super diff --git a/src/app/atom.coffee b/src/app/atom.coffee index ec9246539..532dd558c 100644 --- a/src/app/atom.coffee +++ b/src/app/atom.coffee @@ -16,9 +16,12 @@ _.extend atom, activatedAtomPackages: [] atomPackageStates: {} + getPathToOpen: -> + @getWindowState('pathToOpen') ? window.location.params.pathToOpen + activateAtomPackage: (pack) -> @activatedAtomPackages.push(pack) - pack.packageMain.activate(@atomPackageStates[pack.name]) + pack.packageMain.activate(@atomPackageStates[pack.name] ? {}) deactivateAtomPackages: -> pack.packageMain.deactivate?() for pack in @activatedAtomPackages @@ -26,24 +29,29 @@ _.extend atom, serializeAtomPackages: -> packageStates = {} - for pack in @activatedAtomPackages - try - packageStates[pack.name] = pack.packageMain.serialize?() - catch e - console?.error("Exception serializing '#{pack.name}' package's module\n", e.stack) + for pack in @loadedPackages + if pack in @activatedAtomPackages + try + packageStates[pack.name] = pack.packageMain.serialize?() + catch e + console?.error("Exception serializing '#{pack.name}' package's module\n", e.stack) + else + packageStates[pack.name] = @atomPackageStates[pack.name] packageStates - loadPackage: (name, options) -> - packagePath = _.find @getPackagePaths(), (packagePath) -> fs.base(packagePath) == name - pack = Package.build(packagePath) - pack?.load(options) + loadTextPackage: -> + textPackagePath = _.find @getPackagePaths(), (path) -> fs.base(path) is 'text.tmbundle' + pack = Package.build(textPackagePath) + @loadedPackages.push(pack) + pack.load() loadPackages: -> textMatePackages = [] - for path in @getPackagePaths() + paths = @getPackagePaths().filter (path) -> fs.base(path) isnt 'text.tmbundle' + for path in paths pack = Package.build(path) @loadedPackages.push(pack) - if pack instanceof TextMatePackage and fs.base(pack.path) isnt 'text.tmbundle' + if pack instanceof TextMatePackage textMatePackages.push(pack) else pack.load() @@ -165,3 +173,9 @@ _.extend atom, _.valueForKeyPath(windowState, keyPath) else windowState + + update: -> + @sendMessageToBrowserProcess('update') + + getUpdateStatus: (callback) -> + @sendMessageToBrowserProcess('getUpdateStatus', [], callback) diff --git a/src/app/buffer-change-operation.coffee b/src/app/buffer-change-operation.coffee index 06a5dc7c1..928b4a07b 100644 --- a/src/app/buffer-change-operation.coffee +++ b/src/app/buffer-change-operation.coffee @@ -69,10 +69,14 @@ class BufferChangeOperation @buffer.cachedMemoryContents = null @buffer.conflict = false if @buffer.conflict and !@buffer.isModified() + @pauseMarkerObservation() event = { oldRange, newRange, oldText, newText } + @updateMarkers(event) @buffer.trigger 'changed', event @buffer.scheduleStoppedChangingEvent() - @updateMarkers(event) + @resumeMarkerObservation() + @buffer.trigger 'markers-updated' + newRange calculateNewRange: (oldRange, newText) -> @@ -89,9 +93,14 @@ class BufferChangeOperation invalidateMarkers: (oldRange) -> _.compact(@buffer.getMarkers().map (marker) -> marker.tryToInvalidate(oldRange)) + pauseMarkerObservation: -> + marker.pauseEvents() for marker in @buffer.getMarkers() + + resumeMarkerObservation: -> + marker.resumeEvents() for marker in @buffer.getMarkers() + updateMarkers: (bufferChange) -> marker.handleBufferChange(bufferChange) for marker in @buffer.getMarkers() - @buffer.trigger 'markers-updated' restoreMarkers: (markersToRestore) -> for [id, previousRange] in markersToRestore diff --git a/src/app/buffer-marker.coffee b/src/app/buffer-marker.coffee index 13957a949..245e0142c 100644 --- a/src/app/buffer-marker.coffee +++ b/src/app/buffer-marker.coffee @@ -1,18 +1,16 @@ _ = require 'underscore' Point = require 'point' Range = require 'range' +EventEmitter = require 'event-emitter' module.exports = class BufferMarker headPosition: null tailPosition: null - observers: null suppressObserverNotification: false stayValid: false constructor: ({@id, @buffer, range, @stayValid, noTail, reverse}) -> - @headPositionObservers = [] - @observers = [] @setRange(range, {noTail, reverse}) setRange: (range, options={}) -> @@ -115,11 +113,11 @@ class BufferMarker [newRow, newColumn] observe: (callback) -> - @observers.push(callback) + @on 'position-changed', callback cancel: => @unobserve(callback) unobserve: (callback) -> - _.remove(@observers, callback) + @off 'position-changed', callback containsPoint: (point) -> @getRange().containsPoint(point) @@ -131,11 +129,7 @@ class BufferMarker newHeadPosition ?= @getHeadPosition() oldTailPosition ?= @getTailPosition() newTailPosition ?= @getTailPosition() - for observer in @getObservers() - observer({oldHeadPosition, newHeadPosition, oldTailPosition, newTailPosition, bufferChanged}) - - getObservers: -> - new Array(@observers...) + @trigger 'position-changed', {oldHeadPosition, newHeadPosition, oldTailPosition, newTailPosition, bufferChanged} consolidateObserverNotifications: (bufferChanged, fn) -> @suppressObserverNotification = true @@ -150,3 +144,5 @@ class BufferMarker invalidate: (preserve) -> delete @buffer.validMarkers[@id] @buffer.invalidMarkers[@id] = this + +_.extend BufferMarker.prototype, EventEmitter diff --git a/src/app/config.coffee b/src/app/config.coffee index 604853326..cf6f97b27 100644 --- a/src/app/config.coffee +++ b/src/app/config.coffee @@ -18,6 +18,7 @@ class Config configDirPath: configDirPath themeDirPaths: [userThemesDirPath, bundledThemesDirPath, vendoredThemesDirPath] packageDirPaths: [userPackagesDirPath, vendoredPackagesDirPath, bundledPackagesDirPath] + userPackagesDirPath: userPackagesDirPath defaultSettings: null settings: null @@ -32,8 +33,8 @@ class Config load: -> @loadUserConfig() @requireUserInitScript() - atom.loadThemes() - atom.loadPackages() + + loadUserConfig: -> if fs.exists(@configFilePath) diff --git a/src/app/display-buffer-marker.coffee b/src/app/display-buffer-marker.coffee index 78c9e8d2e..d4ce6936f 100644 --- a/src/app/display-buffer-marker.coffee +++ b/src/app/display-buffer-marker.coffee @@ -1,9 +1,9 @@ Range = require 'range' _ = require 'underscore' +EventEmitter = require 'event-emitter' module.exports = class DisplayBufferMarker - observers: null bufferMarkerSubscription: null headScreenPosition: null tailScreenPosition: null @@ -57,16 +57,15 @@ class DisplayBufferMarker observe: (callback) -> @observeBufferMarkerIfNeeded() - @observers.push(callback) + @on 'position-changed', callback cancel: => @unobserve(callback) unobserve: (callback) -> - _.remove(@observers, callback) + @off 'position-changed', callback @unobserveBufferMarkerIfNeeded() observeBufferMarkerIfNeeded: -> - return if @observers - @observers = [] + return if @subscriptionCount() @getHeadScreenPosition() # memoize current value @getTailScreenPosition() # memoize current value @bufferMarkerSubscription = @@ -80,8 +79,7 @@ class DisplayBufferMarker @displayBuffer.markers[@id] = this unobserveBufferMarkerIfNeeded: -> - return if @observers.length - @observers = null + return if @subscriptionCount() @bufferMarkerSubscription.cancel() delete @displayBuffer.markers[@id] @@ -101,14 +99,12 @@ class DisplayBufferMarker oldTailBufferPosition ?= @getTailBufferPosition() newTailBufferPosition = @getTailBufferPosition() - for observer in @getObservers() - observer({ - oldHeadScreenPosition, newHeadScreenPosition, - oldTailScreenPosition, newTailScreenPosition, - oldHeadBufferPosition, newHeadBufferPosition, - oldTailBufferPosition, newTailBufferPosition, - bufferChanged - }) + @trigger 'position-changed', { + oldHeadScreenPosition, newHeadScreenPosition, + oldTailScreenPosition, newTailScreenPosition, + oldHeadBufferPosition, newHeadBufferPosition, + oldTailBufferPosition, newTailBufferPosition, + bufferChanged + } - getObservers: -> - new Array(@observers...) +_.extend DisplayBufferMarker.prototype, EventEmitter diff --git a/src/app/display-buffer.coffee b/src/app/display-buffer.coffee index 84090f052..4abe7adcc 100644 --- a/src/app/display-buffer.coffee +++ b/src/app/display-buffer.coffee @@ -28,7 +28,8 @@ class DisplayBuffer @foldsById = {} @markers = {} @buildLineMap() - @tokenizedBuffer.on 'changed', (e) => @handleTokenizedBufferChange(e) + @tokenizedBuffer.on 'changed', @handleTokenizedBufferChange + @buffer.on 'markers-updated', @handleMarkersUpdated setVisible: (visible) -> @tokenizedBuffer.setVisible(visible) @@ -37,8 +38,11 @@ class DisplayBuffer @lineMap.insertAtScreenRow 0, @buildLinesForBufferRows(0, @buffer.getLastRow()) triggerChanged: (eventProperties, refreshMarkers=true) -> - @refreshMarkerScreenPositions() if refreshMarkers + if refreshMarkers + @pauseMarkerObservers() + @refreshMarkerScreenPositions() @trigger 'changed', eventProperties + @resumeMarkerObservers() setSoftWrapColumn: (@softWrapColumn) -> start = 0 @@ -71,9 +75,26 @@ class DisplayBuffer for row in [@buffer.getLastRow()..0] @activeFolds[row]?.forEach (fold) => @destroyFold(fold) + rowRangeForCommentAtBufferRow: (row) -> + return unless @tokenizedBuffer.lineForScreenRow(row).isComment() + + startRow = row + for currentRow in [row-1..0] + break if @buffer.isRowBlank(currentRow) + break unless @tokenizedBuffer.lineForScreenRow(currentRow).isComment() + startRow = currentRow + endRow = row + for currentRow in [row+1..@buffer.getLastRow()] + break if @buffer.isRowBlank(currentRow) + break unless @tokenizedBuffer.lineForScreenRow(currentRow).isComment() + endRow = currentRow + return [startRow, endRow] if startRow isnt endRow + foldBufferRow: (bufferRow) -> for currentRow in [bufferRow..0] - [startRow, endRow] = @languageMode.rowRangeForFoldAtBufferRow(currentRow) ? [] + rowRange = @rowRangeForCommentAtBufferRow(currentRow) + rowRange ?= @languageMode.rowRangeForFoldAtBufferRow(currentRow) + [startRow, endRow] = rowRange ? [] continue unless startRow? and startRow <= bufferRow <= endRow fold = @largestFoldStartingAtBufferRow(startRow) continue if fold @@ -131,7 +152,6 @@ class DisplayBuffer screenDelta = newScreenRange.end.row - oldScreenRange.end.row bufferDelta = 0 - @refreshMarkerScreenPositions() @triggerChanged({ start, end, screenDelta, bufferDelta }) destroyFoldsContainingBufferRow: (bufferRow) -> @@ -216,7 +236,7 @@ class DisplayBuffer allFolds.push(folds...) for row, folds of @activeFolds fold.handleBufferChange(e) for fold in allFolds - handleTokenizedBufferChange: (tokenizedBufferChange) -> + handleTokenizedBufferChange: (tokenizedBufferChange) => if bufferChange = tokenizedBufferChange.bufferChange @handleBufferChange(bufferChange) bufferDelta = bufferChange.newRange.end.row - bufferChange.oldRange.end.row @@ -231,7 +251,17 @@ class DisplayBuffer @lineMap.replaceScreenRows(start, end, newScreenLines) screenDelta = @lastScreenRowForBufferRow(tokenizedBufferEnd + tokenizedBufferDelta) - end - @triggerChanged({ start, end, screenDelta, bufferDelta }, false) + changeEvent = { start, end, screenDelta, bufferDelta } + if bufferChange + @pauseMarkerObservers() + @pendingChangeEvent = changeEvent + else + @triggerChanged(changeEvent, false) + + handleMarkersUpdated: => + event = @pendingChangeEvent + @pendingChangeEvent = null + @triggerChanged(event, false) buildLineForBufferRow: (bufferRow) -> @buildLinesForBufferRows(bufferRow, bufferRow) @@ -372,12 +402,19 @@ class DisplayBuffer observeMarker: (id, callback) -> @getMarker(id).observe(callback) + pauseMarkerObservers: -> + marker.pauseEvents() for marker in @getMarkers() + + resumeMarkerObservers: -> + marker.resumeEvents() for marker in @getMarkers() + refreshMarkerScreenPositions: -> for marker in @getMarkers() marker.notifyObservers(bufferChanged: false) destroy: -> @tokenizedBuffer.destroy() + @buffer.off 'markers-updated', @handleMarkersUpdated logLines: (start, end) -> @lineMap.logLines(start, end) diff --git a/src/app/edit-session.coffee b/src/app/edit-session.coffee index d0a87ff26..77e8360f2 100644 --- a/src/app/edit-session.coffee +++ b/src/app/edit-session.coffee @@ -12,6 +12,8 @@ fs = require 'fs' module.exports = class EditSession + registerDeserializer(this) + @deserialize: (state, project) -> if fs.exists(state.buffer) session = project.buildEditSessionForPath(state.buffer) @@ -62,6 +64,7 @@ class EditSession @off() serialize: -> + deserializer: 'EditSession' buffer: @buffer.getPath() scrollTop: @getScrollTop() scrollLeft: @getScrollLeft() @@ -168,8 +171,17 @@ class EditSession @insertText('\n') insertNewlineBelow: -> - @moveCursorToEndOfLine() - @insertNewline() + @transact => + @moveCursorToEndOfLine() + @insertNewline() + + insertNewlineAbove: -> + @transact => + onFirstLine = @getCursorBufferPosition().row is 0 + @moveCursorToBeginningOfLine() + @moveCursorLeft() + @insertNewline() + @moveCursorUp() if onFirstLine indent: (options={})-> options.autoIndent ?= @shouldAutoIndent() @@ -418,7 +430,7 @@ class EditSession bufferRange = new Range([cursorPosition.row], [cursorPosition.row + 1]) insertPosition = new Point(bufferRange.end.row) - if insertPosition.row >= @buffer.getLastRow() + if insertPosition.row > @buffer.getLastRow() @unfoldCurrentRow() if cursorRowFolded @buffer.append("\n#{@getTextInBufferRange(bufferRange)}") @foldCurrentRow() if cursorRowFolded diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 36634b647..5f6772537 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -15,6 +15,7 @@ class Editor extends View @configDefaults: fontSize: 20 showInvisibles: false + showIndentGuide: false autosave: false autoIndent: true autoIndentOnPaste: false @@ -48,16 +49,18 @@ class Editor extends View lineCache: null isFocused: false activeEditSession: null + closedEditSessions: null editSessions: null attached: false lineOverdraw: 10 pendingChanges: null newCursors: null newSelections: null + redrawOnReattach: false - @deserialize: (state, rootView) -> + @deserialize: (state) -> editor = new Editor(mini: state.mini, deserializing: true) - editSessions = state.editSessions.map (state) -> EditSession.deserialize(state, rootView.project) + editSessions = state.editSessions.map (state) -> EditSession.deserialize(state, project) editor.pushEditSession(editSession) for editSession in editSessions editor.setActiveEditSessionIndex(state.activeEditSessionIndex) editor.isFocused = state.isFocused @@ -74,6 +77,7 @@ class Editor extends View @cursorViews = [] @selectionViews = [] @editSessions = [] + @closedEditSessions = [] @pendingChanges = [] @newCursors = [] @newSelections = [] @@ -92,13 +96,13 @@ class Editor extends View serialize: -> @saveScrollPositionForActiveEditSession() - viewClass: "Editor" + deserializer: "Editor" editSessions: @editSessions.map (session) -> session.serialize() activeEditSessionIndex: @getActiveEditSessionIndex() isFocused: @isFocused copy: -> - Editor.deserialize(@serialize(), @rootView()) + Editor.deserialize(@serialize(), rootView) bindKeys: -> editorBindings = @@ -155,6 +159,7 @@ class Editor extends View 'editor:save': @save 'editor:save-as': @saveAs 'editor:newline-below': @insertNewlineBelow + 'editor:newline-above': @insertNewlineAbove 'editor:toggle-soft-tabs': @toggleSoftTabs 'editor:toggle-soft-wrap': @toggleSoftWrap 'editor:fold-all': @foldAll @@ -187,6 +192,8 @@ class Editor extends View 'editor:move-line-up': @moveLineUp 'editor:move-line-down': @moveLineDown 'editor:duplicate-line': @duplicateLine + 'editor:undo-close-session': @undoDestroySession + 'editor:toggle-indent-guide': => config.set('editor.showIndentGuide', !config.get('editor.showIndentGuide')) documentation = {} for name, method of editorBindings @@ -257,6 +264,7 @@ class Editor extends View insertText: (text, options) -> @activeEditSession.insertText(text, options) insertNewline: -> @activeEditSession.insertNewline() insertNewlineBelow: -> @activeEditSession.insertNewlineBelow() + insertNewlineAbove: -> @activeEditSession.insertNewlineAbove() indent: (options) -> @activeEditSession.indent(options) autoIndent: (options) -> @activeEditSession.autoIndentSelectedRows(options) indentSelectedRows: -> @activeEditSession.indentSelectedRows() @@ -326,6 +334,11 @@ class Editor extends View cr: '\u00a4' @resetDisplay() + setShowIndentGuide: (showIndentGuide) -> + return if showIndentGuide == @showIndentGuide + @showIndentGuide = showIndentGuide + @resetDisplay() + checkoutHead: -> @getBuffer().checkoutHead() setText: (text) -> @getBuffer().setText(text) getText: -> @getBuffer().getText() @@ -342,6 +355,7 @@ class Editor extends View configure: -> @observeConfig 'editor.showInvisibles', (showInvisibles) => @setShowInvisibles(showInvisibles) + @observeConfig 'editor.showIndentGuide', (showIndentGuide) => @setShowIndentGuide(showIndentGuide) @observeConfig 'editor.invisibles', (invisibles) => @setInvisibles(invisibles) @observeConfig 'editor.fontSize', (fontSize) => @setFontSize(fontSize) @observeConfig 'editor.fontFamily', (fontFamily) => @setFontFamily(fontFamily) @@ -352,7 +366,7 @@ class Editor extends View false @hiddenInput.on 'focus', => - @rootView()?.editorFocused(this) + rootView?.editorFocused(this) @isFocused = true @addClass 'is-focused' @@ -375,12 +389,13 @@ class Editor extends View @overlayer.show() e.target = clickedElement $(clickedElement).trigger(e) + false if @isFocused @renderedLines.on 'mousedown', '.fold.line', (e) => @destroyFold($(e.currentTarget).attr('fold-id')) false - @renderedLines.on 'mousedown', (e) => + onMouseDown = (e) => clickCount = e.originalEvent.detail screenPosition = @screenPositionFromMouseEvent(e) @@ -398,6 +413,8 @@ class Editor extends View @selectOnMousemoveUntilMouseup() + @renderedLines.on 'mousedown', onMouseDown + @on "textInput", (e) => @insertText(e.originalEvent.data) false @@ -414,7 +431,11 @@ class Editor extends View @gutter.widthChanged = (newWidth) => @scrollView.css('left', newWidth + 'px') - syntax.on 'grammars-loaded', => + @gutter.on 'mousedown', (e) => + e.pageX = @renderedLines.offset().left + onMouseDown(e) + + @subscribe syntax, 'grammars-loaded', => @reloadGrammar() for session in @editSessions session.reloadGrammar() unless session is @activeEditSession @@ -444,7 +465,9 @@ class Editor extends View @syncCursorAnimations() afterAttach: (onDom) -> - return if @attached or not onDom + return unless onDom + @redraw() if @redrawOnReattach + return if @attached @attached = true @calculateDimensions() @hiddenInput.width(@charWidth) @@ -464,12 +487,22 @@ class Editor extends View pushEditSession: (editSession) -> index = @editSessions.length @editSessions.push(editSession) + @closedEditSessions = @closedEditSessions.filter ({path})-> + path isnt editSession.getPath() editSession.on 'destroyed', => @editSessionDestroyed(editSession) @trigger 'editor:edit-session-added', [editSession, index] index getBuffer: -> @activeEditSession.buffer + undoDestroySession: -> + return unless @closedEditSessions.length > 0 + + {path, index} = @closedEditSessions.pop() + rootView.open(path) + activeIndex = @getActiveEditSessionIndex() + @moveEditSessionToIndex(activeIndex, index) if index < activeIndex + destroyActiveEditSession: -> @destroyEditSessionIndex(@getActiveEditSessionIndex()) @@ -477,7 +510,9 @@ class Editor extends View return if @mini editSession = @editSessions[index] - destroySession = -> + destroySession = => + path = editSession.getPath() + @closedEditSessions.push({path, index}) if path editSession.destroy() callback?(index) @@ -549,6 +584,20 @@ class Editor extends View "Cancel" ) + moveEditSessionToIndex: (fromIndex, toIndex) -> + return if fromIndex is toIndex + editSession = @editSessions.splice(fromIndex, 1) + @editSessions.splice(toIndex, 0, editSession[0]) + @trigger 'editor:edit-session-order-changed', [editSession, fromIndex, toIndex] + @setActiveEditSessionIndex(toIndex) + + moveEditSessionToEditor: (fromIndex, toEditor, toIndex) -> + fromEditSession = @editSessions[fromIndex] + toEditSession = fromEditSession.copy() + @destroyEditSessionIndex(fromIndex) + toEditor.edit(toEditSession) + toEditor.moveEditSessionToIndex(toEditor.getActiveEditSessionIndex(), toIndex) + activateEditSessionForPath: (path) -> for editSession, index in @editSessions if editSession.buffer.getPath() == path @@ -697,7 +746,11 @@ class Editor extends View headTag.append styleTag styleTag.text(".editor {font-size: #{fontSize}px}") - @redraw() + + if @isOnDom() + @redraw() + else + @redrawOnReattach = @attached getFontSize: -> parseInt(@css("font-size")) @@ -705,9 +758,9 @@ class Editor extends View setFontFamily: (fontFamily) -> return if fontFamily == undefined headTag = $("head") - styleTag = headTag.find("style.font-family") + styleTag = headTag.find("style.editor-font-family") if styleTag.length == 0 - styleTag = $$ -> @style class: 'font-family' + styleTag = $$ -> @style class: 'editor-font-family' headTag.append styleTag styleTag.text(".editor {font-family: #{fontFamily}}") @@ -715,8 +768,13 @@ class Editor extends View getFontFamily: -> @css("font-family") + clearFontFamily: -> + $('head style.editor-font-family').remove() + redraw: -> + return unless @hasParent() return unless @attached + @redrawOnReattach = false @calculateDimensions() @updatePaddingOfRenderedLines() @updateLayerDimensions() @@ -740,9 +798,6 @@ class Editor extends View pane: -> @parent('.pane').view() - rootView: -> - @parents('#root-view').view() - promptToSaveDirtySession: (session, callback) -> path = session.getPath() filename = if path then fs.base(path) else "untitled buffer" @@ -813,10 +868,6 @@ class Editor extends View @overlayer.append(view) calculateDimensions: -> - if not @isOnDom() - detachedEditorParent = _.last(@parents()) ? this - $(document.body).append(detachedEditorParent) - fragment = $('