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

Issue 175025: Add a bare-bones extension shelf that displays extension items on OS X. (Closed)

Created:
11 years, 3 months ago by Nico
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, Pam (message me for reviews), Paweł Hajdan Jr.
Visibility:
Public.

Description

Add a bare-bones extension shelf that displays extension items on OS X. This brings our extension support to about the level it has on linux. One issue is that the toolstrips are webpages with a background image that just happens to look like the shelf they are on. But the background images are not updated on key->nonkey window changes, so the toolstrip backgrounds look slightly off in one of the two cases. If we decide to keep the shelf, we should fix this, but see the bug for erikkay's stance on this. Also, the NTP is only loaded after all toolstrips have been loaded for some reason. That's what happens on the other platforms too, I believe. The extension shelf uses the DownloadShelfView as background view for now. Screenie: http://imgur.com/wSHgU.png BUG=19073 TEST=Extensions that live in the shelf should show up. They should be clickable, resize correctly (e.g. the build status extension), and the shelf should interact in a sane way with the status bubble. Committed as http://src.chromium.org/viewvc/chrome?view=rev&revision=26311 .

Patch Set 1 #

Patch Set 2 : Does no longer hang chromium when starting up. #

Patch Set 3 : Something shows up. #

Patch Set 4 : Now that stuff works, remove most logging. Some cleanups. Merge ToT. #

Patch Set 5 : Update width of items correctly, set background, support more than one shelf extension #

Patch Set 6 : Draw tabstrip background that fits to shelf #

Patch Set 7 : Layout extension items on shelf #

Patch Set 8 : Status bubble is happy now, and toolstrips are no longer on the divider line #

Patch Set 9 : Fix DCHECK in renderer. #

Patch Set 10 : Fix new test #

Patch Set 11 : Merge ToT #

Patch Set 12 : merge casualties #

Patch Set 13 : Remove printfs #

Patch Set 14 : fewer leaks #

Patch Set 15 : do not performSelector:afterDelay: #

Patch Set 16 : hopefully fix ui_tests #

Total comments: 33

Patch Set 17 : Address comments #

Patch Set 18 : Merge ToT #

Total comments: 32

Patch Set 19 : Address some comments #

Total comments: 10

Patch Set 20 : Merge ToT, address more comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+858 lines, -30 lines) Patch
A chrome/app/nibs/ExtensionShelf.xib View 1 2 3 4 1 chunk +194 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 11 12 13 14 15 16 2 chunks +3 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 11 12 13 14 15 16 17 18 19 7 chunks +28 lines, -11 lines 0 comments Download
A chrome/browser/cocoa/extension_shelf_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/extension_shelf_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +356 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/extension_shelf_controller_unittest.mm View 19 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/extension_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/extension_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +68 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/status_bubble_mac.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/status_bubble_mac.mm View 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +11 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Nico
This is based on Pawel's work to make this work on Linux. Thanks, Pawel! Erik, ...
11 years, 3 months ago (2009-09-04 02:14:40 UTC) #1
pink (ping after 24hrs)
http://codereview.chromium.org/175025/diff/15015/15017 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/175025/diff/15015/15017#newcode74 Line 74: CGFloat verticalOffsetForStatusBubble; member vars end in an underscore ...
11 years, 3 months ago (2009-09-04 17:08:06 UTC) #2
Nico
Thanks for the review. http://codereview.chromium.org/175025/diff/15015/15017 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/175025/diff/15015/15017#newcode74 Line 74: CGFloat verticalOffsetForStatusBubble; On 2009/09/04 ...
11 years, 3 months ago (2009-09-05 01:34:34 UTC) #3
pink (ping after 24hrs)
http://codereview.chromium.org/175025/diff/14020/15047 File chrome/browser/cocoa/extension_shelf_controller.h (right): http://codereview.chromium.org/175025/diff/14020/15047#newcode14 Line 14: // insert it's |view| into a superview and ...
11 years, 3 months ago (2009-09-08 18:46:17 UTC) #4
Erik does not do reviews
http://codereview.chromium.org/175025/diff/14020/15046 File chrome/browser/cocoa/browser_window_controller.mm (right): http://codereview.chromium.org/175025/diff/14020/15046#newcode481 Line 481: // |downloadShelfController_| may be nil. extensionShelfController_ may also ...
11 years, 3 months ago (2009-09-09 00:04:04 UTC) #5
Nico
I added a basic test for the controller. Other than that, I fear my comments ...
11 years, 3 months ago (2009-09-13 07:09:59 UTC) #6
Nico
Ping.
11 years, 3 months ago (2009-09-15 18:12:46 UTC) #7
Erik does not do reviews
extension code LGTM http://codereview.chromium.org/175025/diff/14020/15053 File chrome/browser/extensions/extension_host.cc (right): http://codereview.chromium.org/175025/diff/14020/15053#newcode69 Line 69: view_.reset(new ExtensionViewMac(this, browser)); On 2009/09/13 ...
11 years, 3 months ago (2009-09-15 18:21:54 UTC) #8
pink (ping after 24hrs)
LGTM with nits. http://codereview.chromium.org/175025/diff/15063/19005 File chrome/browser/cocoa/extension_shelf_controller.mm (right): http://codereview.chromium.org/175025/diff/15063/19005#newcode63 Line 63: Browser* browser_; comment on other ...
11 years, 3 months ago (2009-09-15 19:03:43 UTC) #9
Nico
11 years, 3 months ago (2009-09-15 23:15:22 UTC) #10
Thanks. Will land this today.

