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

Side by Side Diff: chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h

Issue 211030: [Mac] Expose AutocompleteEditViewMac to Cocoa code. (Closed)
Patch Set: Rohit's comments Created 11 years, 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_UNITTEST_HELPER_H_
6 #define CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_UNITTEST_HELPER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/scoped_nsobject.h"
11 #import "chrome/browser/cocoa/autocomplete_text_field.h"
12
13 @class AutocompleteTextFieldEditor;
14
15 // Return the right field editor for AutocompleteTextField instance.
16
17 @interface AutocompleteTextFieldWindowTestDelegate : NSObject {
18 scoped_nsobject<AutocompleteTextFieldEditor> editor_;
19 }
20 - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject;
21 @end
22
23 namespace {
24
25 // Allow monitoring calls into AutocompleteTextField's observer.
26
27 class AutocompleteTextFieldObserverMock : public AutocompleteTextFieldObserver {
28 public:
29 virtual void OnControlKeyChanged(bool pressed) {
30 on_control_key_changed_called_ = true;
31 on_control_key_changed_value_ = pressed;
32 }
33
34 virtual void OnPaste() {
35 on_paste_called_ = true;
36 }
37
38 void Reset() {
39 on_control_key_changed_called_ = false;
40 on_control_key_changed_value_ = false;
41 on_paste_called_ = false;
42 }
43
44 bool on_control_key_changed_called_;
45 bool on_control_key_changed_value_;
46 bool on_paste_called_;
47 };
48
49 } // namespace
50
51 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_UNITTEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698