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

Side by Side Diff: ui/views/cocoa/bridged_content_view.mm

Issue 1999773002: views::Textfield: Implement transpose editing command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 5 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 | « ui/base/ime/text_edit_commands.h ('k') | ui/views/cocoa/bridged_native_widget_unittest.mm » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ui/views/cocoa/bridged_content_view.h" 5 #import "ui/views/cocoa/bridged_content_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/mac_util.h" 8 #import "base/mac/mac_util.h"
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 ? [self moveToEndOfLineAndModifySelection:sender] 970 ? [self moveToEndOfLineAndModifySelection:sender]
971 : [self moveToBeginningOfLineAndModifySelection:sender]; 971 : [self moveToBeginningOfLineAndModifySelection:sender];
972 } 972 }
973 973
974 - (void)moveToRightEndOfLineAndModifySelection:(id)sender { 974 - (void)moveToRightEndOfLineAndModifySelection:(id)sender {
975 IsTextRTL(textInputClient_) 975 IsTextRTL(textInputClient_)
976 ? [self moveToBeginningOfLineAndModifySelection:sender] 976 ? [self moveToBeginningOfLineAndModifySelection:sender]
977 : [self moveToEndOfLineAndModifySelection:sender]; 977 : [self moveToEndOfLineAndModifySelection:sender];
978 } 978 }
979 979
980 // Graphical Element transposition
981
982 - (void)transpose:(id)sender {
983 [self handleAction:ui::TextEditCommand::TRANSPOSE
984 keyCode:ui::VKEY_T
985 domCode:ui::DomCode::US_T
986 eventFlags:ui::EF_CONTROL_DOWN];
987 }
988
980 // Deletions. 989 // Deletions.
981 990
982 - (void)deleteForward:(id)sender { 991 - (void)deleteForward:(id)sender {
983 [self handleAction:ui::TextEditCommand::DELETE_FORWARD 992 [self handleAction:ui::TextEditCommand::DELETE_FORWARD
984 keyCode:ui::VKEY_DELETE 993 keyCode:ui::VKEY_DELETE
985 domCode:ui::DomCode::DEL 994 domCode:ui::DomCode::DEL
986 eventFlags:0]; 995 eventFlags:0];
987 } 996 }
988 997
989 - (void)deleteBackward:(id)sender { 998 - (void)deleteBackward:(id)sender {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1255 }
1247 1256
1248 return [super accessibilityAttributeValue:attribute]; 1257 return [super accessibilityAttributeValue:attribute];
1249 } 1258 }
1250 1259
1251 - (id)accessibilityHitTest:(NSPoint)point { 1260 - (id)accessibilityHitTest:(NSPoint)point {
1252 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 1261 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
1253 } 1262 }
1254 1263
1255 @end 1264 @end
OLDNEW
« no previous file with comments | « ui/base/ime/text_edit_commands.h ('k') | ui/views/cocoa/bridged_native_widget_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698