Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2193)

Unified Diff: chrome/browser/plugin_infobar_delegates.cc

Issue 10758024: Re-land https://src.chromium.org/viewvc/chrome?view=rev&revision=145774 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_infobar_delegates.cc
===================================================================
--- chrome/browser/plugin_infobar_delegates.cc (revision 145834)
+++ chrome/browser/plugin_infobar_delegates.cc (working copy)
@@ -22,6 +22,11 @@
#include "ui/base/resource/resource_bundle.h"
#include "webkit/plugins/npapi/plugin_group.h"
+#if defined(OS_WIN)
+#include <shellapi.h>
+#include "ui/base/win/shell.h"
+#endif
+
#if defined(ENABLE_PLUGIN_INSTALLATION)
#include "chrome/browser/plugin_installer.h"
#endif // defined(ENABLE_PLUGIN_INSTALLATION)
@@ -452,8 +457,19 @@
}
bool PluginMetroModeInfoBarDelegate::Accept() {
- // TODO(cpu) switch to desktop chrome here.
- return false;
+ content::WebContents* web_contents = owner()->web_contents();
+ if (!web_contents)
+ return false;
+ // Note that empty urls are not valid.
+ if (!web_contents->GetURL().is_valid())
+ return false;
+ std::string url(web_contents->GetURL().spec());
+ // This obscure use of the 'log usage' mask for windows 8 is documented
+ // here http://goo.gl/HBOe9.
+ ui::win::OpenAnyViaShell(UTF8ToUTF16(url),
+ string16(),
+ SEE_MASK_FLAG_LOG_USAGE);
+ return true;
}
string16 PluginMetroModeInfoBarDelegate::GetLinkText() const {
@@ -464,7 +480,7 @@
WindowOpenDisposition disposition) {
// TODO(cpu): replace with the final url.
GURL url = google_util::AppendGoogleLocaleParam(GURL(
- "https://www.google.com/support/chrome/bin/answer.py?answer=142064"));
+ "https://support.google.com/chrome/?ib_display_in_desktop"));
OpenURLParams params(
url, Referrer(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698