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

Issue 7462018: [Mac] "Refactor" DraggableButton into a mixin and impl. (Closed)

Created:
9 years, 4 months ago by Robert Sesek
Modified:
9 years, 4 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews, asanka, Randy Smith (Not in Mondays)
Visibility:
Public.

Description

[Mac] "Refactor" DraggableButton into a mixin and impl. This is because DraggableButton inherits from NSButton when a future class will need it to inherit from NSPopupButton. Because ObjC lacks multiple inheritance, and we want to avoid runtime trickery, this is the result. BUG=none TEST=Dragging download shelf and bookmark bar items works as before. Partially covered by unit tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96433

Patch Set 1 #

Total comments: 15

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -379 lines) Patch
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm View 1 7 chunks +24 lines, -18 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_button.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/draggable_button.h View 1 1 chunk +13 lines, -71 lines 0 comments Download
M chrome/browser/ui/cocoa/draggable_button.mm View 2 chunks +10 lines, -190 lines 0 comments Download
A chrome/browser/ui/cocoa/draggable_button_mixin.h View 1 1 chunk +134 lines, -0 lines 0 comments Download
A + chrome/browser/ui/cocoa/draggable_button_mixin.mm View 1 6 chunks +155 lines, -94 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Robert Sesek
Enjoy :-D.
9 years, 4 months ago (2011-08-10 21:15:51 UTC) #1
Mark Mentovai
This isn’t nearly as bad as you made it out to be, although I can ...
9 years, 4 months ago (2011-08-11 00:51:17 UTC) #2
Robert Sesek
Addressed allays. http://codereview.chromium.org/7462018/diff/1/chrome/browser/ui/cocoa/draggable_button_mixin.h File chrome/browser/ui/cocoa/draggable_button_mixin.h (right): http://codereview.chromium.org/7462018/diff/1/chrome/browser/ui/cocoa/draggable_button_mixin.h#newcode57 chrome/browser/ui/cocoa/draggable_button_mixin.h:57: // Resets the draggable state of the ...
9 years, 4 months ago (2011-08-11 16:06:00 UTC) #3
Mark Mentovai
9 years, 4 months ago (2011-08-11 16:11:45 UTC) #4
LGTM

http://codereview.chromium.org/7462018/diff/1/chrome/browser/ui/cocoa/draggab...
File chrome/browser/ui/cocoa/draggable_button_mixin.h (right):

http://codereview.chromium.org/7462018/diff/1/chrome/browser/ui/cocoa/draggab...
chrome/browser/ui/cocoa/draggable_button_mixin.h:125: -
(DraggableButtonResult)mouseDown:(NSEvent*)event;
rsesek wrote:
> Why wouldn't this be "portable"? This inherits from NSObject, not NSResponder.

Oh yeah.

Powered by Google App Engine
This is Rietveld 408576698