Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |