OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |