diff options
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 8 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 4 |
3 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 41e644c..5ab30a2 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -23,6 +23,7 @@ #include "chrome/browser/autofill/autofill_manager.h" #include "chrome/browser/blocked_popup_container.h" #include "chrome/browser/bookmarks/bookmark_model.h" +#include "chrome/browser/browser.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/cert_store.h" @@ -538,6 +539,13 @@ void TabContents::SetExtensionAppById(const std::string& extension_app_id) { } SkBitmap* TabContents::GetExtensionAppIcon() { + // We don't show the big icons in tabs for TYPE_EXTENSION_APP windows because + // for those windows, we already have a big icon in the top-left outside any + // tab. Having big tab icons too looks kinda redonk. + Browser* browser = delegate_ ? delegate_->GetBrowser() : NULL; + if (browser && browser->type() == Browser::TYPE_EXTENSION_APP) + return NULL; + if (extension_app_icon_.empty()) return NULL; diff --git a/chrome/browser/tab_contents/tab_contents_delegate.cc b/chrome/browser/tab_contents/tab_contents_delegate.cc index 8a03160..9cf9f88 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.cc +++ b/chrome/browser/tab_contents/tab_contents_delegate.cc @@ -139,6 +139,10 @@ void TabContentsDelegate::OnDidGetApplicationInfo(TabContents* tab_contents, int32 page_id) { } +Browser* TabContentsDelegate::GetBrowser() { + return NULL; +} + gfx::NativeWindow TabContentsDelegate::GetFrameNativeWindow() { return NULL; } diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index c97483c..ff1f49b 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -19,6 +19,7 @@ #include "webkit/glue/context_menu.h" #include "webkit/glue/window_open_disposition.h" +class Browser; class DownloadItem; class ExtensionFunctionDispatcher; class GURL; @@ -247,6 +248,9 @@ class TabContentsDelegate : public AutomationResourceRoutingDelegate { virtual void OnDidGetApplicationInfo(TabContents* tab_contents, int32 page_id); + // Returns the browser in which the tab contents is being displayed. + virtual Browser* GetBrowser(); + // Returns the native window framing the view containing the tab contents. virtual gfx::NativeWindow GetFrameNativeWindow(); |