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
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index cfb18cb3..c3ddc0c0 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 @@
// 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;