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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 119154: Add comments on magic number 0xbb. They are VK_OEM_PLUS. I guess the original... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « no previous file | views/controls/textfield/native_textfield_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/autocomplete/autocomplete_edit_view_win.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h"
6 6
7 #include <locale> 7 #include <locale>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 900
901 case VK_DELETE: 901 case VK_DELETE:
902 case VK_INSERT: 902 case VK_INSERT:
903 return !e.IsAltDown() && e.IsShiftDown() && !e.IsControlDown(); 903 return !e.IsAltDown() && e.IsShiftDown() && !e.IsControlDown();
904 904
905 case 'X': 905 case 'X':
906 case 'V': 906 case 'V':
907 return !e.IsAltDown() && e.IsControlDown(); 907 return !e.IsAltDown() && e.IsControlDown();
908 908
909 case VK_BACK: 909 case VK_BACK:
910 case 0xbb: 910 case 0xbb: // We don't use VK_OEM_PLUS in case the macro isn't defined.
911 // (e.g., we don't have this symbol in embeded environment).
911 return true; 912 return true;
912 913
913 default: 914 default:
914 return false; 915 return false;
915 } 916 }
916 } 917 }
917 918
918 void AutocompleteEditViewWin::HandleExternalMsg(UINT msg, 919 void AutocompleteEditViewWin::HandleExternalMsg(UINT msg,
919 UINT flags, 920 UINT flags,
920 const CPoint& screen_point) { 921 const CPoint& screen_point) {
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 case VK_TAB: { 1809 case VK_TAB: {
1809 if (model_->is_keyword_hint() && !model_->keyword().empty()) { 1810 if (model_->is_keyword_hint() && !model_->keyword().empty()) {
1810 // Accept the keyword. 1811 // Accept the keyword.
1811 ScopedFreeze freeze(this, GetTextObjectModel()); 1812 ScopedFreeze freeze(this, GetTextObjectModel());
1812 model_->AcceptKeyword(); 1813 model_->AcceptKeyword();
1813 } 1814 }
1814 return true; 1815 return true;
1815 } 1816 }
1816 1817
1817 case 0xbb: // Ctrl-'='. Triggers subscripting (even in plain text mode). 1818 case 0xbb: // Ctrl-'='. Triggers subscripting (even in plain text mode).
1819 // We don't use VK_OEM_PLUS in case the macro isn't defined.
1820 // (e.g., we don't have this symbol in embeded environment).
1818 return true; 1821 return true;
1819 1822
1820 default: 1823 default:
1821 return false; 1824 return false;
1822 } 1825 }
1823 } 1826 }
1824 1827
1825 bool AutocompleteEditViewWin::OnKeyDownAllModes(TCHAR key, 1828 bool AutocompleteEditViewWin::OnKeyDownAllModes(TCHAR key,
1826 UINT repeat_count, 1829 UINT repeat_count,
1827 UINT flags) { 1830 UINT flags) {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 context_menu_contents_->AddItemWithStringId(IDS_PASTE_AND_GO, 2338 context_menu_contents_->AddItemWithStringId(IDS_PASTE_AND_GO,
2336 IDS_PASTE_AND_GO); 2339 IDS_PASTE_AND_GO);
2337 context_menu_contents_->AddSeparator(); 2340 context_menu_contents_->AddSeparator();
2338 context_menu_contents_->AddItemWithStringId(IDS_SELECT_ALL, IDS_SELECT_ALL); 2341 context_menu_contents_->AddItemWithStringId(IDS_SELECT_ALL, IDS_SELECT_ALL);
2339 context_menu_contents_->AddSeparator(); 2342 context_menu_contents_->AddSeparator();
2340 context_menu_contents_->AddItemWithStringId(IDS_EDIT_SEARCH_ENGINES, 2343 context_menu_contents_->AddItemWithStringId(IDS_EDIT_SEARCH_ENGINES,
2341 IDS_EDIT_SEARCH_ENGINES); 2344 IDS_EDIT_SEARCH_ENGINES);
2342 } 2345 }
2343 context_menu_.reset(new views::Menu2(context_menu_contents_.get())); 2346 context_menu_.reset(new views::Menu2(context_menu_contents_.get()));
2344 } 2347 }
OLDNEW
« no previous file with comments | « no previous file | views/controls/textfield/native_textfield_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698