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

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

Issue 220040: [Mac] Enable "Edit Search Engines" in Omnibox context menu. (Closed)
Patch Set: nop to make sure I'm logging in. Created 11 years, 2 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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "chrome/browser/search_engines/edit_search_engine_controller.h" 8 #include "chrome/browser/search_engines/edit_search_engine_controller.h"
9 #include "chrome/browser/search_engines/keyword_editor_controller.h" 9 #include "chrome/browser/search_engines/keyword_editor_controller.h"
10 #include "chrome/browser/search_engines/template_url_model.h" 10 #include "chrome/browser/search_engines/template_url_model.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 IBOutlet NSButton* addButton_; 48 IBOutlet NSButton* addButton_;
49 IBOutlet NSButton* removeButton_; 49 IBOutlet NSButton* removeButton_;
50 IBOutlet NSButton* makeDefaultButton_; 50 IBOutlet NSButton* makeDefaultButton_;
51 51
52 Profile* profile_; // weak 52 Profile* profile_; // weak
53 scoped_ptr<KeywordEditorController> controller_; 53 scoped_ptr<KeywordEditorController> controller_;
54 scoped_ptr<KeywordEditorModelObserver> observer_; 54 scoped_ptr<KeywordEditorModelObserver> observer_;
55 } 55 }
56 @property (readonly) KeywordEditorController* controller; 56 @property (readonly) KeywordEditorController* controller;
57 57
58 - (id)initWithProfile:(Profile*)profile; 58 // Show the keyword editor associated with the given profile (or the
59 // original profile if this is an incognito profile). If no keyword
60 // editor exists for this profile, create one and show it. Any
61 // resulting editor releases itself when closed.
62 + (void)showKeywordEditor:(Profile*)profile;
59 63
60 // Message forwarded by KeywordEditorModelObserver. 64 // Message forwarded by KeywordEditorModelObserver.
61 - (void)modelChanged; 65 - (void)modelChanged;
62 66
63 - (IBAction)addKeyword:(id)sender; 67 - (IBAction)addKeyword:(id)sender;
64 - (IBAction)deleteKeyword:(id)sender; 68 - (IBAction)deleteKeyword:(id)sender;
65 - (IBAction)makeDefault:(id)sender; 69 - (IBAction)makeDefault:(id)sender;
66 70
67 @end 71 @end
72
73 @interface KeywordEditorCocoaController (TestingAPI)
74
75 // Instances of this class are managed, use +showKeywordEditor:.
76 - (id)initWithProfile:(Profile*)profile;
77
78 // Returns a reference to the shared instance for the given profile,
79 // or nil if there is none.
80 + (KeywordEditorCocoaController*)sharedInstanceForProfile:(Profile*)profile;
81
82 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/cocoa/keyword_editor_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698