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

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

Powered by Google App Engine
This is Rietveld 408576698