summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc5
-rw-r--r--chrome/browser/tab_contents/tab_contents.h11
2 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 2815391..db8e51f 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2865,3 +2865,8 @@ void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) {
void TabContents::set_encoding(const std::string& encoding) {
encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
}
+
+void TabContents::SetAppIcon(const SkBitmap& app_icon) {
+ app_icon_ = app_icon;
+ NotifyNavigationStateChanged(INVALIDATE_TITLE);
+}
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 1fae555..0f00ae3 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -263,6 +263,14 @@ class TabContents : public PageNavigator,
return web_app_info_;
}
+ SkBitmap app_icon() const {
+ return app_icon_;
+ }
+
+ // Sets an app icon associated with TabContents and fires an INVALIDATE_TITLE
+ // navigation state change to trigger repaint of title.
+ void SetAppIcon(const SkBitmap& app_icon);
+
// Internal state ------------------------------------------------------------
// This flag indicates whether the tab contents is currently being
@@ -1017,6 +1025,9 @@ class TabContents : public PageNavigator,
// Cached web app info data.
webkit_glue::WebApplicationInfo web_app_info_;
+ // Cached web app icon.
+ SkBitmap app_icon_;
+
// Data for loading state ----------------------------------------------------
// Indicates whether we're currently loading a resource.