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

Side by Side Diff: chrome/browser/ui/cocoa/edit_search_engine_cocoa_controller.h

Issue 6339002: [Mac] Consolidate all files relating to preferences in a subdir of c/b/ui/coc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
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 #import <Cocoa/Cocoa.h>
6
7 class TemplateURL;
8
9 #import "base/mac/cocoa_protocols.h"
10 #include "base/scoped_nsobject.h"
11 #include "base/scoped_ptr.h"
12 #include "chrome/browser/search_engines/edit_search_engine_controller.h"
13
14 // This controller presents a dialog that allows a user to add or edit a search
15 // engine. If constructed with a nil |templateURL| then it is an add operation,
16 // otherwise it will modify the passed URL. A |delegate| is necessary to
17 // perform the actual database modifications, and should probably be an
18 // instance of KeywordEditorModelObserver.
19
20 @interface EditSearchEngineCocoaController :
21 NSWindowController<NSWindowDelegate> {
22 IBOutlet NSTextField* nameField_;
23 IBOutlet NSTextField* keywordField_;
24 IBOutlet NSTextField* urlField_;
25 IBOutlet NSImageView* nameImage_;
26 IBOutlet NSImageView* keywordImage_;
27 IBOutlet NSImageView* urlImage_;
28 IBOutlet NSButton* doneButton_;
29 IBOutlet NSTextField* urlDescriptionField_;
30 IBOutlet NSView* labelContainer_;
31 IBOutlet NSBox* fieldAndImageContainer_;
32
33 // Refs to the good and bad images used in the interface validation.
34 scoped_nsobject<NSImage> goodImage_;
35 scoped_nsobject<NSImage> badImage_;
36
37 Profile* profile_; // weak
38 const TemplateURL* templateURL_; // weak
39 scoped_ptr<EditSearchEngineController> controller_;
40 }
41
42 - (id)initWithProfile:(Profile*)profile
43 delegate:(EditSearchEngineControllerDelegate*)delegate
44 templateURL:(const TemplateURL*)url;
45
46 - (IBAction)cancel:(id)sender;
47 - (IBAction)save:(id)sender;
48
49 @end
50
51 @interface EditSearchEngineCocoaController (ExposedForTesting)
52 - (BOOL)validateFields;
53 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698