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

Side by Side Diff: chrome/browser/ui/cocoa/find_bar/find_bar_text_field.mm

Issue 1048323003: Allows the findbar to respond to "Paste and Match Style" menu commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" 5 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
9 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h" 9 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h"
10 #import "chrome/browser/ui/cocoa/view_id_util.h" 10 #import "chrome/browser/ui/cocoa/view_id_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // NSTextDidBeginEditingNotification is from NSText, but this only 43 // NSTextDidBeginEditingNotification is from NSText, but this only
44 // applies to NSTextView instances. 44 // applies to NSTextView instances.
45 NSTextView* textView = 45 NSTextView* textView =
46 base::mac::ObjCCast<NSTextView>([aNotification object]); 46 base::mac::ObjCCast<NSTextView>([aNotification object]);
47 NSTextCheckingTypes checkingTypes = [textView enabledTextCheckingTypes]; 47 NSTextCheckingTypes checkingTypes = [textView enabledTextCheckingTypes];
48 checkingTypes &= ~NSTextCheckingTypeReplacement; 48 checkingTypes &= ~NSTextCheckingTypeReplacement;
49 checkingTypes &= ~NSTextCheckingTypeCorrection; 49 checkingTypes &= ~NSTextCheckingTypeCorrection;
50 [textView setEnabledTextCheckingTypes:checkingTypes]; 50 [textView setEnabledTextCheckingTypes:checkingTypes];
51 } 51 }
52 52
53 // Implemented to allow the findbar to respond to "Paste and Match Style" menu
54 // commands.
55 - (void)pasteAndMatchStyle:(id)sender {
56 [[self currentEditor] paste:sender];
57 }
58
Robert Sesek 2015/04/15 15:15:01 nit: extra blank line
59
53 @end 60 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698