diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 16:15:17 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 16:15:17 +0000 |
commit | 8009f23dff4aeea8b2a1b32481ffbfbb334760c5 (patch) | |
tree | c6042d4cb63f05bfd29005f97ca592a0ed44c559 /chrome | |
parent | 81bb1092f354f3cb3c597ab3c9ed568905078e49 (diff) | |
download | chromium_src-8009f23dff4aeea8b2a1b32481ffbfbb334760c5.zip chromium_src-8009f23dff4aeea8b2a1b32481ffbfbb334760c5.tar.gz chromium_src-8009f23dff4aeea8b2a1b32481ffbfbb334760c5.tar.bz2 |
Use ResourceBundle for NativeThemeLinux/Chromeos resource images.
- Clean up gfx NativeThemeLinux/Chromeos code to use ResourceBundle.
This should also fix valgrind failures in issue 77712 and 77721.
- Remove no longer needed gfx_module and gfx_resource_provider files.
- Update linux/chromeos test_shell and DumpRenderTree to use
ResourceBundle as well.
BUG=77712,77721
TEST=Build should pass and valgrind failure in issue 77712 and 77721 should be gone.
Review URL: http://codereview.chromium.org/6773021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80319 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_main.cc | 3 | ||||
-rw-r--r-- | chrome/chrome_common.gypi | 2 | ||||
-rw-r--r-- | chrome/common/gfx_resource_provider.cc | 16 | ||||
-rw-r--r-- | chrome/common/gfx_resource_provider.h | 20 | ||||
-rw-r--r-- | chrome/renderer/renderer_main.cc | 3 | ||||
-rw-r--r-- | chrome/test/render_view_test.cc | 5 |
6 files changed, 0 insertions, 49 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 0e60c55..737f01b 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -79,7 +79,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/env_vars.h" -#include "chrome/common/gfx_resource_provider.h" #include "chrome/common/json_pref_store.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/logging_chrome.h" @@ -114,7 +113,6 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/system_monitor/system_monitor.h" -#include "ui/gfx/gfx_module.h" #if defined(USE_LINUX_BREAKPAD) #include "base/linux_util.h" @@ -1588,7 +1586,6 @@ int BrowserMain(const MainFunctionParams& parameters) { // Configure modules that need access to resources. net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); - gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider); // Register our global network handler for chrome:// and // chrome-extension:// URLs. diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 16f3ecf..284f82c 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -47,8 +47,6 @@ 'common/content_settings_helper.h', 'common/content_settings_types.h', 'common/devtools_messages.h', - 'common/gfx_resource_provider.cc', - 'common/gfx_resource_provider.h', 'common/guid.cc', 'common/guid.h', 'common/guid_posix.cc', diff --git a/chrome/common/gfx_resource_provider.cc b/chrome/common/gfx_resource_provider.cc deleted file mode 100644 index 8cee034..0000000 --- a/chrome/common/gfx_resource_provider.cc +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/gfx_resource_provider.h" - -#include "base/string_piece.h" -#include "ui/base/resource/resource_bundle.h" - -namespace chrome { - -base::StringPiece GfxResourceProvider(int key) { - return ResourceBundle::GetSharedInstance().GetRawDataResource(key); -} - -} // namespace chrome diff --git a/chrome/common/gfx_resource_provider.h b/chrome/common/gfx_resource_provider.h deleted file mode 100644 index 41b67b8..0000000 --- a/chrome/common/gfx_resource_provider.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_COMMON_GFX_RESOURCE_PROVIDER_H_ -#define CHROME_COMMON_GFX_RESOURCE_PROVIDER_H_ -#pragma once - -namespace base { -class StringPiece; -} - -namespace chrome { - -// This is called indirectly by the gfx theme code to access resources. -base::StringPiece GfxResourceProvider(int key); - -} // namespace chrome - -#endif // CHROME_COMMON_GFX_RESOURCE_PROVIDER_H_ diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 385da63..cd3bb5d 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -24,7 +24,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_counters.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/gfx_resource_provider.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/net/net_resource_provider.h" #include "chrome/common/pepper_plugin_registry.h" @@ -37,7 +36,6 @@ #include "net/base/net_module.h" #include "ui/base/system_monitor/system_monitor.h" #include "ui/base/ui_base_switches.h" -#include "ui/gfx/gfx_module.h" #if defined(OS_MACOSX) #include "base/eintr_wrapper.h" @@ -249,7 +247,6 @@ int RendererMain(const MainFunctionParams& parameters) { // Configure modules that need access to resources. net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); - gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider); // This function allows pausing execution using the --renderer-startup-dialog // flag allowing us to attach a debugger. diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc index 27b2ef2..8c3854b 100644 --- a/chrome/test/render_view_test.cc +++ b/chrome/test/render_view_test.cc @@ -6,7 +6,6 @@ #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/gfx_resource_provider.h" #include "chrome/common/print_messages.h" #include "chrome/common/render_messages.h" #include "chrome/renderer/autofill/password_autofill_manager.h" @@ -28,7 +27,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" -#include "ui/gfx/gfx_module.h" #include "webkit/glue/webkit_glue.h" #if defined(OS_LINUX) @@ -96,9 +94,6 @@ void RenderViewTest::LoadHTML(const char* html) { } void RenderViewTest::SetUp() { - // Configure modules that need access to resources. - gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider); - content::GetContentClient()->set_renderer(&chrome_content_renderer_client_); extension_dispatcher_ = new ExtensionDispatcher(); sandbox_init_wrapper_.reset(new SandboxInitWrapper()); |