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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 10928231: Fix ResourceBundleImageSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unittest crash Created 8 years, 3 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 | « no previous file | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 570de5c12fd7a04b1a2add446fd01db08c0c1067..f127ae10cf998d932e87480dc455b5e536c57555 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -15,6 +15,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "base/memory/weak_ptr.h"
#include "base/platform_file.h"
#include "base/string16.h"
#include "base/string_piece.h"
@@ -37,7 +38,7 @@ class ResourceHandle;
// ResourceBundle is a central facility to load images and other resources,
// such as theme graphics. Every resource is loaded only once.
-class UI_EXPORT ResourceBundle {
+class UI_EXPORT ResourceBundle : public base::SupportsWeakPtr<ResourceBundle> {
public:
// An enumeration of the various font styles used throughout Chrome.
// The following holds true for the font sizes:
@@ -247,6 +248,8 @@ class UI_EXPORT ResourceBundle {
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, GetRawDataResource);
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LoadDataResourceBytes);
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LocaleDataPakExists);
+ FRIEND_TEST_ALL_PREFIXES(ResourceBundle, GetImageNamed);
+ FRIEND_TEST_ALL_PREFIXES(ResourceBundle, ImageLifetime);
tony 2012/09/18 18:43:42 Nit: In a separate change, it would probably be wo
class ResourceBundleImageSource;
friend class ResourceBundleImageSource;
« no previous file with comments | « no previous file | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698