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

Side by Side Diff: chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc

Issue 10837317: Setting the touch wrench menu as default menu for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another merge! Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tab_contents/spellchecker_submenu_observer.h" 5 #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/api/prefs/pref_member.h" 9 #include "chrome/browser/api/prefs/pref_member.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const std::string app_locale = g_browser_process->GetApplicationLocale(); 50 const std::string app_locale = g_browser_process->GetApplicationLocale();
51 for (size_t i = 0; i < languages_.size(); ++i) { 51 for (size_t i = 0; i < languages_.size(); ++i) {
52 string16 display_name( 52 string16 display_name(
53 l10n_util::GetDisplayNameForLocale(languages_[i], app_locale, true)); 53 l10n_util::GetDisplayNameForLocale(languages_[i], app_locale, true));
54 submenu_model_.AddRadioItem(IDC_SPELLCHECK_LANGUAGES_FIRST + i, 54 submenu_model_.AddRadioItem(IDC_SPELLCHECK_LANGUAGES_FIRST + i,
55 display_name, 55 display_name,
56 language_group_); 56 language_group_);
57 } 57 }
58 58
59 // Add an item that opens the 'fonts and languages options' page. 59 // Add an item that opens the 'fonts and languages options' page.
60 submenu_model_.AddSeparator(); 60 submenu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
61 submenu_model_.AddItemWithStringId( 61 submenu_model_.AddItemWithStringId(
62 IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS, 62 IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS,
63 IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS); 63 IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS);
64 64
65 // Add a 'Check spelling while typing' item in the sub menu. 65 // Add a 'Check spelling while typing' item in the sub menu.
66 submenu_model_.AddCheckItem( 66 submenu_model_.AddCheckItem(
67 IDC_CHECK_SPELLING_WHILE_TYPING, 67 IDC_CHECK_SPELLING_WHILE_TYPING,
68 l10n_util::GetStringUTF16( 68 l10n_util::GetStringUTF16(
69 IDS_CONTENT_CONTEXT_CHECK_SPELLING_WHILE_TYPING)); 69 IDS_CONTENT_CONTEXT_CHECK_SPELLING_WHILE_TYPING));
70 70
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 switch (command_id) { 164 switch (command_id) {
165 case IDC_CHECK_SPELLING_WHILE_TYPING: 165 case IDC_CHECK_SPELLING_WHILE_TYPING:
166 profile->GetPrefs()->SetBoolean( 166 profile->GetPrefs()->SetBoolean(
167 prefs::kEnableSpellCheck, 167 prefs::kEnableSpellCheck,
168 !profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); 168 !profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck));
169 if (rvh) 169 if (rvh)
170 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); 170 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID()));
171 break; 171 break;
172 } 172 }
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698