mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add the ability to (issue #236):
1. Disable pack file loading via CefSettings.pack_loading_disabled. 2. Customize pack file load paths via CefSettings.pack_file_path and CefSettings.locales_dir_path. 3. Provide custom resource bundle handling via CefResourceBundleHandler. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@501 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -209,6 +209,14 @@ void AppGetSettings(CefSettings& settings, CefRefPtr<CefApp>& app) {
|
||||
CefString(&settings.javascript_flags) =
|
||||
g_command_line->GetSwitchValue(cefclient::kJavascriptFlags);
|
||||
|
||||
CefString(&settings.pack_file_path) =
|
||||
g_command_line->GetSwitchValue(cefclient::kPackFilePath);
|
||||
CefString(&settings.locales_dir_path) =
|
||||
g_command_line->GetSwitchValue(cefclient::kLocalesDirPath);
|
||||
|
||||
settings.pack_loading_disabled =
|
||||
g_command_line->HasSwitch(cefclient::kPackLoadingDisabled);
|
||||
|
||||
// Retrieve command-line proxy configuration, if any.
|
||||
bool has_proxy = false;
|
||||
cef_proxy_type_t proxy_type = PROXY_TYPE_DIRECT;
|
||||
|
@@ -30,6 +30,9 @@ const char kGraphicsImpl_DesktopCmdBuffer[] = "desktop-command-buffer";
|
||||
const char kLocalStorageQuota[] = "local-storage-quota";
|
||||
const char kSessionStorageQuota[] = "session-storage-quota";
|
||||
const char kJavascriptFlags[] = "javascript-flags";
|
||||
const char kPackFilePath[] = "pack-file-path";
|
||||
const char kLocalesDirPath[] = "locales-dir-path";
|
||||
const char kPackLoadingDisabled[] = "pack-loading-disabled";
|
||||
|
||||
// CefBrowserSettings attributes.
|
||||
const char kDragDropDisabled[] = "drag-drop-disabled";
|
||||
|
@@ -32,6 +32,9 @@ extern const char kGraphicsImpl_DesktopCmdBuffer[];
|
||||
extern const char kLocalStorageQuota[];
|
||||
extern const char kSessionStorageQuota[];
|
||||
extern const char kJavascriptFlags[];
|
||||
extern const char kPackFilePath[];
|
||||
extern const char kLocalesDirPath[];
|
||||
extern const char kPackLoadingDisabled[];
|
||||
|
||||
// CefBrowserSettings attributes.
|
||||
extern const char kDragDropDisabled[];
|
||||
|
@@ -116,6 +116,14 @@ void CefTestSuite::GetSettings(CefSettings& settings) {
|
||||
if (!other_javascript_flags.empty())
|
||||
javascript_flags += " " + other_javascript_flags;
|
||||
CefString(&settings.javascript_flags) = javascript_flags;
|
||||
|
||||
CefString(&settings.pack_file_path) =
|
||||
commandline_->GetSwitchValueASCII(cefclient::kPackFilePath);
|
||||
CefString(&settings.locales_dir_path) =
|
||||
commandline_->GetSwitchValueASCII(cefclient::kLocalesDirPath);
|
||||
|
||||
settings.pack_loading_disabled =
|
||||
commandline_->HasSwitch(cefclient::kPackLoadingDisabled);
|
||||
}
|
||||
|
||||
// static
|
||||
|
Reference in New Issue
Block a user