diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-17 04:17:05 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-17 04:17:05 +0000 |
commit | 51a568b38c0cef21863dffbb35f8c1ab4c76fed4 (patch) | |
tree | d2ba99f2b95673f37308cde1e52d8f78051cd475 | |
parent | da80205aeedefe6a562113bf86b13c5714dcdc82 (diff) | |
download | chromium_src-51a568b38c0cef21863dffbb35f8c1ab4c76fed4.zip chromium_src-51a568b38c0cef21863dffbb35f8c1ab4c76fed4.tar.gz chromium_src-51a568b38c0cef21863dffbb35f8c1ab4c76fed4.tar.bz2 |
plugins: Show a help link in the "plugin needed" infobar.
BUG=6574
TEST=None
Review URL: http://codereview.chromium.org/2850031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52808 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/resources/locale_settings.grd | 5 | ||||
-rw-r--r-- | chrome/browser/plugin_installer.cc | 15 | ||||
-rw-r--r-- | chrome/browser/plugin_installer.h | 4 |
3 files changed, 22 insertions, 2 deletions
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd index 3c66807..2fb8fd4 100644 --- a/chrome/app/resources/locale_settings.grd +++ b/chrome/app/resources/locale_settings.grd @@ -513,6 +513,11 @@ http://www.google.com/support/chrome/bin/answer.py?answer=142065&hl=[GRITLANGCODE] </message> + <!-- The URL for the "Problems installing" page for the Plugins infobar --> + <message name="IDS_LEARN_MORE_PLUGININSTALLER_URL" translateable="false"> + http://www.google.com/support/chrome/bin/answer.py?answer=95697&topic=14687 + </message> + <!-- The width and height of the bookmark manager in characters and lines --> <!-- (See above). --> <message name="IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS" use_name_for_id="true"> diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc index b7f38c5..2d0e0a3 100644 --- a/chrome/browser/plugin_installer.cc +++ b/chrome/browser/plugin_installer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,6 +10,7 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" +#include "grit/locale_settings.h" #include "grit/theme_resources.h" #include "webkit/glue/plugins/default_plugin_shared.h" @@ -65,3 +66,15 @@ bool PluginInstaller::Accept() { tab_contents_->render_view_host()->InstallMissingPlugin(); return true; } + +std::wstring PluginInstaller::GetLinkText() { + return l10n_util::GetString(IDS_PLUGININSTALLER_PROBLEMSINSTALLING); +} + +bool PluginInstaller::LinkClicked(WindowOpenDisposition disposition) { + // Ignore the click dispostion and always open in a new top level tab. + tab_contents_->OpenURL( + GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_PLUGININSTALLER_URL)), + GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); + return false; // Do not dismiss the info bar. +} diff --git a/chrome/browser/plugin_installer.h b/chrome/browser/plugin_installer.h index 8760c4f..77f3804 100644 --- a/chrome/browser/plugin_installer.h +++ b/chrome/browser/plugin_installer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -27,6 +27,8 @@ class PluginInstaller : public ConfirmInfoBarDelegate { virtual int GetButtons() const; virtual std::wstring GetButtonLabel(InfoBarButton button) const; virtual bool Accept(); + virtual std::wstring GetLinkText(); + virtual bool LinkClicked(WindowOpenDisposition disposition); // The containing TabContents TabContents* tab_contents_; |