blob: 6d1d5d572e04b5f6dfaedf00c82f7863b8d7da9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/cocoa/autocomplete_text_field.h"
#include "base/logging.h"
#include "chrome/browser/cocoa/autocomplete_text_field_cell.h"
@implementation AutocompleteTextField
+ (Class)cellClass {
return [AutocompleteTextFieldCell class];
}
- (void)awakeFromNib {
DCHECK([[self cell] isKindOfClass:[AutocompleteTextFieldCell class]]);
}
- (BOOL)textShouldPaste:(NSText*)fieldEditor {
id delegate = [self delegate];
if ([delegate respondsToSelector:@selector(control:textShouldPaste:)]) {
return [delegate control:self textShouldPaste:fieldEditor];
}
return YES;
}
@end
|