summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 18:21:08 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 18:21:08 +0000
commita12f7fbe12afffb4b1b31ec0d6b0988f1f9a6554 (patch)
tree09b9fafb2e1d1ce9acb0307aa5689d6cfe72a0ef /webkit/support
parentf224f15fb2d55747c3faf6e5e304c2eebcca12ab (diff)
downloadchromium_src-a12f7fbe12afffb4b1b31ec0d6b0988f1f9a6554.zip
chromium_src-a12f7fbe12afffb4b1b31ec0d6b0988f1f9a6554.tar.gz
chromium_src-a12f7fbe12afffb4b1b31ec0d6b0988f1f9a6554.tar.bz2
Move more web widgets painting from webkit to chrome.
- Move linux web widgets painting code from webkit; - Move dependent resources from webkit_resources into gfx_resources and follow the pattern in net package to add resource loading support to gfx package; - Update ChromeOS theme engine to follow mocks in chromium-os:9256. BUG=chromium-os:9256 TEST=Verify default web widgets has desired look on ChromeOS. Review URL: http://codereview.chromium.org/6254004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/platform_support_gtk.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/webkit/support/platform_support_gtk.cc b/webkit/support/platform_support_gtk.cc
index 2ab9627..4defd31 100644
--- a/webkit/support/platform_support_gtk.cc
+++ b/webkit/support/platform_support_gtk.cc
@@ -11,6 +11,7 @@
#include "base/path_service.h"
#include "base/string16.h"
#include "base/string_piece.h"
+#include "gfx/gfx_module.h"
#include "grit/webkit_resources.h"
namespace {
@@ -18,6 +19,13 @@ namespace {
// Data resources on linux. This is a pointer to the mmapped resources file.
app::DataPack* g_resource_data_pack = NULL;
+base::StringPiece TestResourceProvider(int resource_id) {
+ base::StringPiece res;
+ if (g_resource_data_pack)
+ g_resource_data_pack->GetStringPiece(resource_id, &res);
+ return res;
+}
+
}
namespace webkit_support {
@@ -37,6 +45,9 @@ void AfterInitialize(bool unit_test_mode) {
data_path = data_path.Append("DumpRenderTree.pak");
if (!g_resource_data_pack->Load(data_path))
LOG(FATAL) << "failed to load DumpRenderTree.pak";
+
+ // Config the modules that need access to a limited set of resources.
+ gfx::GfxModule::SetResourceProvider(TestResourceProvider);
}
void BeforeShutdown() {