Add support for loading extensions (issue #1947)

- Add CefRequestContext::LoadExtension, CefExtension, CefExtensionHandler and
  related methods/interfaces.
- Add chrome://extensions-support that lists supported Chrome APIs.
- Add CefBrowserHost::SetAutoResizeEnabled and CefDisplayHandler::OnAutoResize
  to support browser resize based on preferred web contents size.
- views: Add support for custom CefMenuButton popups.
- cefclient: Run with `--load-extension=set_page_color` command-line flag for
  an extension loading example. Add `--use-views` on Windows and Linux for an
  even better example.
This commit is contained in:
Marshall Greenblatt
2017-08-03 18:55:19 -04:00
parent 5b12134a45
commit 9cff99dc4e
178 changed files with 10360 additions and 650 deletions

View File

@@ -7,6 +7,7 @@
#pragma once
#include <string>
#include <vector>
#include "include/cef_command_line.h"
#include "include/wrapper/cef_helpers.h"
@@ -26,6 +27,12 @@ class CefTestSuite {
void GetSettings(CefSettings& settings) const;
bool GetCachePath(std::string& path) const;
// Register a temp directory that should be deleted on shutdown.
void RegisterTempDirectory(const CefString& directory);
// Called after shutdown to delete any registered temp directories.
void DeleteTempDirectories();
CefRefPtr<CefCommandLine> command_line() const { return command_line_; }
// The return value from Run().
@@ -40,6 +47,9 @@ class CefTestSuite {
CefScopedArgArray argv_;
CefRefPtr<CefCommandLine> command_line_;
std::vector<CefString> temp_directories_;
base::Lock temp_directories_lock_;
int retval_;
};