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

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

Issue 2119813002: views::Textfield: Implement yank editing command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 } 1065 }
1066 1066
1067 - (void)deleteToBeginningOfParagraph:(id)sender { 1067 - (void)deleteToBeginningOfParagraph:(id)sender {
1068 [self deleteToBeginningOfLine:sender]; 1068 [self deleteToBeginningOfLine:sender];
1069 } 1069 }
1070 1070
1071 - (void)deleteToEndOfParagraph:(id)sender { 1071 - (void)deleteToEndOfParagraph:(id)sender {
1072 [self deleteToEndOfLine:sender]; 1072 [self deleteToEndOfLine:sender];
1073 } 1073 }
1074 1074
1075 - (void)yank:(id)sender {
1076 [self handleAction:ui::TextEditCommand::YANK
1077 keyCode:ui::VKEY_Y
1078 domCode:ui::DomCode::US_Y
1079 eventFlags:ui::EF_CONTROL_DOWN];
1080 }
1081
1075 // Cancellation. 1082 // Cancellation.
1076 1083
1077 - (void)cancelOperation:(id)sender { 1084 - (void)cancelOperation:(id)sender {
1078 [self handleAction:ui::TextEditCommand::INVALID_COMMAND 1085 [self handleAction:ui::TextEditCommand::INVALID_COMMAND
1079 keyCode:ui::VKEY_ESCAPE 1086 keyCode:ui::VKEY_ESCAPE
1080 domCode:ui::DomCode::ESCAPE 1087 domCode:ui::DomCode::ESCAPE
1081 eventFlags:0]; 1088 eventFlags:0];
1082 } 1089 }
1083 1090
1084 // Support for Services in context menus. 1091 // Support for Services in context menus.
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 } 1287 }
1281 1288
1282 return [super accessibilityAttributeValue:attribute]; 1289 return [super accessibilityAttributeValue:attribute];
1283 } 1290 }
1284 1291
1285 - (id)accessibilityHitTest:(NSPoint)point { 1292 - (id)accessibilityHitTest:(NSPoint)point {
1286 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 1293 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
1287 } 1294 }
1288 1295
1289 @end 1296 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698