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

Issue 10828364: Don't show the button for hidden page/browser actions or script badges. (Closed)

Created:
8 years, 4 months ago by Finnur
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Don't show the button for hidden page/browser actions or script badges. Browser Action, Page Actions and Script Badges can be hidden, which causes us to get invalid |button| and |frame| (respectively). We'll need to figure out what to do in these cases (on all platforms) but the minimum for now is to ignore the keystroke to avoid a crash. BUG=140396 TEST=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152321

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -5 lines) Patch
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Finnur
http://codereview.chromium.org/10828364/diff/2001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (left): http://codereview.chromium.org/10828364/diff/2001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm#oldcode413 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm:413: DCHECK(!NSIsEmptyRect(frame)); When I factored GetPageActionFrame out of GetPageActionBubblePoint, I ...
8 years, 4 months ago (2012-08-17 12:18:16 UTC) #1
Scott Hess - ex-Googler
lgtm. My comments are just morning grumpiness. http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm#newcode216 chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:216: // |button| ...
8 years, 4 months ago (2012-08-17 17:13:17 UTC) #2
Finnur
Made the changes. Will check in on green. http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm#newcode218 chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:218: [owner_ ...
8 years, 4 months ago (2012-08-20 11:41:45 UTC) #3
Finnur
http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm#newcode218 chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:218: [owner_ browserActionClicked:button]; Actually, I take that back (and reverted ...
8 years, 4 months ago (2012-08-20 14:03:34 UTC) #4
Scott Hess - ex-Googler
8 years, 4 months ago (2012-08-20 22:59:34 UTC) #5
http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/ext...
File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right):

http://codereview.chromium.org/10828364/diff/5001/chrome/browser/ui/cocoa/ext...
chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:218: [owner_
browserActionClicked:button];
Makes sense (I think).

On 2012/08/20 14:03:34, Finnur wrote:
> Actually, I take that back (and reverted this change).
> 
> Basically, changing it to browserActionClickedForExtension:extension causes a
> crash in other tests and it wasn't obvious why. We get back a NULL
> browser_action in ExtensionToolbarModel::ExecuteBrowserAction and it would (of
> course) crash trying to verify that it was visible. Anyway, this change was
> perhaps a bit orthogonal to the change at hand, so I'm taking this attempt out
> of the CL. If it passes green on the try servers (after reverting back) then
> I'll check in.
> 
> On 2012/08/20 11:41:45, Finnur wrote:
> > Yeah, it is a bit silly because the function actually doesn't want a
> > BrowserActionButton* since it converts |button| straight away to a const
> > Extension* and uses that. Changed that.
>

Powered by Google App Engine
This is Rietveld 408576698