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

Unified Diff: chrome/browser/tab_contents/spelling_bubble_model.cc

Issue 8561024: Add a "Learn More" link to the Spelling bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « chrome/browser/tab_contents/spelling_bubble_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/spelling_bubble_model.cc
===================================================================
--- chrome/browser/tab_contents/spelling_bubble_model.cc (revision 110703)
+++ chrome/browser/tab_contents/spelling_bubble_model.cc (working copy)
@@ -5,9 +5,13 @@
#include "chrome/browser/tab_contents/spelling_bubble_model.h"
#include "base/logging.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
+#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -48,3 +52,14 @@
void SpellingBubbleModel::Cancel() {
}
+
+string16 SpellingBubbleModel::GetLinkText() const {
+ return l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_LINK);
+}
+
+void SpellingBubbleModel::LinkClicked() {
+ Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
+ browser->OpenURL(
+ google_util::AppendGoogleLocaleParam(GURL(chrome::kPrivacyLearnMoreURL)),
+ GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK);
+}
« no previous file with comments | « chrome/browser/tab_contents/spelling_bubble_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698