From a12f7fbe12afffb4b1b31ec0d6b0988f1f9a6554 Mon Sep 17 00:00:00 2001 From: "xiyuan@chromium.org" Date: Thu, 20 Jan 2011 18:21:08 +0000 Subject: 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 --- webkit/support/platform_support_gtk.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'webkit/support') 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() { -- cgit v1.1