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

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

Issue 193040: [Mac] Implement the search engine manager (Closed)
Patch Set: Final patch 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 #import <Cocoa/Cocoa.h>
6
7 class TemplateURL;
8
9 #include "base/scoped_nsobject.h"
10 #include "base/scoped_ptr.h"
11 #include "chrome/browser/search_engines/edit_search_engine_controller.h"
12
13 // This controller presents a dialog that allows a user to add or edit a search
14 // engine. If constructed with a nil |templateURL| then it is an add operation,
15 // otherwise it will modify the passed URL. A |delegate| is necessary to
16 // perform the actual database modifications, and should probably be an
17 // instance of KeywordEditorModelObserver.
18
19 @interface EditSearchEngineCocoaController : NSWindowController {
20 IBOutlet NSTextField* nameField_;
21 IBOutlet NSTextField* keywordField_;
22 IBOutlet NSTextField* urlField_;
23 IBOutlet NSImageView* nameImage_;
24 IBOutlet NSImageView* keywordImage_;
25 IBOutlet NSImageView* urlImage_;
26 IBOutlet NSButton* doneButton_;
27
28 // Refs to the good and bad images used in the interface validation.
29 scoped_nsobject<NSImage> goodImage_;
30 scoped_nsobject<NSImage> badImage_;
31
32 Profile* profile_; // weak
33 const TemplateURL* templateURL_; // weak
34 scoped_ptr<EditSearchEngineController> controller_;
35 }
36
37 - (id)initWithProfile:(Profile*)profile
38 delegate:(EditSearchEngineControllerDelegate*)delegate
39 templateURL:(const TemplateURL*)url;
40
41 - (IBAction)cancel:(id)sender;
42 - (IBAction)save:(id)sender;
43
44 @end
45
46 @interface EditSearchEngineCocoaController (ExposedForTesting)
47 - (BOOL)validateFields;
48 @end
OLDNEW
« no previous file with comments | « chrome/app/nibs/Preferences.xib ('k') | chrome/browser/cocoa/edit_search_engine_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698