diff options
Diffstat (limited to 'chrome/browser')
52 files changed, 222 insertions, 225 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index 720f3ac..b565e98 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -55,7 +55,7 @@ namespace { // TODO(shess): This is ugly, find a better way. Using it right now // so that I can crib from gtk and still be able to see that I'm using // the same values easily. -const NSColor* ColorWithRGBBytes(int rr, int gg, int bb) { +NSColor* ColorWithRGBBytes(int rr, int gg, int bb) { DCHECK_LE(rr, 255); DCHECK_LE(bb, 255); DCHECK_LE(gg, 255); @@ -65,19 +65,19 @@ const NSColor* ColorWithRGBBytes(int rr, int gg, int bb) { alpha:1.0]; } -const NSColor* HostTextColor() { +NSColor* HostTextColor() { return [NSColor blackColor]; } -const NSColor* BaseTextColor() { +NSColor* BaseTextColor() { return [NSColor darkGrayColor]; } -const NSColor* EVSecureSchemeColor() { +NSColor* EVSecureSchemeColor() { return ColorWithRGBBytes(0x07, 0x95, 0x00); } -const NSColor* SecureSchemeColor() { +NSColor* SecureSchemeColor() { return ColorWithRGBBytes(0x00, 0x0e, 0x95); } -const NSColor* SecurityErrorSchemeColor() { +NSColor* SecurityErrorSchemeColor() { return ColorWithRGBBytes(0xa2, 0x00, 0x00); } diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm index 5d31764..a8d494a 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm @@ -75,13 +75,13 @@ NSColor* HoveredBackgroundColor() { return [[NSColor controlHighlightColor] colorWithAlphaComponent:kPopupAlpha]; } -static const NSColor* ContentTextColor() { +static NSColor* ContentTextColor() { return [NSColor blackColor]; } -static const NSColor* URLTextColor() { +static NSColor* URLTextColor() { return [NSColor colorWithCalibratedRed:0.0 green:0.55 blue:0.0 alpha:1.0]; } -static const NSColor* DescriptionTextColor() { +static NSColor* DescriptionTextColor() { return [NSColor darkGrayColor]; } diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm index 1a4c908..f696e96 100644 --- a/chrome/browser/chrome_browser_application_mac.mm +++ b/chrome/browser/chrome_browser_application_mac.mm @@ -20,16 +20,16 @@ // obvious to intercept, but it doesn't catch the original throw // because the objc runtime doesn't use it. @interface NSException (NSExceptionSwizzle) -- (id)chromeInitWithName:(NSString *)aName - reason:(NSString *)aReason +- (id)chromeInitWithName:(NSString*)aName + reason:(NSString*)aReason userInfo:(NSDictionary *)someUserInfo; @end static IMP gOriginalInitIMP = NULL; @implementation NSException (NSExceptionSwizzle) -- (id)chromeInitWithName:(NSString *)aName - reason:(NSString *)aReason +- (id)chromeInitWithName:(NSString*)aName + reason:(NSString*)aReason userInfo:(NSDictionary *)someUserInfo { // Method only called when swizzled. DCHECK(_cmd == @selector(initWithName:reason:userInfo:)); @@ -38,7 +38,7 @@ static IMP gOriginalInitIMP = NULL; // worth bugging-out over. It is very important that there be zero chance that // any Chromium code is on the stack; these must be created by Apple code and // then immediately consumed by Apple code. - static const NSString* kAcceptableNSExceptionNames[] = { + static NSString* const kAcceptableNSExceptionNames[] = { // If an object does not support an accessibility attribute, this will // get thrown. NSAccessibilityException, @@ -85,7 +85,7 @@ size_t BinForException(NSException* exception) { // A list of common known exceptions. The list position will // determine where they live in the histogram, so never move them // around, only add to the end. - static const NSString* kKnownNSExceptionNames[] = { + static NSString* const kKnownNSExceptionNames[] = { // ??? NSGenericException, @@ -104,7 +104,7 @@ size_t BinForException(NSException* exception) { // Make sure our array hasn't outgrown our abilities to track it. DCHECK_LE(arraysize(kKnownNSExceptionNames), kKnownNSExceptionCount); - const NSString* name = [exception name]; + NSString* name = [exception name]; for (int i = 0; kKnownNSExceptionNames[i]; ++i) { if (name == kKnownNSExceptionNames[i]) { return i; @@ -276,7 +276,7 @@ BOOL SwizzleNSExceptionInit() { // When a Cocoa control is wired to a freed object, we get crashers // in the call to |super| with no useful information in the // backtrace. Attempt to add some useful information. - static const NSString* kActionKey = @"sendaction"; + static NSString* const kActionKey = @"sendaction"; // If the action is something generic like -commandDispatch:, then // the tag is essential. @@ -318,9 +318,9 @@ BOOL SwizzleNSExceptionInit() { // is tracked because it may be the one which caused the system to // go off the rails. The last exception thrown is tracked because // it may be the one most directly associated with the crash. - static const NSString* kFirstExceptionKey = @"firstexception"; + static NSString* const kFirstExceptionKey = @"firstexception"; static BOOL trackedFirstException = NO; - static const NSString* kLastExceptionKey = @"lastexception"; + static NSString* const kLastExceptionKey = @"lastexception"; // TODO(shess): It would be useful to post some stacktrace info // from the exception. diff --git a/chrome/browser/cocoa/autocomplete_text_field.h b/chrome/browser/cocoa/autocomplete_text_field.h index 23c0112..351685a 100644 --- a/chrome/browser/cocoa/autocomplete_text_field.h +++ b/chrome/browser/cocoa/autocomplete_text_field.h @@ -106,7 +106,7 @@ class AutocompleteTextFieldObserver { scoped_nsobject<NSMutableArray> currentToolTips_; } -@property AutocompleteTextFieldObserver* observer; +@property (nonatomic) AutocompleteTextFieldObserver* observer; // Convenience method to return the cell, casted appropriately. - (AutocompleteTextFieldCell*)autocompleteTextFieldCell; diff --git a/chrome/browser/cocoa/autocomplete_text_field_cell.h b/chrome/browser/cocoa/autocomplete_text_field_cell.h index bc791cf..281fe94 100644 --- a/chrome/browser/cocoa/autocomplete_text_field_cell.h +++ b/chrome/browser/cocoa/autocomplete_text_field_cell.h @@ -158,9 +158,9 @@ class ExtensionAction; // Internal methods here exposed for unit testing. @interface AutocompleteTextFieldCell (UnitTesting) -@property(readonly) NSAttributedString* keywordString; -@property(readonly) NSAttributedString* hintString; -@property(readonly) NSAttributedString* hintIconLabel; +@property(nonatomic, readonly) NSAttributedString* keywordString; +@property(nonatomic, readonly) NSAttributedString* hintString; +@property(nonatomic, readonly) NSAttributedString* hintIconLabel; // Returns the total number of installed Page Actions, visible or not. - (size_t)pageActionCount; diff --git a/chrome/browser/cocoa/background_gradient_view.h b/chrome/browser/cocoa/background_gradient_view.h index 8ebddc6f..db6aa9e 100644 --- a/chrome/browser/cocoa/background_gradient_view.h +++ b/chrome/browser/cocoa/background_gradient_view.h @@ -22,7 +22,7 @@ - (void)drawBackground; // Controls whether the bar draws a dividing line at the bottom. -@property(assign) BOOL showsDivider; +@property(nonatomic, assign) BOOL showsDivider; @end #endif // CHROME_BROWSER_COCOA_BACKGROUND_GRADIENT_VIEW_H_ diff --git a/chrome/browser/cocoa/background_tile_view.h b/chrome/browser/cocoa/background_tile_view.h index 3f4454e..70760c0 100644 --- a/chrome/browser/cocoa/background_tile_view.h +++ b/chrome/browser/cocoa/background_tile_view.h @@ -16,7 +16,7 @@ NSImage* tileImage_; } -@property(retain) NSImage* tileImage; +@property(nonatomic, retain) NSImage* tileImage; @end #endif // CHROME_BROWSER_COCOA_BACKGROUND_TILE_VIEW_H_ diff --git a/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm b/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm index 5c2e8cc..f26484b 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm +++ b/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm @@ -52,7 +52,7 @@ @private NSSize cellSize_; } -@property(readonly) NSSize cellSize; +@property (nonatomic, readonly) NSSize cellSize; @end @implementation CellWithDesiredSize @@ -73,7 +73,7 @@ @private int toggles_; } -@property (readonly) int toggles; +@property (nonatomic, readonly) int toggles; @end @implementation BookmarkBarControllerTogglePong @@ -91,8 +91,8 @@ BOOL windowWillCloseReceived_; BOOL windowDidResignKeyReceived_; } -@property(readonly) BOOL windowWillCloseReceived; -@property(readonly) BOOL windowDidResignKeyReceived; +@property (nonatomic, readonly) BOOL windowWillCloseReceived; +@property (nonatomic, readonly) BOOL windowDidResignKeyReceived; @end @implementation BookmarkBarControllerNotificationPong @@ -114,7 +114,7 @@ @interface BookmarkBarControllerOpenAllPong : BookmarkBarControllerNoOpen { WindowOpenDisposition dispositionDetected_; } -@property WindowOpenDisposition dispositionDetected; +@property (nonatomic) WindowOpenDisposition dispositionDetected; @end @implementation BookmarkBarControllerOpenAllPong @@ -201,7 +201,7 @@ class FakeTheme : public ThemeProvider { NSPoint dropLocation_; NSDragOperation sourceMask_; } -@property (assign) NSPoint dropLocation; +@property (nonatomic, assign) NSPoint dropLocation; - (void)setDraggingSourceOperationMask:(NSDragOperation)mask; @end diff --git a/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm b/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm index cb47d82..8cefd96 100644 --- a/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm +++ b/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm @@ -34,7 +34,7 @@ @interface BookmarkBarFolderControllerLow : BookmarkBarFolderController { BOOL realTopLeft_; // Use the real windowTopLeft call? } -@property BOOL realTopLeft; +@property (nonatomic) BOOL realTopLeft; @end @@ -57,8 +57,8 @@ BOOL childFolderWillShow_; BOOL childFolderWillClose_; } -@property(readonly) BOOL childFolderWillShow; -@property(readonly) BOOL childFolderWillClose; +@property (nonatomic, readonly) BOOL childFolderWillShow; +@property (nonatomic, readonly) BOOL childFolderWillClose; @end @implementation BookmarkBarFolderControllerPong @@ -397,7 +397,7 @@ TEST_F(BookmarkBarFolderControllerTest, SimpleScroll) { NSPoint dropLocation_; NSDragOperation sourceMask_; } -@property (assign) NSPoint dropLocation; +@property (nonatomic, assign) NSPoint dropLocation; - (void)setDraggingSourceOperationMask:(NSDragOperation)mask; @end diff --git a/chrome/browser/cocoa/bookmark_bar_toolbar_view_unittest.mm b/chrome/browser/cocoa/bookmark_bar_toolbar_view_unittest.mm index 61ae836..eaf3a34 100644 --- a/chrome/browser/cocoa/bookmark_bar_toolbar_view_unittest.mm +++ b/chrome/browser/cocoa/bookmark_bar_toolbar_view_unittest.mm @@ -61,9 +61,9 @@ class MockThemeProvider : public ThemeProvider { ThemeProvider* themeProvider_; bookmarks::VisualState visualState_; } -@property(assign) int currentTabContentsHeight; -@property(assign) ThemeProvider* themeProvider; -@property(assign) bookmarks::VisualState visualState; +@property (nonatomic, assign) int currentTabContentsHeight; +@property (nonatomic, assign) ThemeProvider* themeProvider; +@property (nonatomic, assign) bookmarks::VisualState visualState; // |BookmarkBarState| protocol: - (BOOL)isVisible; diff --git a/chrome/browser/cocoa/bookmark_bar_view.h b/chrome/browser/cocoa/bookmark_bar_view.h index 437b708..aed4346 100644 --- a/chrome/browser/cocoa/bookmark_bar_view.h +++ b/chrome/browser/cocoa/bookmark_bar_view.h @@ -26,12 +26,12 @@ - (NSButton*)importBookmarksButton; - (BookmarkBarController*)controller; -@property (assign, nonatomic) IBOutlet NSView* noItemContainer; +@property (nonatomic, assign) IBOutlet NSView* noItemContainer; @end @interface BookmarkBarView() // TestingOrInternalAPI -@property (readonly) BOOL dropIndicatorShown; -@property (readonly) CGFloat dropIndicatorPosition; +@property (nonatomic, readonly) BOOL dropIndicatorShown; +@property (nonatomic, readonly) CGFloat dropIndicatorPosition; - (void)setController:(id)controller; @end diff --git a/chrome/browser/cocoa/bookmark_bar_view_unittest.mm b/chrome/browser/cocoa/bookmark_bar_view_unittest.mm index 1b43c59..287d01d0 100644 --- a/chrome/browser/cocoa/bookmark_bar_view_unittest.mm +++ b/chrome/browser/cocoa/bookmark_bar_view_unittest.mm @@ -27,9 +27,9 @@ namespace { // Only mock one type of drag data at a time. NSString* dragDataType_; } -@property (readwrite) BOOL dropIndicatorShown; -@property (readwrite) BOOL draggingEnteredCalled; -@property (copy) NSString* dragDataType; +@property (nonatomic) BOOL dropIndicatorShown; +@property (nonatomic) BOOL draggingEnteredCalled; +@property (nonatomic, copy) NSString* dragDataType; @end @implementation FakeBookmarkDraggingInfo diff --git a/chrome/browser/cocoa/bookmark_button_cell.h b/chrome/browser/cocoa/bookmark_button_cell.h index 6213343..c05aff8 100644 --- a/chrome/browser/cocoa/bookmark_button_cell.h +++ b/chrome/browser/cocoa/bookmark_button_cell.h @@ -29,9 +29,9 @@ class BookmarkNode; scoped_nsobject<NSImage> arrowImage_; } -@property (readwrite, assign) const BookmarkNode* bookmarkNode; -@property (readwrite, assign) int startingChildIndex; -@property (readwrite, assign) BOOL drawFolderArrow; +@property (nonatomic, readwrite, assign) const BookmarkNode* bookmarkNode; +@property (nonatomic, readwrite, assign) int startingChildIndex; +@property (nonatomic, readwrite, assign) BOOL drawFolderArrow; // Create a button cell which draws with a theme. + (id)buttonCellForNode:(const BookmarkNode*)node diff --git a/chrome/browser/cocoa/bookmark_editor_base_controller.h b/chrome/browser/cocoa/bookmark_editor_base_controller.h index bb8fec5..1c758f8 100644 --- a/chrome/browser/cocoa/bookmark_editor_base_controller.h +++ b/chrome/browser/cocoa/bookmark_editor_base_controller.h @@ -46,11 +46,11 @@ class BookmarkModel; scoped_ptr<BookmarkEditorBaseControllerBridge> observer_; } -@property (copy) NSString* initialName; -@property (copy) NSString* displayName; -@property (assign) BOOL okEnabled; -@property (retain, readonly) NSArray* folderTreeArray; -@property (copy) NSArray* tableSelectionPaths; +@property (nonatomic, copy) NSString* initialName; +@property (nonatomic, copy) NSString* displayName; +@property (nonatomic, assign) BOOL okEnabled; +@property (nonatomic, retain, readonly) NSArray* folderTreeArray; +@property (nonatomic, copy) NSArray* tableSelectionPaths; // Designated initializer. Derived classes should call through to this init. - (id)initWithParentWindow:(NSWindow*)parentWindow @@ -120,10 +120,10 @@ class BookmarkModel; BOOL newFolder_; } -@property (copy, readwrite) NSString* folderName; -@property (assign, readwrite) const BookmarkNode* folderNode; -@property (retain, readwrite) NSMutableArray* children; -@property (assign, readwrite) BOOL newFolder; +@property (nonatomic, copy) NSString* folderName; +@property (nonatomic, assign) const BookmarkNode* folderNode; +@property (nonatomic, retain) NSMutableArray* children; +@property (nonatomic, assign) BOOL newFolder; // Convenience creator for adding a new folder to the editor's bookmark // structure. This folder will be added to the bookmark model when the @@ -152,7 +152,7 @@ class BookmarkModel; @interface BookmarkEditorBaseController(TestingAPI) -@property (readonly) BOOL okButtonEnabled; +@property (nonatomic, readonly) BOOL okButtonEnabled; // Create any newly added folders. New folders are nodes in folderTreeArray // which are marked as being new (i.e. their kFolderTreeNewFolderKey diff --git a/chrome/browser/cocoa/bookmark_editor_base_controller.mm b/chrome/browser/cocoa/bookmark_editor_base_controller.mm index be367ae..51612ce 100644 --- a/chrome/browser/cocoa/bookmark_editor_base_controller.mm +++ b/chrome/browser/cocoa/bookmark_editor_base_controller.mm @@ -332,10 +332,6 @@ class BookmarkEditorBaseControllerBridge : public BookmarkModelObserver { return folderTreeArray_.get(); } -- (void)setFolderTreeArray:(NSArray*)folderTreeArray { - folderTreeArray_.reset([folderTreeArray retain]); -} - - (NSArray*)tableSelectionPaths { return tableSelectionPaths_.get(); } @@ -420,7 +416,7 @@ class BookmarkEditorBaseControllerBridge : public BookmarkModelObserver { const BookmarkNode* rootNode = model->root_node(); NSMutableArray* baseArray = [self addChildFoldersFromNode:rootNode]; DCHECK(baseArray); - [self setFolderTreeArray:baseArray]; + folderTreeArray_.reset([baseArray retain]); } - (void)modelChangedPreserveSelection:(BOOL)preserve { diff --git a/chrome/browser/cocoa/bookmark_editor_controller.h b/chrome/browser/cocoa/bookmark_editor_controller.h index 2f4129c..24fde02 100644 --- a/chrome/browser/cocoa/bookmark_editor_controller.h +++ b/chrome/browser/cocoa/bookmark_editor_controller.h @@ -18,7 +18,7 @@ IBOutlet NSTextField* urlField_; } -@property (copy) NSString* displayURL; +@property (nonatomic, copy) NSString* displayURL; - (id)initWithParentWindow:(NSWindow*)parentWindow profile:(Profile*)profile diff --git a/chrome/browser/cocoa/bookmark_menu.h b/chrome/browser/cocoa/bookmark_menu.h index 5d39edf..d4ac001 100644 --- a/chrome/browser/cocoa/bookmark_menu.h +++ b/chrome/browser/cocoa/bookmark_menu.h @@ -15,6 +15,6 @@ int64 id_; // id of the bookmark node we represent. } - (void)setRepresentedObject:(id)object; -@property int64 id; +@property (nonatomic) int64 id; @end diff --git a/chrome/browser/cocoa/bookmark_menu_cocoa_controller.h b/chrome/browser/cocoa/bookmark_menu_cocoa_controller.h index 58fae09..8beeab5 100644 --- a/chrome/browser/cocoa/bookmark_menu_cocoa_controller.h +++ b/chrome/browser/cocoa/bookmark_menu_cocoa_controller.h @@ -22,7 +22,7 @@ class BookmarkMenuBridge; } // The Bookmarks menu -@property (readonly) NSMenu* menu; +@property (nonatomic, readonly) NSMenu* menu; // Return an autoreleased string to be used as a menu title for the // given bookmark node. diff --git a/chrome/browser/cocoa/bookmark_tree_browser_cell.h b/chrome/browser/cocoa/bookmark_tree_browser_cell.h index acdc5cb..595cf2a 100644 --- a/chrome/browser/cocoa/bookmark_tree_browser_cell.h +++ b/chrome/browser/cocoa/bookmark_tree_browser_cell.h @@ -22,9 +22,9 @@ class BookmarkNode; SEL action_; } -@property (assign) NSMatrix* matrix; -@property (assign) id target; -@property (assign) SEL action; +@property (nonatomic, assign) NSMatrix* matrix; +@property (nonatomic, assign) id target; +@property (nonatomic, assign) SEL action; - (const BookmarkNode*)bookmarkNode; - (void)setBookmarkNode:(const BookmarkNode*)bookmarkNode; diff --git a/chrome/browser/cocoa/bug_report_window_controller.h b/chrome/browser/cocoa/bug_report_window_controller.h index 88a7ca6..7b7d98c 100644 --- a/chrome/browser/cocoa/bug_report_window_controller.h +++ b/chrome/browser/cocoa/bug_report_window_controller.h @@ -98,15 +98,14 @@ class TabContents; doCommandBySelector:(SEL)commandSelector; // Properties for bindings. -@property (copy, nonatomic) NSString* bugDescription; -@property NSUInteger bugTypeIndex; -@property (copy, nonatomic) NSString* pageTitle; -@property (copy, nonatomic) NSString* pageURL; -@property BOOL sendScreenshot; -@property BOOL disableScreenshotCheckbox; -@property (readonly, nonatomic) NSArray* bugTypeList; +@property (nonatomic, copy) NSString* bugDescription; +@property (nonatomic) NSUInteger bugTypeIndex; +@property (nonatomic, copy) NSString* pageTitle; +@property (nonatomic, copy) NSString* pageURL; +@property (nonatomic) BOOL sendScreenshot; +@property (nonatomic) BOOL disableScreenshotCheckbox; +@property (nonatomic, readonly) NSArray* bugTypeList; @end #endif // CHROME_BROWSER_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ - diff --git a/chrome/browser/cocoa/clear_browsing_data_controller.h b/chrome/browser/cocoa/clear_browsing_data_controller.h index 72f7d25..230fdf4 100644 --- a/chrome/browser/cocoa/clear_browsing_data_controller.h +++ b/chrome/browser/cocoa/clear_browsing_data_controller.h @@ -62,14 +62,14 @@ extern NSString* const kClearBrowsingDataControllerRemoveMask; - (IBAction)openFlashPlayerSettings:(id)sender; // Properties for bindings -@property BOOL clearBrowsingHistory; -@property BOOL clearDownloadHistory; -@property BOOL emptyCache; -@property BOOL deleteCookies; -@property BOOL clearSavedPasswords; -@property BOOL clearFormData; -@property NSInteger timePeriod; -@property BOOL isClearing; +@property (nonatomic) BOOL clearBrowsingHistory; +@property (nonatomic) BOOL clearDownloadHistory; +@property (nonatomic) BOOL emptyCache; +@property (nonatomic) BOOL deleteCookies; +@property (nonatomic) BOOL clearSavedPasswords; +@property (nonatomic) BOOL clearFormData; +@property (nonatomic) NSInteger timePeriod; +@property (nonatomic) BOOL isClearing; @end diff --git a/chrome/browser/cocoa/cookie_details.h b/chrome/browser/cocoa/cookie_details.h index 06e8d4f..ce50dd9 100644 --- a/chrome/browser/cocoa/cookie_details.h +++ b/chrome/browser/cocoa/cookie_details.h @@ -113,9 +113,9 @@ enum CocoaCookieDetailsType { scoped_nsobject<NSString> manifestURL_; } -@property (readonly) BOOL canEditExpiration; -@property BOOL hasExpiration; -@property (readonly) CocoaCookieDetailsType type; +@property (nonatomic, readonly) BOOL canEditExpiration; +@property (nonatomic) BOOL hasExpiration; +@property (nonatomic, readonly) CocoaCookieDetailsType type; // The following methods are used in the bindings of subviews inside // the cookie detail view. Note that the method that tests the diff --git a/chrome/browser/cocoa/cookie_details_view_controller.h b/chrome/browser/cocoa/cookie_details_view_controller.h index 3d4eae2..c9f9635 100644 --- a/chrome/browser/cocoa/cookie_details_view_controller.h +++ b/chrome/browser/cocoa/cookie_details_view_controller.h @@ -28,7 +28,7 @@ IBOutlet GTMUILocalizerAndLayoutTweaker* tweaker_; } -@property (readonly) BOOL hasExpiration; +@property (nonatomic, readonly) BOOL hasExpiration; - (id)init; diff --git a/chrome/browser/cocoa/download_item_cell.h b/chrome/browser/cocoa/download_item_cell.h index 7ebc02f..484abab 100644 --- a/chrome/browser/cocoa/download_item_cell.h +++ b/chrome/browser/cocoa/download_item_cell.h @@ -49,8 +49,8 @@ enum DownloadItemMousePosition { - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel; -@property (copy) NSString* secondaryTitle; -@property (retain) NSFont* secondaryFont; +@property (nonatomic, copy) NSString* secondaryTitle; +@property (nonatomic, retain) NSFont* secondaryFont; // Returns if the mouse is over the button part of the cell. - (BOOL)isMouseOverButtonPart; diff --git a/chrome/browser/cocoa/draggable_button.h b/chrome/browser/cocoa/draggable_button.h index eee719a..2e166b7 100644 --- a/chrome/browser/cocoa/draggable_button.h +++ b/chrome/browser/cocoa/draggable_button.h @@ -13,7 +13,7 @@ } // Enable or disable dragability for special buttons like "Other Bookmarks". -@property BOOL draggable; +@property (nonatomic) BOOL draggable; // Called when a drag should start. Subclasses must override this to do any // pasteboard manipulation and begin the drag, usually with diff --git a/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm b/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm index 974dd7f..f03578d 100644 --- a/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm +++ b/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm @@ -15,15 +15,15 @@ @interface FakeEditSearchEngineController : EditSearchEngineCocoaController { } -@property (readonly) NSTextField* nameField; -@property (readonly) NSTextField* keywordField; -@property (readonly) NSTextField* urlField; -@property (readonly) NSImageView* nameImage; -@property (readonly) NSImageView* keywordImage; -@property (readonly) NSImageView* urlImage; -@property (readonly) NSButton* doneButton; -@property (readonly) NSImage* goodImage; -@property (readonly) NSImage* badImage; +@property (nonatomic, readonly) NSTextField* nameField; +@property (nonatomic, readonly) NSTextField* keywordField; +@property (nonatomic, readonly) NSTextField* urlField; +@property (nonatomic, readonly) NSImageView* nameImage; +@property (nonatomic, readonly) NSImageView* keywordImage; +@property (nonatomic, readonly) NSImageView* urlImage; +@property (nonatomic, readonly) NSButton* doneButton; +@property (nonatomic, readonly) NSImage* goodImage; +@property (nonatomic, readonly) NSImage* badImage; @end @implementation FakeEditSearchEngineController diff --git a/chrome/browser/cocoa/extension_installed_bubble_controller.h b/chrome/browser/cocoa/extension_installed_bubble_controller.h index 4947ae4..3deb91c 100644 --- a/chrome/browser/cocoa/extension_installed_bubble_controller.h +++ b/chrome/browser/cocoa/extension_installed_bubble_controller.h @@ -71,8 +71,8 @@ typedef enum { IBOutlet NSTextField* extensionInstalledInfoMsg_; } -@property (readonly) Extension* extension; -@property BOOL pageActionRemoved; +@property (nonatomic, readonly) Extension* extension; +@property (nonatomic) BOOL pageActionRemoved; // Initialize the window, and then create observers to wait for the extension // to complete loading, or the browser window to close. diff --git a/chrome/browser/cocoa/extensions/browser_action_button.h b/chrome/browser/cocoa/extensions/browser_action_button.h index da701d8..ffd8240 100644 --- a/chrome/browser/cocoa/extensions/browser_action_button.h +++ b/chrome/browser/cocoa/extensions/browser_action_button.h @@ -18,12 +18,12 @@ class Profile; // Fired when the Browser Action's state has changed. Usually the image needs to // be updated. -extern const NSString* kBrowserActionButtonUpdatedNotification; +extern NSString* const kBrowserActionButtonUpdatedNotification; // Fired on each drag event while the user is moving the button. -extern const NSString* kBrowserActionButtonDraggingNotification; +extern NSString* const kBrowserActionButtonDraggingNotification; // Fired when the user drops the button. -extern const NSString* kBrowserActionButtonDragEndNotification; +extern NSString* const kBrowserActionButtonDragEndNotification; extern const CGFloat kBrowserActionWidth; diff --git a/chrome/browser/cocoa/extensions/browser_action_button.mm b/chrome/browser/cocoa/extensions/browser_action_button.mm index cb3c8d6..914f11d 100644 --- a/chrome/browser/cocoa/extensions/browser_action_button.mm +++ b/chrome/browser/cocoa/extensions/browser_action_button.mm @@ -25,12 +25,12 @@ #include "skia/ext/skia_utils_mac.h" #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" -extern const NSString* kBrowserActionButtonUpdatedNotification = +NSString* const kBrowserActionButtonUpdatedNotification = @"BrowserActionButtonUpdatedNotification"; -extern const NSString* kBrowserActionButtonDraggingNotification = +NSString* const kBrowserActionButtonDraggingNotification = @"BrowserActionButtonDraggingNotification"; -extern const NSString* kBrowserActionButtonDragEndNotification = +NSString* const kBrowserActionButtonDragEndNotification = @"BrowserActionButtonDragEndNotification"; static const CGFloat kBrowserActionBadgeOriginYOffset = 5; diff --git a/chrome/browser/cocoa/extensions/browser_actions_container_view.h b/chrome/browser/cocoa/extensions/browser_actions_container_view.h index d91a185..a1184e2 100644 --- a/chrome/browser/cocoa/extensions/browser_actions_container_view.h +++ b/chrome/browser/cocoa/extensions/browser_actions_container_view.h @@ -8,13 +8,13 @@ #import <Cocoa/Cocoa.h> // Sent when a user-initiated drag to resize the container is initiated. -extern const NSString* kBrowserActionGrippyDragStartedNotification; +extern NSString* const kBrowserActionGrippyDragStartedNotification; // Sent when a user-initiated drag is resizing the container. -extern const NSString* kBrowserActionGrippyDraggingNotification; +extern NSString* const kBrowserActionGrippyDraggingNotification; // Sent when a user-initiated drag to resize the container has finished. -extern const NSString* kBrowserActionGrippyDragFinishedNotification; +extern NSString* const kBrowserActionGrippyDragFinishedNotification; // The view that encompasses the Browser Action buttons in the toolbar and // provides mechanisms for resizing. diff --git a/chrome/browser/cocoa/extensions/browser_actions_container_view.mm b/chrome/browser/cocoa/extensions/browser_actions_container_view.mm index e2576f1..cf5087a 100644 --- a/chrome/browser/cocoa/extensions/browser_actions_container_view.mm +++ b/chrome/browser/cocoa/extensions/browser_actions_container_view.mm @@ -9,11 +9,11 @@ #include "base/logging.h" #import "base/scoped_nsobject.h" -extern const NSString* kBrowserActionGrippyDragStartedNotification = +NSString* const kBrowserActionGrippyDragStartedNotification = @"BrowserActionGrippyDragStartedNotification"; -extern const NSString* kBrowserActionGrippyDraggingNotification = +NSString* const kBrowserActionGrippyDraggingNotification = @"BrowserActionGrippyDraggingNotification"; -extern const NSString* kBrowserActionGrippyDragFinishedNotification = +NSString* const kBrowserActionGrippyDragFinishedNotification = @"BrowserActionGrippyDragFinishedNotification"; namespace { diff --git a/chrome/browser/cocoa/extensions/browser_actions_controller.h b/chrome/browser/cocoa/extensions/browser_actions_controller.h index 1c594b9..5638ede 100644 --- a/chrome/browser/cocoa/extensions/browser_actions_controller.h +++ b/chrome/browser/cocoa/extensions/browser_actions_controller.h @@ -25,7 +25,7 @@ class Profile; extern const CGFloat kBrowserActionButtonPadding; // Sent when the visibility of the Browser Actions changes. -extern const NSString* kBrowserActionVisibilityChangedNotification; +extern NSString* const kBrowserActionVisibilityChangedNotification; // Handles state and provides an interface for controlling the Browser Actions // container within the Toolbar. diff --git a/chrome/browser/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/cocoa/extensions/browser_actions_controller.mm index 68ed120..b3ba5c3 100644 --- a/chrome/browser/cocoa/extensions/browser_actions_controller.mm +++ b/chrome/browser/cocoa/extensions/browser_actions_controller.mm @@ -30,7 +30,7 @@ const CGFloat kBrowserActionButtonPadding = 3; -extern const NSString* kBrowserActionVisibilityChangedNotification = +NSString* const kBrowserActionVisibilityChangedNotification = @"BrowserActionVisibilityChangedNotification"; namespace { diff --git a/chrome/browser/cocoa/extensions/extension_install_prompt_controller.h b/chrome/browser/cocoa/extensions/extension_install_prompt_controller.h index 1d63ea5..fce4ac3 100644 --- a/chrome/browser/cocoa/extensions/extension_install_prompt_controller.h +++ b/chrome/browser/cocoa/extensions/extension_install_prompt_controller.h @@ -38,13 +38,13 @@ class Profile; SkBitmap icon_; } -@property (readonly) NSImageView* iconView; -@property (readonly) NSTextField* titleField; -@property (readonly) NSTextField* subtitleField; -@property (readonly) NSTextField* warningsField; -@property (readonly) NSBox* warningsBox; -@property (readonly) NSButton* cancelButton; -@property (readonly) NSButton* okButton; +@property (nonatomic, readonly) NSImageView* iconView; +@property (nonatomic, readonly) NSTextField* titleField; +@property (nonatomic, readonly) NSTextField* subtitleField; +@property (nonatomic, readonly) NSTextField* warningsField; +@property (nonatomic, readonly) NSBox* warningsBox; +@property (nonatomic, readonly) NSButton* cancelButton; +@property (nonatomic, readonly) NSButton* okButton; - (id)initWithParentWindow:(NSWindow*)window profile:(Profile*)profile diff --git a/chrome/browser/cocoa/find_bar_view_unittest.mm b/chrome/browser/cocoa/find_bar_view_unittest.mm index cfc9ca7..c4fb773 100644 --- a/chrome/browser/cocoa/find_bar_view_unittest.mm +++ b/chrome/browser/cocoa/find_bar_view_unittest.mm @@ -14,7 +14,7 @@ @interface MouseDownViewPong : NSView { BOOL pong_; } -@property(assign) BOOL pong; +@property (nonatomic, assign) BOOL pong; @end @implementation MouseDownViewPong diff --git a/chrome/browser/cocoa/first_run_dialog.h b/chrome/browser/cocoa/first_run_dialog.h index 90b56d9..807d8b0 100644 --- a/chrome/browser/cocoa/first_run_dialog.h +++ b/chrome/browser/cocoa/first_run_dialog.h @@ -36,14 +36,14 @@ - (IBAction)learnMore:(id)sender; // Properties for bindings. -@property(assign) BOOL userDidCancel; -@property(assign) BOOL statsEnabled; -@property(assign) BOOL statsCheckboxHidden; -@property(assign) BOOL makeDefaultBrowser; -@property(assign) BOOL importBookmarks; -@property(assign) int browserImportSelectedIndex; -@property(retain) NSArray* browserImportList; -@property(assign) BOOL browserImportListHidden; +@property(assign, nonatomic) BOOL userDidCancel; +@property(assign, nonatomic) BOOL statsEnabled; +@property(assign, nonatomic) BOOL statsCheckboxHidden; +@property(assign, nonatomic) BOOL makeDefaultBrowser; +@property(assign, nonatomic) BOOL importBookmarks; +@property(assign, nonatomic) int browserImportSelectedIndex; +@property(retain, nonatomic) NSArray* browserImportList; +@property(assign, nonatomic) BOOL browserImportListHidden; @end diff --git a/chrome/browser/cocoa/hover_close_button.mm b/chrome/browser/cocoa/hover_close_button.mm index 996a5ca..ee6e609 100644 --- a/chrome/browser/cocoa/hover_close_button.mm +++ b/chrome/browser/cocoa/hover_close_button.mm @@ -10,11 +10,11 @@ namespace { -const NSString* kNormalImageString = @"close_bar.pdf"; -const NSString* kHoverImageString = @"close_bar_h.pdf"; -const NSString* kPressedImageString = @"close_bar_p.pdf"; +NSString* const kNormalImageString = @"close_bar.pdf"; +NSString* const kHoverImageString = @"close_bar_h.pdf"; +NSString* const kPressedImageString = @"close_bar_p.pdf"; -} +} // namespace @implementation HoverCloseButton diff --git a/chrome/browser/cocoa/hyperlink_button_cell.h b/chrome/browser/cocoa/hyperlink_button_cell.h index ec22a12..c4d27ff 100644 --- a/chrome/browser/cocoa/hyperlink_button_cell.h +++ b/chrome/browser/cocoa/hyperlink_button_cell.h @@ -18,7 +18,7 @@ @interface HyperlinkButtonCell : NSButtonCell { scoped_nsobject<NSColor> textColor_; } -@property (retain) NSColor* textColor; +@property (nonatomic, retain) NSColor* textColor; + (NSColor*)defaultTextColor; diff --git a/chrome/browser/cocoa/import_progress_dialog.h b/chrome/browser/cocoa/import_progress_dialog.h index 72f2cc2..f3f69a1 100644 --- a/chrome/browser/cocoa/import_progress_dialog.h +++ b/chrome/browser/cocoa/import_progress_dialog.h @@ -51,16 +51,16 @@ class ImporterObserverBridge; - (void)ImportItemEnded:(importer::ImportItem)item; - (void)ImportEnded; -@property(retain) NSString* explanatoryText; -@property(retain) NSString* favoritesStatusText; -@property(retain) NSString* searchStatusText; -@property(retain) NSString* savedPasswordStatusText; -@property(retain) NSString* historyStatusText; - -@property(retain) NSColor* favoritesImportEnabled; -@property(retain) NSColor* searchImportEnabled; -@property(retain) NSColor* passwordImportEnabled; -@property(retain) NSColor* historyImportEnabled; +@property (nonatomic, retain) NSString* explanatoryText; +@property (nonatomic, retain) NSString* favoritesStatusText; +@property (nonatomic, retain) NSString* searchStatusText; +@property (nonatomic, retain) NSString* savedPasswordStatusText; +@property (nonatomic, retain) NSString* historyStatusText; + +@property (nonatomic, retain) NSColor* favoritesImportEnabled; +@property (nonatomic, retain) NSColor* searchImportEnabled; +@property (nonatomic, retain) NSColor* passwordImportEnabled; +@property (nonatomic, retain) NSColor* historyImportEnabled; @end diff --git a/chrome/browser/cocoa/info_bubble_window.h b/chrome/browser/cocoa/info_bubble_window.h index e5052c7..e8d8096 100644 --- a/chrome/browser/cocoa/info_bubble_window.h +++ b/chrome/browser/cocoa/info_bubble_window.h @@ -27,6 +27,6 @@ class AppNotificationBridge; // after the closing animation has completed. - (BOOL)isClosing; -@property BOOL delayOnClose; +@property (nonatomic) BOOL delayOnClose; @end diff --git a/chrome/browser/cocoa/infobar_controller.h b/chrome/browser/cocoa/infobar_controller.h index ef2891e..9d557cf 100644 --- a/chrome/browser/cocoa/infobar_controller.h +++ b/chrome/browser/cocoa/infobar_controller.h @@ -73,8 +73,8 @@ class InfoBarDelegate; // Sets the info bar message to the specified |message|. - (void)setLabelToMessage:(NSString*)message; -@property(assign, nonatomic) id<InfoBarContainer> containerController; -@property(readonly) InfoBarDelegate* delegate; +@property(nonatomic, assign) id<InfoBarContainer> containerController; +@property(nonatomic, readonly) InfoBarDelegate* delegate; @end diff --git a/chrome/browser/cocoa/keystone_glue.h b/chrome/browser/cocoa/keystone_glue.h index 2848681..eaf84e5 100644 --- a/chrome/browser/cocoa/keystone_glue.h +++ b/chrome/browser/cocoa/keystone_glue.h @@ -39,17 +39,18 @@ enum AutoupdateStatus { // value as an intValue at key kAutoupdateStatusStatus. If a version is // available (see AutoupdateStatus), it will be present at key // kAutoupdateStatusVersion. -extern const NSString* const kAutoupdateStatusNotification; -extern const NSString* const kAutoupdateStatusStatus; -extern const NSString* const kAutoupdateStatusVersion; +extern NSString* const kAutoupdateStatusNotification; +extern NSString* const kAutoupdateStatusStatus; +extern NSString* const kAutoupdateStatusVersion; namespace { - enum BrandFileType { - kBrandFileTypeNotDetermined = 0, - kBrandFileTypeNone, - kBrandFileTypeUser, - kBrandFileTypeSystem, - }; + +enum BrandFileType { + kBrandFileTypeNotDetermined = 0, + kBrandFileTypeNone, + kBrandFileTypeUser, + kBrandFileTypeSystem, +}; } // namespace diff --git a/chrome/browser/cocoa/keystone_glue.mm b/chrome/browser/cocoa/keystone_glue.mm index bcd78f4..a412fc9 100644 --- a/chrome/browser/cocoa/keystone_glue.mm +++ b/chrome/browser/cocoa/keystone_glue.mm @@ -32,33 +32,35 @@ typedef enum { kKSRegistrationDontKnowWhatKindOfTicket, } KSRegistrationTicketType; -NSString* KSRegistrationVersionKey = @"Version"; -NSString* KSRegistrationExistenceCheckerTypeKey = @"ExistenceCheckerType"; -NSString* KSRegistrationExistenceCheckerStringKey = @"ExistenceCheckerString"; -NSString* KSRegistrationServerURLStringKey = @"URLString"; -NSString* KSRegistrationPreserveTrustedTesterTokenKey = @"PreserveTTT"; -NSString* KSRegistrationTagKey = @"Tag"; -NSString* KSRegistrationTagPathKey = @"TagPath"; -NSString* KSRegistrationTagKeyKey = @"TagKey"; -NSString* KSRegistrationBrandPathKey = @"BrandPath"; -NSString* KSRegistrationBrandKeyKey = @"BrandKey"; - -NSString *KSRegistrationDidCompleteNotification = +NSString* const KSRegistrationVersionKey = @"Version"; +NSString* const KSRegistrationExistenceCheckerTypeKey = @"ExistenceCheckerType"; +NSString* const KSRegistrationExistenceCheckerStringKey = + @"ExistenceCheckerString"; +NSString* const KSRegistrationServerURLStringKey = @"URLString"; +NSString* const KSRegistrationPreserveTrustedTesterTokenKey = @"PreserveTTT"; +NSString* const KSRegistrationTagKey = @"Tag"; +NSString* const KSRegistrationTagPathKey = @"TagPath"; +NSString* const KSRegistrationTagKeyKey = @"TagKey"; +NSString* const KSRegistrationBrandPathKey = @"BrandPath"; +NSString* const KSRegistrationBrandKeyKey = @"BrandKey"; + +NSString* const KSRegistrationDidCompleteNotification = @"KSRegistrationDidCompleteNotification"; -NSString *KSRegistrationPromotionDidCompleteNotification = +NSString* const KSRegistrationPromotionDidCompleteNotification = @"KSRegistrationPromotionDidCompleteNotification"; -NSString *KSRegistrationCheckForUpdateNotification = +NSString* const KSRegistrationCheckForUpdateNotification = @"KSRegistrationCheckForUpdateNotification"; -NSString *KSRegistrationStatusKey = @"Status"; -NSString *KSRegistrationUpdateCheckErrorKey = @"Error"; +NSString* KSRegistrationStatusKey = @"Status"; +NSString* KSRegistrationUpdateCheckErrorKey = @"Error"; -NSString *KSRegistrationStartUpdateNotification = +NSString* const KSRegistrationStartUpdateNotification = @"KSRegistrationStartUpdateNotification"; -NSString *KSUpdateCheckSuccessfulKey = @"CheckSuccessful"; -NSString *KSUpdateCheckSuccessfullyInstalledKey = @"SuccessfullyInstalled"; +NSString* const KSUpdateCheckSuccessfulKey = @"CheckSuccessful"; +NSString* const KSUpdateCheckSuccessfullyInstalledKey = + @"SuccessfullyInstalled"; -NSString *KSRegistrationRemoveExistingTag = @""; +NSString* const KSRegistrationRemoveExistingTag = @""; #define KSRegistrationPreserveExistingTag nil // Constants for the brand file (uses an external file so it can survive updates @@ -175,15 +177,14 @@ NSString* SystemBrandFilePath() { @end // @interface KeystoneGlue(Private) -const NSString* const kAutoupdateStatusNotification = - @"AutoupdateStatusNotification"; -const NSString* const kAutoupdateStatusStatus = @"status"; -const NSString* const kAutoupdateStatusVersion = @"version"; +NSString* const kAutoupdateStatusNotification = @"AutoupdateStatusNotification"; +NSString* const kAutoupdateStatusStatus = @"status"; +NSString* const kAutoupdateStatusVersion = @"version"; namespace { -const NSString* const kChannelKey = @"KSChannelID"; -const NSString* const kBrandKey = @"KSBrandID"; +NSString* const kChannelKey = @"KSChannelID"; +NSString* const kBrandKey = @"KSBrandID"; } // namespace diff --git a/chrome/browser/cocoa/keyword_editor_cocoa_controller.h b/chrome/browser/cocoa/keyword_editor_cocoa_controller.h index d6192f2..d4c0390 100644 --- a/chrome/browser/cocoa/keyword_editor_cocoa_controller.h +++ b/chrome/browser/cocoa/keyword_editor_cocoa_controller.h @@ -81,7 +81,7 @@ class KeywordEditorModelObserver : public TemplateURLModelObserver, scoped_nsobject<WindowSizeAutosaver> sizeSaver_; } -@property (readonly) KeywordEditorController* controller; +@property (nonatomic, readonly) KeywordEditorController* controller; // Show the keyword editor associated with the given profile (or the // original profile if this is an incognito profile). If no keyword diff --git a/chrome/browser/cocoa/location_bar_view_mac.h b/chrome/browser/cocoa/location_bar_view_mac.h index 74c0451..ef8f0c3 100644 --- a/chrome/browser/cocoa/location_bar_view_mac.h +++ b/chrome/browser/cocoa/location_bar_view_mac.h @@ -163,8 +163,8 @@ class LocationBarViewMac : public AutocompleteEditController, // before the visibility is set to |true|. void SetVisible(bool visible); - const NSImage* GetImage() const { return image_; } - const NSAttributedString* GetLabel() const { return label_; } + NSImage* GetImage() const { return image_; } + NSAttributedString* GetLabel() const { return label_; } bool IsVisible() const { return visible_; } // Default size when no image is present. @@ -174,7 +174,7 @@ class LocationBarViewMac : public AutocompleteEditController, NSSize GetImageSize() const; // Returns the tooltip for this image view or |nil| if there is none. - virtual const NSString* GetToolTip() { return nil; } + virtual NSString* GetToolTip() { return nil; } // Used to determinate if the item can act as a drag source. virtual bool IsDraggable() { return false; } @@ -233,7 +233,7 @@ class LocationBarViewMac : public AutocompleteEditController, // Set the image and tooltip based on |starred|. void SetStarred(bool starred); - virtual const NSString* GetToolTip(); + virtual NSString* GetToolTip(); private: // For bringing up bookmark bar. @@ -287,7 +287,7 @@ class LocationBarViewMac : public AutocompleteEditController, void SetToolTip(std::string tooltip); // Returns the tooltip for this Page Action image or |nil| if there is none. - virtual const NSString* GetToolTip(); + virtual NSString* GetToolTip(); // Overridden to return a menu. virtual NSMenu* GetMenu(); @@ -360,7 +360,7 @@ class LocationBarViewMac : public AutocompleteEditController, void UpdateFromTabContents(const TabContents* tab_contents); // Returns the tooltip for this Page Action image or |nil| if there is none. - virtual const NSString* GetToolTip(); + virtual NSString* GetToolTip(); private: void SetToolTip(NSString* tooltip); @@ -421,7 +421,7 @@ class LocationBarViewMac : public AutocompleteEditController, void SetSecurityLabel(); // Posts |notification| to the default notification center. - void PostNotification(const NSString* notification); + void PostNotification(NSString* notification); // Updates visibility of the content settings icons based on the current // tab contents state. diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm index 9be750a..fd4d87a 100644 --- a/chrome/browser/cocoa/location_bar_view_mac.mm +++ b/chrome/browser/cocoa/location_bar_view_mac.mm @@ -492,7 +492,7 @@ void LocationBarViewMac::Observe(NotificationType type, } } -void LocationBarViewMac::PostNotification(const NSString* notification) { +void LocationBarViewMac::PostNotification(NSString* notification) { [[NSNotificationCenter defaultCenter] postNotificationName:notification object:[NSValue valueWithPointer:this]]; } @@ -625,7 +625,7 @@ void LocationBarViewMac::StarIconView::OnMousePressed(NSRect bounds) { command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); } -const NSString* LocationBarViewMac::StarIconView::GetToolTip() { +NSString* LocationBarViewMac::StarIconView::GetToolTip() { return tooltip_.get(); } @@ -791,7 +791,7 @@ void LocationBarViewMac::PageActionImageView::SetToolTip(std::string tooltip) { SetToolTip(base::SysUTF8ToNSString(tooltip)); } -const NSString* LocationBarViewMac::PageActionImageView::GetToolTip() { +NSString* LocationBarViewMac::PageActionImageView::GetToolTip() { return tooltip_.get(); } @@ -874,7 +874,7 @@ void LocationBarViewMac::ContentSettingImageView::OnMousePressed(NSRect bounds) anchoredAt:anchor] showWindow:nil]; } -const NSString* LocationBarViewMac::ContentSettingImageView::GetToolTip() { +NSString* LocationBarViewMac::ContentSettingImageView::GetToolTip() { return tooltip_.get(); } diff --git a/chrome/browser/cocoa/preferences_window_controller.h b/chrome/browser/cocoa/preferences_window_controller.h index 5c968bf..70bd8ff 100644 --- a/chrome/browser/cocoa/preferences_window_controller.h +++ b/chrome/browser/cocoa/preferences_window_controller.h @@ -161,7 +161,7 @@ class ProfileSyncService; - (IBAction)toolbarButtonSelected:(id)sender; // Usable from cocoa bindings to hook up the custom home pages table. -@property(readonly) CustomHomePagesModel* customPagesSource; +@property (nonatomic, readonly) CustomHomePagesModel* customPagesSource; @end diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm index 7906243..a286c4d 100644 --- a/chrome/browser/cocoa/status_bubble_mac.mm +++ b/chrome/browser/cocoa/status_bubble_mac.mm @@ -32,7 +32,7 @@ const int kMousePadding = 20; const int kTextPadding = 3; // The animation key used for fade-in and fade-out transitions. -const NSString* kFadeAnimationKey = @"alphaValue"; +NSString* const kFadeAnimationKey = @"alphaValue"; // The status bubble's maximum opacity, when fully faded in. const CGFloat kBubbleOpacity = 1.0; diff --git a/chrome/browser/cocoa/styled_text_field_test_helper.h b/chrome/browser/cocoa/styled_text_field_test_helper.h index 20788d4..d4b356e 100644 --- a/chrome/browser/cocoa/styled_text_field_test_helper.h +++ b/chrome/browser/cocoa/styled_text_field_test_helper.h @@ -11,6 +11,6 @@ CGFloat leftMargin_; CGFloat rightMargin_; } -@property(assign) CGFloat leftMargin; -@property(assign) CGFloat rightMargin; +@property (nonatomic, assign) CGFloat leftMargin; +@property (nonatomic, assign) CGFloat rightMargin; @end diff --git a/chrome/browser/cocoa/sync_customize_controller.h b/chrome/browser/cocoa/sync_customize_controller.h index da22203..7115ed385 100644 --- a/chrome/browser/cocoa/sync_customize_controller.h +++ b/chrome/browser/cocoa/sync_customize_controller.h @@ -52,19 +52,19 @@ class ProfileSyncService; - (IBAction)endSheetWithOK:(id)sender; // Properties for bindings. -@property(assign) BOOL bookmarksRegistered; -@property(assign) BOOL preferencesRegistered; -@property(assign) BOOL autofillRegistered; -@property(assign) BOOL themesRegistered; -@property(assign) BOOL extensionsRegistered; - -@property(assign) BOOL bookmarksPreferred; -@property(assign) BOOL preferencesPreferred; -@property(assign) BOOL autofillPreferred; -@property(assign) BOOL themesPreferred; -@property(assign) BOOL extensionsPreferred; - -@property(readonly) BOOL okEnabled; +@property (nonatomic, assign) BOOL bookmarksRegistered; +@property (nonatomic, assign) BOOL preferencesRegistered; +@property (nonatomic, assign) BOOL autofillRegistered; +@property (nonatomic, assign) BOOL themesRegistered; +@property (nonatomic, assign) BOOL extensionsRegistered; + +@property (nonatomic, assign) BOOL bookmarksPreferred; +@property (nonatomic, assign) BOOL preferencesPreferred; +@property (nonatomic, assign) BOOL autofillPreferred; +@property (nonatomic, assign) BOOL themesPreferred; +@property (nonatomic, assign) BOOL extensionsPreferred; + +@property (nonatomic, readonly) BOOL okEnabled; @end diff --git a/chrome/browser/cocoa/view_resizer_pong.h b/chrome/browser/cocoa/view_resizer_pong.h index f5cd2e1..5b66151 100644 --- a/chrome/browser/cocoa/view_resizer_pong.h +++ b/chrome/browser/cocoa/view_resizer_pong.h @@ -13,7 +13,7 @@ @private CGFloat height_; } -@property CGFloat height; +@property (nonatomic) CGFloat height; - (void)resizeView:(NSView*)view newHeight:(CGFloat)height; @end diff --git a/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm b/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm index 955f86e..6d1ddf3 100644 --- a/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm +++ b/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm @@ -29,16 +29,16 @@ @end @interface CWNetwork : NSObject <NSCopying, NSCoding> -@property(readonly) NSString* ssid; -@property(readonly) NSString* bssid; -@property(readonly) NSData* bssidData; -@property(readonly) NSNumber* securityMode; -@property(readonly) NSNumber* phyMode; -@property(readonly) NSNumber* channel; -@property(readonly) NSNumber* rssi; -@property(readonly) NSNumber* noise; -@property(readonly) NSData* ieData; -@property(readonly) BOOL isIBSS; +@property (nonatomic, readonly) NSString* ssid; +@property (nonatomic, readonly) NSString* bssid; +@property (nonatomic, readonly) NSData* bssidData; +@property (nonatomic, readonly) NSNumber* securityMode; +@property (nonatomic, readonly) NSNumber* phyMode; +@property (nonatomic, readonly) NSNumber* channel; +@property (nonatomic, readonly) NSNumber* rssi; +@property (nonatomic, readonly) NSNumber* noise; +@property (nonatomic, readonly) NSData* ieData; +@property (nonatomic, readonly) BOOL isIBSS; - (BOOL)isEqualToNetwork:(CWNetwork*)network; @end |