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

Unified Diff: ui/views/cocoa/bridged_content_view.mm

Issue 1912993002: MacViews: Implement NSResponder deletion action messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/cocoa/bridged_content_view.mm
diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm
index 6d72fef5cf7ece1d35262f4b7b1a572622710f05..b53e5011ba8a9373fc4fda4c3c162a20e8c9c059 100644
--- a/ui/views/cocoa/bridged_content_view.mm
+++ b/ui/views/cocoa/bridged_content_view.mm
@@ -678,6 +678,9 @@ gfx::Rect GetFirstRectForRangeHelper(const ui::TextInputClient* client,
// Deletions.
+// views::Textfields are single-line only, map Paragraph and Document commands
tapted 2016/04/29 04:15:39 Move this up to the section comment in line 569, s
karandeepb 2016/05/02 02:53:42 Done.
+// to Line.
+
- (void)deleteForward:(id)sender {
[self handleAction:IDS_DELETE_FORWARD
keyCode:ui::VKEY_DELETE
@@ -706,6 +709,28 @@ gfx::Rect GetFirstRectForRangeHelper(const ui::TextInputClient* client,
eventFlags:ui::EF_CONTROL_DOWN];
}
+- (void)deleteToBeginningOfLine:(id)sender {
+ [self handleAction:IDS_DELETE_TO_BEGINNING_OF_LINE
+ keyCode:ui::VKEY_BACK
+ domCode:ui::DomCode::BACKSPACE
+ eventFlags:ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN];
+}
+
+- (void)deleteToEndOfLine:(id)sender {
+ [self handleAction:IDS_DELETE_TO_END_OF_LINE
+ keyCode:ui::VKEY_DELETE
+ domCode:ui::DomCode::DEL
+ eventFlags:ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN];
+}
+
+- (void)deleteToBeginningOfParagraph:(id)sender {
+ [self deleteToBeginningOfLine:sender];
+}
+
+- (void)deleteToEndOfParagraph:(id)sender {
+ [self deleteToEndOfLine:sender];
+}
+
// Cancellation.
- (void)cancelOperation:(id)sender {
« no previous file with comments | « no previous file | ui/views/cocoa/bridged_native_widget_unittest.mm » ('j') | ui/views/cocoa/bridged_native_widget_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698