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

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: Add a comment. 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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 } 1022 }
1023 1023
1024 - (void)deleteToBeginningOfParagraph:(id)sender { 1024 - (void)deleteToBeginningOfParagraph:(id)sender {
1025 [self deleteToBeginningOfLine:sender]; 1025 [self deleteToBeginningOfLine:sender];
1026 } 1026 }
1027 1027
1028 - (void)deleteToEndOfParagraph:(id)sender { 1028 - (void)deleteToEndOfParagraph:(id)sender {
1029 [self deleteToEndOfLine:sender]; 1029 [self deleteToEndOfLine:sender];
1030 } 1030 }
1031 1031
1032 - (void)yank:(id)sender {
1033 [self handleAction:ui::TextEditCommand::YANK
1034 keyCode:ui::VKEY_Y
1035 domCode:ui::DomCode::US_Y
1036 eventFlags:ui::EF_CONTROL_DOWN];
1037 }
1038
1032 // Cancellation. 1039 // Cancellation.
1033 1040
1034 - (void)cancelOperation:(id)sender { 1041 - (void)cancelOperation:(id)sender {
1035 [self handleAction:ui::TextEditCommand::INVALID_COMMAND 1042 [self handleAction:ui::TextEditCommand::INVALID_COMMAND
1036 keyCode:ui::VKEY_ESCAPE 1043 keyCode:ui::VKEY_ESCAPE
1037 domCode:ui::DomCode::ESCAPE 1044 domCode:ui::DomCode::ESCAPE
1038 eventFlags:0]; 1045 eventFlags:0];
1039 } 1046 }
1040 1047
1041 // Support for Services in context menus. 1048 // Support for Services in context menus.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1253 }
1247 1254
1248 return [super accessibilityAttributeValue:attribute]; 1255 return [super accessibilityAttributeValue:attribute];
1249 } 1256 }
1250 1257
1251 - (id)accessibilityHitTest:(NSPoint)point { 1258 - (id)accessibilityHitTest:(NSPoint)point {
1252 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 1259 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
1253 } 1260 }
1254 1261
1255 @end 1262 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698