From 6bea5abf7fb61153a722caef5f0575dcbca242a7 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Fri, 25 Sep 2009 19:56:12 +0000 Subject: Use delegates in AutocompleteEditViewMac and do other stuff to get it to build with the 10.6 SDK. Review URL: http://codereview.chromium.org/244009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27227 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm | 2 +- chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome/browser/cocoa') diff --git a/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm b/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm index e45fdd2..3df553d 100644 --- a/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm +++ b/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm @@ -52,7 +52,7 @@ class AutocompleteTextFieldEditorTest : public PlatformTest { // Arrange for |field_| to get the right field editor. window_delegate_.reset( [[AutocompleteTextFieldWindowTestDelegate alloc] init]); - [cocoa_helper_.window() setDelegate:window_delegate_]; + [cocoa_helper_.window() setDelegate:window_delegate_.get()]; // Get the field editor setup. cocoa_helper_.makeFirstResponder(field_); diff --git a/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h b/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h index 0993510..9aef620 100644 --- a/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h +++ b/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h @@ -7,6 +7,7 @@ #import +#import "base/cocoa_protocols_mac.h" #include "base/scoped_nsobject.h" #import "chrome/browser/cocoa/autocomplete_text_field.h" #include "testing/gmock/include/gmock/gmock.h" @@ -15,7 +16,8 @@ // Return the right field editor for AutocompleteTextField instance. -@interface AutocompleteTextFieldWindowTestDelegate : NSObject { +@interface AutocompleteTextFieldWindowTestDelegate : + NSObject { scoped_nsobject editor_; } - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject; -- cgit v1.1