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

Side by Side Diff: chrome/browser/plugin_installer_infobar_delegate.cc

Issue 7545021: Unify infobars' link-opening behavior to respect user-requested dispositions and append the Googl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/plugin_installer_infobar_delegate.h" 5 #include "chrome/browser/plugin_installer_infobar_delegate.h"
6 6
7 #include "chrome/browser/google/google_util.h"
7 #include "content/browser/renderer_host/render_view_host.h" 8 #include "content/browser/renderer_host/render_view_host.h"
8 #include "content/browser/tab_contents/tab_contents.h" 9 #include "content/browser/tab_contents/tab_contents.h"
9 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
10 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
11 #include "grit/locale_settings.h" 12 #include "grit/locale_settings.h"
12 #include "grit/theme_resources_standard.h" 13 #include "grit/theme_resources_standard.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
15 16
16 PluginInstallerInfoBarDelegate::PluginInstallerInfoBarDelegate( 17 PluginInstallerInfoBarDelegate::PluginInstallerInfoBarDelegate(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 host->Send(new ViewMsg_InstallMissingPlugin(host->routing_id())); 52 host->Send(new ViewMsg_InstallMissingPlugin(host->routing_id()));
52 return true; 53 return true;
53 } 54 }
54 55
55 string16 PluginInstallerInfoBarDelegate::GetLinkText() const { 56 string16 PluginInstallerInfoBarDelegate::GetLinkText() const {
56 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_PROBLEMSINSTALLING); 57 return l10n_util::GetStringUTF16(IDS_PLUGININSTALLER_PROBLEMSINSTALLING);
57 } 58 }
58 59
59 bool PluginInstallerInfoBarDelegate::LinkClicked( 60 bool PluginInstallerInfoBarDelegate::LinkClicked(
60 WindowOpenDisposition disposition) { 61 WindowOpenDisposition disposition) {
61 // Ignore the click dispostion and always open in a new top level tab. 62 tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL(
62 static const char kLearnMorePluginInstallerUrl[] = "http://www.google.com/" 63 "http://www.google.com/support/chrome/bin/answer.py?answer=95697&topic="
63 "support/chrome/bin/answer.py?answer=95697&topic=14687"; 64 "14687")), GURL(),
64 tab_contents_->OpenURL(GURL(kLearnMorePluginInstallerUrl), GURL(), 65 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
65 NEW_FOREGROUND_TAB, PageTransition::LINK); 66 PageTransition::LINK);
66 return false; 67 return false;
67 } 68 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/chrome_geolocation_permission_context.cc ('k') | chrome/browser/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698