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

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

Issue 496006: Make KeywordEditorCocoaController implement the proper protocols. Also remove (Closed)
Patch Set: Created 11 years 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
« no previous file with comments | « chrome/browser/cocoa/font_language_settings_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "app/table_model_observer.h" 7 #include "app/table_model_observer.h"
8 #import "base/cocoa_protocols_mac.h"
8 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
9 #include "chrome/browser/search_engines/edit_search_engine_controller.h" 10 #include "chrome/browser/search_engines/edit_search_engine_controller.h"
10 #include "chrome/browser/search_engines/keyword_editor_controller.h" 11 #include "chrome/browser/search_engines/keyword_editor_controller.h"
11 #include "chrome/browser/search_engines/template_url_model.h" 12 #include "chrome/browser/search_engines/template_url_model.h"
12 13
13 class EditSearchEngineControllerDelegate; 14 class EditSearchEngineControllerDelegate;
14 @class KeywordEditorCocoaController; 15 @class KeywordEditorCocoaController;
15 class Profile; 16 class Profile;
16 17
17 // Very thin bridge that simply pushes notifications from C++ to ObjC. 18 // Very thin bridge that simply pushes notifications from C++ to ObjC.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // created in GetImageForRow(). 52 // created in GetImageForRow().
52 scoped_nsobject<NSPointerArray> iconImages_; 53 scoped_nsobject<NSPointerArray> iconImages_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(KeywordEditorModelObserver); 55 DISALLOW_COPY_AND_ASSIGN(KeywordEditorModelObserver);
55 }; 56 };
56 57
57 // This controller manages a window with a table view of search engines. It 58 // This controller manages a window with a table view of search engines. It
58 // acts as |tableView_|'s data source and delegate, feeding it data from the 59 // acts as |tableView_|'s data source and delegate, feeding it data from the
59 // KeywordEditorController's |table_model()|. 60 // KeywordEditorController's |table_model()|.
60 61
61 @interface KeywordEditorCocoaController : NSWindowController { 62 @interface KeywordEditorCocoaController : NSWindowController
63 <NSWindowDelegate,
64 NSTableViewDataSource,
65 NSTableViewDelegate> {
62 IBOutlet NSTableView* tableView_; 66 IBOutlet NSTableView* tableView_;
63 IBOutlet NSButton* addButton_; 67 IBOutlet NSButton* addButton_;
64 IBOutlet NSButton* removeButton_; 68 IBOutlet NSButton* removeButton_;
65 IBOutlet NSButton* makeDefaultButton_; 69 IBOutlet NSButton* makeDefaultButton_;
66 70
67 scoped_nsobject<NSTextFieldCell> groupCell_; 71 scoped_nsobject<NSTextFieldCell> groupCell_;
68 72
69 Profile* profile_; // weak 73 Profile* profile_; // weak
70 scoped_ptr<KeywordEditorController> controller_; 74 scoped_ptr<KeywordEditorController> controller_;
71 scoped_ptr<KeywordEditorModelObserver> observer_; 75 scoped_ptr<KeywordEditorModelObserver> observer_;
(...skipping 24 matching lines...) Expand all
96 100
97 // Returns a reference to the shared instance for the given profile, 101 // Returns a reference to the shared instance for the given profile,
98 // or nil if there is none. 102 // or nil if there is none.
99 + (KeywordEditorCocoaController*)sharedInstanceForProfile:(Profile*)profile; 103 + (KeywordEditorCocoaController*)sharedInstanceForProfile:(Profile*)profile;
100 104
101 // Converts a row index in our table view (which has group header rows) into 105 // Converts a row index in our table view (which has group header rows) into
102 // one in the |controller_|'s model, which does not have them. 106 // one in the |controller_|'s model, which does not have them.
103 - (int)indexInModelForRow:(NSUInteger)row; 107 - (int)indexInModelForRow:(NSUInteger)row;
104 108
105 @end 109 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/font_language_settings_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698