Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1758)

Unified Diff: webkit/support/platform_support_gtk.cc

Issue 6254004: Move more web widgets painting from webkit to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and fix width100percent-checkbox Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webthemeengine_impl_linux.cc ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/platform_support_gtk.cc
diff --git a/webkit/support/platform_support_gtk.cc b/webkit/support/platform_support_gtk.cc
index 2ab96275c67f979c21a0a04c973cdf2d748147a1..4defd312de0ad1fe8c8f8470a2fd57d604968580 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() {
« no previous file with comments | « webkit/glue/webthemeengine_impl_linux.cc ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698