Commit Graph

70 Commits

Author SHA1 Message Date
Marshall Greenblatt bd9a2c8069 Rename unittests to ceftests (issue #1632) 2016-11-18 12:44:46 -05:00
Marshall Greenblatt 8fee8ed05d Add unittests target to the binary distribution (issue #1632)
- Move all tests from the top-level directory to tests/.
- Move files shared by cefclient and unittests to tests/shared/.
- Add a fused (single header/source file) version of gtest in
  tests/gtest/ with associated CMake configuration.
- Test-only headers are now exposed in include/test/. Unit test
  targets must define UNIT_TEST in order to access them.
- Replace usage of USING_CEF_SHARED with WRAPPING_CEF_SHARED for
  clarity (only the libcef_dll_wrapper target should define it).
- Remove the RENAME_DIRECTORY CMake macro which is no longer used.
- Remove C++11 usage from unittests sources for compatibility with
  the binary distribution configuration.
- Windows: Fix build errors due to chrome_elf.dll and imm32.lib
  missing from the CMake configuration.
2016-11-18 03:19:17 -05:00
Marshall Greenblatt 04642e0480 Add CefScopedTempDir and file utility functions for unit tests (issue #1632) 2016-11-15 13:47:44 -05:00
Marshall Greenblatt d6b17a8fb5 Standardize IME callbacks for off-screen rendering (issue #1675) 2016-11-03 21:02:36 -04:00
Marshall Greenblatt a1fc6f1ad0 Add CefRegisterWidevineCdm function and remove component updater support (issue #2009)
Mac: Check in widevinecdmadapter.plugin binary until Widevine GN build errors are resolved (https://crbug.com/626436).
2016-10-17 14:16:31 -04:00
Marshall Greenblatt 6158110063 Linux: Add ARM build support (issue #1990) 2016-09-09 18:04:39 -07:00
Marshall Greenblatt f2f76a0a20 Remove variable references from cef_path2.gypi to fix VS project generation with GN (issue #1403) 2016-07-20 17:19:44 -04:00
Marshall Greenblatt 88a8dad9c9 Generate pack header files using GN (issue #1403) 2016-07-20 16:40:23 -04:00
Marshall Greenblatt 1ff26aa02a Improve support for a host owned message pump (issue #1805)
- Add new CefSettings.external_message_pump option and
  CefBrowserProcessHandler::OnScheduleMessagePumpWork() callback.
- Improve documentation related to CefDoMessageLoopWork().
- Pass `--external-message-pump` command-line flag to cefclient or
  cef_unittests to test the new mode.
2016-05-04 18:35:49 -04:00
Marshall Greenblatt 06e73fff15 Implement Views framework on Windows and Linux (issue #1749).
- Add Views header files in a new include/views directory.
- Add initial top-level window (CefWindow), control (CefBrowserView,
  CefLabelButton, CefMenuButton, CefPanel, CefScrollView,
  CefTextfield) and layout (CefBoxLayout, CefFlowLayout) support.
  See libcef/browser/views/view_impl.h comments for implementation
  details.
- Add Views example usage in cefclient and cefsimple and Views unit
  tests in cef_unittests. Pass the `--use-views` command-line flag to
  cefclient, cefsimple and cef_unittests to run using the Views
  framework instead of platform APIs. For cefclient and cefsimple
  this will create the browser window and all related functionality
  using the Views framework. For cef_unittests this will run all
  tests (except OSR tests) in a Views-based browser window. Views-
  specific unit tests (`--gtest_filter=Views*`) will be run even if
  the the `--use-views` flag is not specified.
- Pass the `--hide-frame` command-line flag to cefclient to demo a
  frameless Views-based browser window.
- Pass the `--hide-controls` command-line flag to cefclient to demo a
  browser window without top controls. This also works in non-Views
  mode.
- Pass the `--enable-high-dpi-support` command-line flag to
  cef_unittests on Windows to test high-DPI support on a display
  that supports it.
- Add CefImage for reading/writing image file formats.
- Add CefBrowser::DownloadImage() for downloading image URLs as a
  CefImage representation. This is primarily for loading favicons.
- Add CefMenuModel::CreateMenuModel() and CefMenuModelDelegate for
  creating custom menus. This is primarily for use with
  CefMenuButton.
- Add CefBrowser::TryCloseBrowser() helper for closing a browser.
  Also improve related documentation in cef_life_span_handler.h.
- Rename cef_page_range_t to cef_range_t. It is now also used by
  CefTextfield.
- Remove CefLifeSpanHandler::RunModal() which is never called.
- Add draggable regions example to cefclient.
2016-04-26 11:58:13 -04:00
Marshall Greenblatt 243a9c26d7 Update to Chromium revision 0bfd25d4 (#381305)
- Delete include/cef_runnable.h (issue #1336).
- Build the cef_unittests target using all Chromium headers. Add a
  USING_CHROMIUM_INCLUDES define and libcef_dll_wrapper_unittests
  target to support this. This change avoids compile errors due to
  the divergence of CEF and Chromium base/ header implementations.
  The libcef_dll_wrapper sources must now compile successfully with
  both CEF and Chromium base/ headers (issue #1632).
- The onbeforeunload message specified via JavaScript is no longer
  passed to the client (see http://crbug.com/587940).
2016-03-17 13:01:21 -04:00
Marshall Greenblatt f207a555a3 Add support for response filtering (issue #515).
- Add a new CefRequestHandler::GetResourceResponseFilter method and
  CefResponseFilter class.
2015-12-08 13:47:52 -05:00
Marshall Greenblatt 5780ea8baa Support configuration of preferences during runtime (issue #1709)
- Preferences are now associated with a CefRequestContext instead of
  being stored globally.
- Add methods to CefRequestContext for getting/setting preferences.
2015-10-06 18:14:11 -04:00
Marshall Greenblatt a08686e6a6 cefclient: Support dynamic configuration of the device scale factor with off-screen rendering (issue #1674) 2015-08-11 14:19:16 -04:00
Marshall Greenblatt b7a56d9343 Add PDF extension support (issue #1565) 2015-07-23 14:02:03 -04:00
Marshall Greenblatt b6e5310bce Add CefResourceManager class for mapping requests to data providers (issue #1640). 2015-06-03 15:21:40 -04:00
Marshall Greenblatt 616fdbf3ff Improve inheritance support in the CEF API (issue #1623).
- Support single parent inheritance in CEF API classes.
- Support non-virtual inheritance in CEF API classes.
- Support translation of CEF API sub-directories.
- Add test sub-directories for testing-only functionality that will be
  available to unit tests but not exposed via the binary distribution.
- Add unit tests for the translator tool.
- Fix parsing of template parameter types that include commas.
2015-05-05 17:16:44 -04:00
Marshall Greenblatt 7a2ce64096 Fix issues related to request and context object lifespan (issue #1037, issue #1044).
- Simplify and document the relationship between the various context object types. See browser_context.h for a description of the new relationships.
- cefclient: Add `request-context-per-browser` command-line flag for testing multiple CefRequestContext instances.
- cefclient: Add a CefURLRequest example.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2032 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-02-13 23:17:08 +00:00
Marshall Greenblatt 82655ea01a cefclient: Move files containing the main() program entry point to the top-level cefclient directory (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2018 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-02-02 22:33:35 +00:00
Marshall Greenblatt 1ce99c0ed4 cefclient: Split ClientApp into process-specific types (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2015 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-31 04:41:36 +00:00
Marshall Greenblatt 5c28259c31 cefclient: Organize source files into directories by target process (browser, renderer, common) (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2014 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-31 00:55:56 +00:00
Marshall Greenblatt 52b02eb838 cefclient: Mac: Move the mac/ folder to resources/mac/ (issue #1500)
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2013 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 20:55:28 +00:00
Marshall Greenblatt 8fe95d54d9 cefclient: Windows: Move icon files to a new resources/win folder (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2012 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 20:26:16 +00:00
Marshall Greenblatt 0255e4c741 cefclient: Rename the res/ folder to resources/ (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2011 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 20:22:46 +00:00
Marshall Greenblatt 16b3817b82 cefclient: Mac: Reduce helper process file dependencies (issue #1500)
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2010 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 19:34:58 +00:00
Marshall Greenblatt c6f8c63a45 cefclient: Simplify TempWindow usage (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2009 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 19:08:53 +00:00
Marshall Greenblatt 50380c7be4 cefclient: Remove ClientHandler abstraction that is no longer necessary now that all platforms use RootWindow (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2008 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 18:55:55 +00:00
Marshall Greenblatt c44f6f7efb cefclient: Mac: Introduce RootWindow concept and associated window/client object hierarchy (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2006 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-30 18:07:13 +00:00
Marshall Greenblatt 89de4a5bb6 - cefclient: Linux: Introduce RootWindow concept and associated window/client object hierarchy (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2004 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-29 20:53:53 +00:00
Marshall Greenblatt fd5ededb27 - cefclient: Windows: Introduce RootWindow concept and associated window/client object hierarchy (issue #1500).
- cefclient: Remove locking from ClientHandlerShared that was only required for the Windows implementation (issue #1500).
- Add CefDeleteOnThread helper for deleting ref-counted types on a named CEF thread.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2001 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-27 00:03:25 +00:00
Marshall Greenblatt a66c401687 - cefclient: Split ClientHandler into an abstract base class and a concrete implementation for shared usage (issue #1500).
- cefclient: Show an alert box when selecting Tests > Popup Window while running in off-screen rendering mode.
- cefclient: Mac: Enable/disable UX buttons to match loading state.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1999 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-26 19:34:26 +00:00
Marshall Greenblatt f38c620e28 cefclient: Linux: Move GTK dialog handlers from ClientHandler into a separate class (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1991 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-23 20:03:47 +00:00
Marshall Greenblatt 87c41bf99f cefclient: Standardize osr-related file names and move to the `client` namespace (issue #1500).
cefclient: Windows: Move OSRWindow static methods to util_win (issue #1500).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1988 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-23 17:37:23 +00:00
Marshall Greenblatt b9dd027411 cefclient: Replace global App* functions with singleton MainContext instance (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1985 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-22 23:11:30 +00:00
Marshall Greenblatt 1428f022af - cefclient: Add test_runner as the single entry point for running test-related code and move test implementations to the client namespace (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1983 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-22 20:21:21 +00:00
Marshall Greenblatt 249ad7f6e4 cefclient: Use an abstraction for message loop functionality (Run/Quit/PostTask) instead of implementing the same logic multiple times in platform-specific files (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1982 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-22 17:55:55 +00:00
Marshall Greenblatt 4bf08b70d6 Rename .cpp file extensions to .cc for consistency (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1981 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-22 01:55:39 +00:00
Marshall Greenblatt 0b78461f5b Update to Chromium revision ad468e8b (#292352).
- Building Chromium using SVN is no longer supported.
- Remove CefDOMEvent and CefDOMEventListener (issue #933).
- Remove CefRenderHandler::OnScrollOffsetChanged (http://crbug.com/404656).
- Remove UR_FLAG_REPORT_LOAD_TIMING (https://codereview.chromium.org/451623002/).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-09-04 17:53:40 +00:00
Marshall Greenblatt 18f634c11f Add base::string16 support (issue #1336).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1779 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-07-15 22:07:25 +00:00
Marshall Greenblatt 122397acfc Introduce the use of Chromium types (issue #1336).
Changes to the CEF public API:
- Add base::Bind, base::Callback, base::Lock, base::WeakPtr, scoped_refptr, scoped_ptr and supporting types.
- Add include/wrapper/cef_closure_task.h helpers for converting a base::Closure to a CefTask.
- Change CefRefPtr to extend scoped_refptr.
-- Change CefBase method signatures to match RefCountedThreadSafeBase.
- Change IMPLEMENT_REFCOUNTING to use base::AtomicRefCount*.
-- Remove the CefAtomic* functions.
-- IMPLEMENT_REFCOUNTING now enforces via a compile-time error that the correct class name was passed to the macro.
- Change IMPLEMENT_LOCKING to use base::Lock.
-- Remove the CefCriticalSection class.
-- Deprecate the IMPLEMENT_LOCKING macro.
-- base::Lock will DCHECK() in Debug builds if lock usage is reentrant.
- Move include/internal/cef_tuple.h to include/base/cef_tuple.h.
- Allow an empty |callback| parameter passed to CefBeginTracing.

Changes to the CEF implementation:
- Fix incorrect names passed to the IMPLEMENT_REFCOUNTING macro.
- Fix instances of reentrant locking in the CefXmlObject and CefRequest implementations.
- Remove use of the IMPLEMENT_LOCKING macro.

Changes to cef_unittests:
- Add tests/unittests/chromium_includes.h and always include it first from unit test .cc files to avoid name conflicts with Chromium types.
- Fix wrong header include ordering.
- Remove use of the IMPLEMENT_LOCKING macro.

Changes to cefclient and cefsimple:
- Use base::Bind and cef_closure_task.h instead of NewCefRunnable*.
- Remove use of the IMPEMENT_LOCKING macro.
- Fix incorrect/unnecessary locking.
- Add additional runtime thread checks.
- Windows: Perform actions on the UI thread instead of the main thread when running in multi-threaded-message-loop mode to avoid excessive locking.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1769 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-07-14 22:18:51 +00:00
Marshall Greenblatt 6702fc573a Introduce the use of Chromium types (issue #1336).
- Move include/cef_build.h to include/base/cef_build.h.
- Move libcef_dll/cef_macros.h to include/base/cef_macros.h.
- Move include/cef_trace_event.h to include/base/cef_trace_event.h and include/internal/cef_trace_event_internal.h.
- Remove the "CEF_" prefix from TRACE macros.
- Add new include/base/cef_logging.h and include/internal/cef_logging_internal.h for logging support.
- Add new include/wrapper/cef_helpers.h for CEF_REQUIRE_*_THREAD macros and CefScopedArgArray.
- Delete the util.h headers used by tests that duplicated the above functionality.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1767 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-07-11 20:10:05 +00:00
Marshall Greenblatt 8313963a27 Linux: Add new CefPrintHandler and CefPrintSettings classes to support printing and a GTK implementation in cefclient (issue #1258).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1762 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-07-10 15:41:30 +00:00
Marshall Greenblatt dea4daffd7 Implement off-screen rendering support using delegated rendering (issue #1257).
This implementation supports both GPU compositing and software compositing (used when GPU is not supported or when passing `--disable-gpu --disable-gpu-compositing` command-line flags). GPU-accelerated features (WebGL and 3D CSS) that did not work with the previous off-screen rendering implementation do work with this implementation when GPU support is available.

Rendering now operates on a per-frame basis. The frame rate is configurable via CefBrowserSettings.windowless_frame_rate up to a maximum of 60fps (potentially limited by how fast the system can generate new frames). CEF generates a bitmap from the compositor backing and passes it to CefRenderHandler::OnPaint.

The previous CefRenderHandler/CefBrowserHost API for off-screen rendering has been restored mostly as-is with some minor changes:

- CefBrowserHost::Invalidate no longer accepts a CefRect region argument. Instead of invalidating a specific region it now triggers generation of a new frame.
- The |dirtyRects| argument to CefRenderHandler::OnPaint will now always be a single CefRect representing the whole view (frame) size. Previously, invalidated regions were listed separately.
- Linux: CefBrowserHost::SendKeyEvent now expects X11 event information instead of GTK event information. See cefclient for an example of converting GTK events to the necessary format.
- Sizes passed to the CefRenderHandler OnPaint and OnPopupSize methods are now already DPI scaled. Previously, the client had to perform DPI scaling.
- Includes drag&drop implementation from issue #1032.
- Includes unit test fixes from issue #1245.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1751 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-06-30 22:30:29 +00:00
Marshall Greenblatt 3859457eef Linux: Remove GTK+ dependency and add initial Aura/X11 implementation (issue #1258)
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1708 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-05-22 21:01:22 +00:00
Marshall Greenblatt f6bc617bc5 Remove the legacy off-screen rendering implementation. A new implementation is required (issue #1257).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1678 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-04-25 01:36:58 +00:00
Marshall Greenblatt 0df95ca529 Provide a generic JavaScript message router implementation (issue #1183).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1574 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-01-27 23:31:03 +00:00
Marshall Greenblatt 916d8d08c4 Add the cefsimple sample application which demonstrates the minimal functionality required to create a browser window.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1535 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-11-26 22:02:14 +00:00
Marshall Greenblatt f5bc72b234 Add sandbox support (issue #524).
- The sandbox is now enabled by default on all platforms. Use the CefSettings.no_sandbox option or the "no-sandbox" command-line flag to disable sandbox support.
- Windows: See cef_sandbox_win.h for requirements to enable sandbox support.
- Windows: If Visual Studio isn't installed in the standard location set the CEF_VCVARS environment variable before running make_distrib.py or automate.py (see msvs_env.bat).
- Linux: For binary distributions a new chrome-sandbox executable with SUID permissions must be placed next to the CEF executable. See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for details on setting up the development environment when building CEF from source code.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1518 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-11-15 18:47:02 +00:00
Marshall Greenblatt cdd7333b76 Update to Chromium revision 217791.
- Pass popup window attributes to CefLifeSpanHandler::OnBeforePopup (issue #520).
- Windows: Add manifest files for all binary targets and include compatibility manifest in *.exe targets.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1367 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-08-15 19:38:55 +00:00
Marshall Greenblatt 13af477401 Linux: Add off-screen rendering support (issue #518).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1294 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-06-27 17:40:04 +00:00