summaryrefslogtreecommitdiffstats
path: root/chrome/browser/page_info_model.h
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 17:59:47 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 17:59:47 +0000
commit6f01e95e2c326c01f573968b136781e87e62067a (patch)
tree4991623f5221c97147992f60a10b2147d230aebc /chrome/browser/page_info_model.h
parente4359be2f8068dce74234add3fb5268bbc90670f (diff)
downloadchromium_src-6f01e95e2c326c01f573968b136781e87e62067a.zip
chromium_src-6f01e95e2c326c01f573968b136781e87e62067a.tar.gz
chromium_src-6f01e95e2c326c01f573968b136781e87e62067a.tar.bz2
Integrate gfx::Image into the ResourceBundle.
This changes the definition of GetNativeImageNamed to return a gfx::Image and adds GetImageNamed in addition. GetBitmapNamed now goes through that method. On Linux, GetNativeImageNamed will load directly into a GdkPixbuf-backed Image. Mac will still first load through Skia (a future CL will load directly into an NSImage). All other platforms use Skia natively, so GetNativeImageNamed is the same as GetImageNamed. Mac was the only platform that used the old GetNativeImageNamed, so this also transitions a bunch of Mac files by including ui/gfx/image.h. This also obviates the need for platform-specific image caches in the ResourceBundle, so there's some additional cleanup around that. BUG=carnitas TEST=All UI images in Chromium show up as before. Review URL: http://codereview.chromium.org/6541031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/page_info_model.h')
-rw-r--r--chrome/browser/page_info_model.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/chrome/browser/page_info_model.h b/chrome/browser/page_info_model.h
index df7d986..9490385 100644
--- a/chrome/browser/page_info_model.h
+++ b/chrome/browser/page_info_model.h
@@ -13,7 +13,7 @@
#include "chrome/browser/history/history.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "googleurl/src/gurl.h"
-#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/image.h"
class PrefService;
class Profile;
@@ -82,13 +82,12 @@ class PageInfoModel {
const NavigationEntry::SSLStatus& ssl,
bool show_history,
PageInfoModelObserver* observer);
- ~PageInfoModel();
int GetSectionCount();
SectionInfo GetSectionInfo(int index);
// Returns the native image type for an icon with the given id.
- gfx::NativeImage GetIconImage(SectionStateIcon icon_id);
+ gfx::Image* GetIconImage(SectionStateIcon icon_id);
// Callback from history service with number of visits to url.
void OnGotVisitCountToHost(HistoryService::Handle handle,
@@ -103,16 +102,12 @@ class PageInfoModel {
// Shared initialization for default and testing constructor.
void Init();
- // Wrapper for ResourceBundle::GetNativeImage() so that Mac can retain its
- // icons.
- gfx::NativeImage GetBitmapNamed(int resource_id);
-
PageInfoModelObserver* observer_;
std::vector<SectionInfo> sections_;
// All possible icons that go next to the text descriptions to indicate state.
- std::vector<gfx::NativeImage> icons_;
+ std::vector<gfx::Image*> icons_;
// Used to request number of visits.
CancelableRequestConsumer request_consumer_;