diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 22:34:35 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 22:34:35 +0000 |
commit | 06821f42d58c7b7f88303fd09de1ec86dace6f8e (patch) | |
tree | 80207da0fd90e4df8f87d9ba1dcf22f0c65d5e6f /chrome | |
parent | b53c5fca4e029639a07745750023096a6090aae3 (diff) | |
download | chromium_src-06821f42d58c7b7f88303fd09de1ec86dace6f8e.zip chromium_src-06821f42d58c7b7f88303fd09de1ec86dace6f8e.tar.gz chromium_src-06821f42d58c7b7f88303fd09de1ec86dace6f8e.tar.bz2 |
Fix dragging icon in Extension App Windows (it was enlarged while dragging).
The tab contents changes are purely cosmetic (readability).
BUG=43114
TEST=Drag a tab in an Extension App Window. It should have a regular sized icon.
Review URL: http://codereview.chromium.org/1889001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 16 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_renderer.cc | 5 |
2 files changed, 9 insertions, 12 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index cfb18cb..c3ddc0c 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -4,6 +4,11 @@ #include "chrome/browser/tab_contents/tab_contents.h" +#if defined(OS_CHROMEOS) +// For GdkScreen +#include <gdk/gdk.h> +#endif // defined(OS_CHROMEOS) + #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/text_elider.h" @@ -88,11 +93,6 @@ #include "webkit/glue/password_form.h" #include "webkit/glue/webpreferences.h" -#if defined(OS_CHROMEOS) -// For GdkScreen -#include <gdk/gdk.h> -#endif // defined(OS_CHROMEOS) - // Cross-Site Navigations // // If a TabContents is told to navigate to a different web site (as determined @@ -522,11 +522,9 @@ SkBitmap* TabContents::GetAppExtensionIcon() { // 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. - if (delegate_ && - delegate_->GetBrowser() && - delegate_->GetBrowser()->type() == Browser::TYPE_EXTENSION_APP) { + Browser* browser = delegate_ ? delegate_->GetBrowser() : NULL; + if (browser && browser->type() == Browser::TYPE_EXTENSION_APP) return NULL; - } if (app_extension_icon_.empty()) return NULL; diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc index 9220907..8b5a1d8 100644 --- a/chrome/browser/views/tabs/tab_renderer.cc +++ b/chrome/browser/views/tabs/tab_renderer.cc @@ -318,14 +318,13 @@ void TabRenderer::UpdateData(TabContents* contents, data_.title = contents->GetTitle(); data_.off_the_record = contents->profile()->IsOffTheRecord(); data_.crashed = contents->is_crashed(); + data_.app = contents->is_app(); SkBitmap* app_icon = contents->GetAppExtensionIcon(); - if (app_icon) + if (app_icon && data_.app) data_.favicon = *app_icon; else data_.favicon = contents->GetFavIcon(); - data_.phantom = phantom; - data_.app = contents->is_app(); // Sets the accessible name for the tab. SetAccessibleName(UTF16ToWide(data_.title)); |