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:
Marshall Greenblatt
2012-02-16 17:11:49 +00:00
parent def9fdb540
commit 1a092a0c1a
34 changed files with 795 additions and 236 deletions

View File

@ -34,10 +34,18 @@
#include <Objbase.h> // NOLINT(build/include_order)
#endif
namespace {
static const char* kStatsFilePrefix = "libcef_";
static int kStatsFileThreads = 20;
static int kStatsFileCounters = 200;
base::StringPiece ResourceProvider(int resource_id) {
return _Context->GetDataResource(resource_id);
}
} // namespace
CefProcessUIThread::CefProcessUIThread()
: CefThread(CefThread::UI), statstable_(NULL), webkit_init_(NULL) {}
@ -88,7 +96,7 @@ void CefProcessUIThread::Init() {
// Provides path resolution required for locating locale pack files.
ui::RegisterPathProvider();
webkit_glue::InitializeResourceBundle(_Context->locale());
_Context->InitializeResourceBundle();
PlatformInit();
@ -99,7 +107,7 @@ void CefProcessUIThread::Init() {
webkit_glue::InitializeTextEncoding();
// Config the network module so it has access to a limited set of resources.
net::NetModule::SetResourceProvider(webkit_glue::GetDataResource);
net::NetModule::SetResourceProvider(ResourceProvider);
// Load and initialize the stats table. Attempt to construct a somewhat
// unique name to isolate separate instances from each other.
@ -202,7 +210,7 @@ void CefProcessUIThread::CleanUp() {
PlatformCleanUp();
webkit_glue::CleanupResourceBundle();
_Context->CleanupResourceBundle();
}
AudioManager* CefProcessUIThread::audio_manager() {