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

Side by Side Diff: chrome/browser/tab_contents/spellchecker_submenu_observer_mac.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, 3 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/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" 10 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h"
(...skipping 26 matching lines...) Expand all
37 const content::ContextMenuParams& params) { 37 const content::ContextMenuParams& params) {
38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
39 39
40 // Add an item that toggles the spelling panel. 40 // Add an item that toggles the spelling panel.
41 submenu_model_.AddCheckItem( 41 submenu_model_.AddCheckItem(
42 IDC_SPELLPANEL_TOGGLE, 42 IDC_SPELLPANEL_TOGGLE,
43 l10n_util::GetStringUTF16( 43 l10n_util::GetStringUTF16(
44 spellcheck_mac::SpellingPanelVisible() ? 44 spellcheck_mac::SpellingPanelVisible() ?
45 IDS_CONTENT_CONTEXT_HIDE_SPELLING_PANEL : 45 IDS_CONTENT_CONTEXT_HIDE_SPELLING_PANEL :
46 IDS_CONTENT_CONTEXT_SHOW_SPELLING_PANEL)); 46 IDS_CONTENT_CONTEXT_SHOW_SPELLING_PANEL));
47 submenu_model_.AddSeparator(); 47 submenu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
48 48
49 // Add a 'Check Spelling While Typing' item in the sub menu. 49 // Add a 'Check Spelling While Typing' item in the sub menu.
50 submenu_model_.AddCheckItem( 50 submenu_model_.AddCheckItem(
51 IDC_CHECK_SPELLING_WHILE_TYPING, 51 IDC_CHECK_SPELLING_WHILE_TYPING,
52 l10n_util::GetStringUTF16( 52 l10n_util::GetStringUTF16(
53 IDS_CONTENT_CONTEXT_CHECK_SPELLING_WHILE_TYPING)); 53 IDS_CONTENT_CONTEXT_CHECK_SPELLING_WHILE_TYPING));
54 54
55 proxy_->AddSubMenu( 55 proxy_->AddSubMenu(
56 IDC_SPELLCHECK_MENU, 56 IDC_SPELLCHECK_MENU,
57 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLCHECK_MENU), 57 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLCHECK_MENU),
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (rvh) 116 if (rvh)
117 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); 117 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID()));
118 break; 118 break;
119 119
120 case IDC_SPELLPANEL_TOGGLE: 120 case IDC_SPELLPANEL_TOGGLE:
121 rvh->Send(new SpellCheckMsg_ToggleSpellPanel( 121 rvh->Send(new SpellCheckMsg_ToggleSpellPanel(
122 rvh->GetRoutingID(), spellcheck_mac::SpellingPanelVisible())); 122 rvh->GetRoutingID(), spellcheck_mac::SpellingPanelVisible()));
123 break; 123 break;
124 } 124 }
125 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc ('k') | chrome/browser/translate/options_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698