http://codereview.chromium.org/175025/diff/14020/15053
File chrome/browser/extensions/extension_host.cc (right):

http://codereview.chromium.org/175025/diff/14020/15053#newcode69
Line 69: view_.reset(new ExtensionViewMac(this, browser));
On 2009/09/15 18:21:54, Erik Kay wrote:
> On 2009/09/13 07:09:59, Nico wrote:
> > My thinking was that a common api would make sense, but it would also slow
> down
> > the speed the extension team can iterate on this. As far as I understand,
> > they're not sure how all this will look in the end, and making them change
an
> > interface and 3 platforms sounds like it'd slow down experimentation. (right
> now
> > there are a few things
> > 
> > And when they're done experimenting, I'd rather have the extension team
define
> > an interface instead of someone who is not very familiar with this code.
> > 
> > Since Erik agrees, these assumptions were wrong :-), so I can extract an
> > interface. But I'd prefer to do it in a separate CL, as this one is already
> > pretty big (I will extract the interface within a week of landing this CL.
> 
> Why don't you add a TODO with a bug and assign it to me.
> 

Done.

http://codereview.chromium.org/175025/diff/15063/19005
File chrome/browser/cocoa/extension_shelf_controller.mm (right):

http://codereview.chromium.org/175025/diff/15063/19005#newcode63
Line 63: Browser* browser_;
On 2009/09/15 19:03:43, pink wrote:
> comment on other weak references here and below

Done.

http://codereview.chromium.org/175025/diff/15063/19005#newcode112
Line 112: ExtensionHost* host_;
On 2009/09/15 19:03:43, pink wrote:
> weak reference should be commented.

Done.

http://codereview.chromium.org/175025/diff/15063/19005#newcode275
Line 275: CGFloat x = 0;
On 2009/09/15 19:03:43, pink wrote:
> comment about how this lays out the tab strips horizontally and how the height
> gets adjusted. I initially assumed they'd be vertical since we're adjusting
the
> height, but clearly that's not the case.

Done.

http://codereview.chromium.org/175025/diff/15063/19006
File chrome/browser/cocoa/extension_shelf_controller_unittest.mm (right):

http://codereview.chromium.org/175025/diff/15063/19006#newcode28
Line 28: scoped_nsobject<ExtensionShelfController> controller_;
On 2009/09/15 19:03:43, pink wrote:
> this should go after the browser helper so it doesn't outlive it.

Oh, good point. Done.

http://codereview.chromium.org/175025/diff/15063/19007
File chrome/browser/cocoa/extension_view_mac.h (right):

http://codereview.chromium.org/175025/diff/15063/19007#newcode54
Line 54: Browser* browser_;
On 2009/09/15 19:03:43, pink wrote:
> assuming these are weak, they should be commented as such.

Done.

Powered by Google App Engine
This is Rietveld 408576698