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

Issue 155494: First cut at infobars on Mac. These are not expected to be... (Closed)

Created:
11 years, 5 months ago by rohitrao (ping after 24h)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

First cut at infobars on Mac. These are not expected to be pretty. Animations and aesthetic appeal will come in a future CL. BUG=http://crbug.com/14462 BUG=http://crbug.com/14937 BUG=http://crbug.com/15839 BUG=http://crbug.com/16487 TEST=Infobars should show up when expected. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=20930

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 18

Patch Set 6 : '' #

Total comments: 31

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 13

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1901 lines, -29 lines) Patch
A chrome/app/nibs/en.lproj/InfoBar.xib View 1 chunk +394 lines, -0 lines 0 comments Download
A chrome/app/nibs/en.lproj/InfoBarContainer.xib View 1 chunk +166 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm View 7 8 9 10 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.h View 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 6 7 8 9 10 5 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller_unittest.mm View 7 8 9 10 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 9 chunks +53 lines, -9 lines 0 comments Download
A chrome/browser/cocoa/infobar.h View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_container_controller.h View 8 9 1 chunk +80 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_container_controller.mm View 8 9 10 1 chunk +191 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_container_controller_unittest.mm View 9 10 1 chunk +123 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_controller.h View 1 2 3 4 5 6 7 8 9 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_controller.mm View 1 2 3 4 5 6 7 8 9 1 chunk +283 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_controller_unittest.mm View 3 4 5 6 7 8 9 1 chunk +191 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_test_helper.h View 1 chunk +152 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_text_field.h View 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_text_field.mm View 2 3 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/infobar_text_field_unittest.mm View 9 10 1 chunk +67 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller.h View 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller.mm View 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller_unittest.mm View 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/common/temp_scaffolding_stubs.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -18 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
rohitrao (ping after 24h)
I think this is ready for a look. They aren't pretty, but they work. I'll ...
11 years, 5 months ago (2009-07-14 20:43:28 UTC) #1
pink (ping after 24hrs)
LGTM with items below addressed. http://codereview.chromium.org/155494/diff/52/1043 File chrome/browser/cocoa/infobar.h (right): http://codereview.chromium.org/155494/diff/52/1043#newcode14 Line 14: // InfoBarDelegate::CreateInfoBar(). Callers ...
11 years, 5 months ago (2009-07-15 16:35:31 UTC) #2
rohitrao (ping after 24h)
I wasn't correctly handling bookmark bar toggling before, so I added code to handle that. ...
11 years, 5 months ago (2009-07-15 19:28:24 UTC) #3
pink (ping after 24hrs)
still lgtm, will defer to jrg on resizing stuff. http://codereview.chromium.org/155494/diff/1059/1062 File chrome/browser/cocoa/infobar.h (right): http://codereview.chromium.org/155494/diff/1059/1062#newcode27 Line ...
11 years, 5 months ago (2009-07-15 19:58:02 UTC) #4
John Grabowski
Quite a lot of work here! I'm disappointed to have initiated awkwardness with the bookmark ...
11 years, 5 months ago (2009-07-15 20:13:13 UTC) #5
John Grabowski
Did a quick scan of your CL (mostly headers); new files and "v7" changes. I ...
11 years, 5 months ago (2009-07-16 00:16:41 UTC) #6
rohitrao (ping after 24h)
This is ready for a real look. I've punted on the resizing/positioning TODOs, but I ...
11 years, 5 months ago (2009-07-16 03:56:46 UTC) #7
John Grabowski
LGTM Great job Rohit; this is a monster CL. http://codereview.chromium.org/155494/diff/1059/1068 File chrome/browser/cocoa/infobar_text_field.mm (right): http://codereview.chromium.org/155494/diff/1059/1068#newcode11 Line ...
11 years, 5 months ago (2009-07-17 01:07:43 UTC) #8
rohitrao (ping after 24h)
11 years, 5 months ago (2009-07-17 03:19:36 UTC) #9
http://codereview.chromium.org/155494/diff/1164/134
File chrome/browser/cocoa/browser_window_controller.h (right):

http://codereview.chromium.org/155494/diff/1164/134#newcode129
Line 129: - (void)resizeInfoBarView:(float)newHeight;
On 2009/07/17 01:07:43, John Grabowski wrote:
> nit: the method is named like a command; "resizeInfoBarView" implies "do it". 
> Perhaps a gentler name, like infoBarViewResized:, might be more clear.  See
the
> method below this (userChangedTheme) for an example.
> Note you added a method to browser_window_controller called positionInfoBar
> which IS a command (and sounds like one).

Done.

http://codereview.chromium.org/155494/diff/1164/126
File chrome/browser/cocoa/browser_window_controller.mm (right):

http://codereview.chromium.org/155494/diff/1164/126#newcode192
Line 192: [[NSNotificationCenter defaultCenter]
On 2009/07/17 01:07:43, John Grabowski wrote:
> Not your fault, I know, but it looks like we need a removeObserver:self call
in
> our dealloc.
> 

I think I put this code in, so it probably is my fault =)
Done.

http://codereview.chromium.org/155494/diff/1164/135
File chrome/browser/cocoa/infobar_container_controller.mm (right):

http://codereview.chromium.org/155494/diff/1164/135#newcode83
Line 83: DCHECK([infobarControllers_ count] == 0);
On 2009/07/17 01:07:43, John Grabowski wrote:
> Do we need a line like this here:
> registrar_.RemoveAll();
> to be sure we're not observing notifications anymore (e.g. nobody has a
pointer
> to us?)

The NotificationRegistrar calls RemoveAll() for us when it's destroyed.

http://codereview.chromium.org/155494/diff/1164/135#newcode184
Line 184: [view setFrame:frame];
On 2009/07/17 01:07:43, John Grabowski wrote:
> Add TODO(rohit,jrg): consider animators once coordinated

Done.

http://codereview.chromium.org/155494/diff/1164/124
File chrome/browser/cocoa/infobar_controller.h (right):

http://codereview.chromium.org/155494/diff/1164/124#newcode16
Line 16: InfoBarContainerController* containerController_;  // weak, owns us
On 2009/07/17 01:07:43, John Grabowski wrote:
> Couldn't find where this gets assigned.  And it's private so it must be in
> infobar_controller.mm.

It's in [InfoBarContainerController addInfoBar], where we call CreateInfoBar()
and then set its container.

Powered by Google App Engine
This is Rietveld 408576698