summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 21:02:52 +0000
committerstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 21:02:52 +0000
commit6da13e9a72d596e57901532bd91334c8704d6814 (patch)
treedc76f828451b49efd3b1eb5b1b461ba6638f3c03
parent2c65b4da251f9620a42d2ac24efb4267dba16d2e (diff)
downloadchromium_src-6da13e9a72d596e57901532bd91334c8704d6814.zip
chromium_src-6da13e9a72d596e57901532bd91334c8704d6814.tar.gz
chromium_src-6da13e9a72d596e57901532bd91334c8704d6814.tar.bz2
chromium-os:3730 - 'Aw snap on moles links to unreadable Help Center articles.'
Customize SadTabView to open a new FG tab from the 'learn more' link for chromeos popups. BUG=http://code.google.com/p/chromium-os/issues/detail?id=3730 TEST=See bug Review URL: http://codereview.chromium.org/3367022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59551 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/sad_tab_view.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/views/sad_tab_view.cc b/chrome/browser/views/sad_tab_view.cc
index 09fdaab..680e7d3 100644
--- a/chrome/browser/views/sad_tab_view.cc
+++ b/chrome/browser/views/sad_tab_view.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "gfx/canvas.h"
#include "gfx/canvas_skia.h"
#include "gfx/size.h"
@@ -110,7 +111,16 @@ void SadTabView::Layout() {
void SadTabView::LinkActivated(views::Link* source, int event_flags) {
if (tab_contents_ != NULL && source == learn_more_link_) {
string16 url = l10n_util::GetStringUTF16(IDS_CRASH_REASON_URL);
- tab_contents_->OpenURL(GURL(url), GURL(), CURRENT_TAB,
+ WindowOpenDisposition disposition(CURRENT_TAB);
+#if defined(OS_CHROMEOS)
+ if (tab_contents_->delegate() &&
+ tab_contents_->delegate()->IsPopup(tab_contents_)) {
+ // Popup windows are generally too small to effectively show help,
+ // so open the help content in a new foregreound tab.
+ disposition = NEW_FOREGROUND_TAB;
+ }
+#endif
+ tab_contents_->OpenURL(GURL(url), GURL(), disposition,
PageTransition::LINK);
}
}