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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/edit_search_engine_cocoa_controller.h
diff --git a/chrome/browser/cocoa/edit_search_engine_cocoa_controller.h b/chrome/browser/cocoa/edit_search_engine_cocoa_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c8e57eddd05748df42eedc95f46cf3348019c59
--- /dev/null
+++ b/chrome/browser/cocoa/edit_search_engine_cocoa_controller.h
@@ -0,0 +1,48 @@
+// 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.
+
+#import <Cocoa/Cocoa.h>
+
+class TemplateURL;
+
+#include "base/scoped_nsobject.h"
+#include "base/scoped_ptr.h"
+#include "chrome/browser/search_engines/edit_search_engine_controller.h"
+
+// This controller presents a dialog that allows a user to add or edit a search
+// engine. If constructed with a nil |templateURL| then it is an add operation,
+// otherwise it will modify the passed URL. A |delegate| is necessary to
+// perform the actual database modifications, and should probably be an
+// instance of KeywordEditorModelObserver.
+
+@interface EditSearchEngineCocoaController : NSWindowController {
+ IBOutlet NSTextField* nameField_;
+ IBOutlet NSTextField* keywordField_;
+ IBOutlet NSTextField* urlField_;
+ IBOutlet NSImageView* nameImage_;
+ IBOutlet NSImageView* keywordImage_;
+ IBOutlet NSImageView* urlImage_;
+ IBOutlet NSButton* doneButton_;
+
+ // Refs to the good and bad images used in the interface validation.
+ scoped_nsobject<NSImage> goodImage_;
+ scoped_nsobject<NSImage> badImage_;
+
+ Profile* profile_; // weak
+ const TemplateURL* templateURL_; // weak
+ scoped_ptr<EditSearchEngineController> controller_;
+}
+
+- (id)initWithProfile:(Profile*)profile
+ delegate:(EditSearchEngineControllerDelegate*)delegate
+ templateURL:(const TemplateURL*)url;
+
+- (IBAction)cancel:(id)sender;
+- (IBAction)save:(id)sender;
+
+@end
+
+@interface EditSearchEngineCocoaController (ExposedForTesting)
+- (BOOL)validateFields;
+@end
« 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