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

Issue 525098: [Mac] Implements context menus for Page Actions. Introduces a reusable subcla... (Closed)

Created:
10 years, 11 months ago by Bons
Modified:
9 years, 5 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Aaron Boodman, pam+watch_chromium.org, Erik does not do reviews, ben+cc_chromium.org
Visibility:
Public.

Description

[Mac] Implements context menus for Page and Browser Actions. Introduces a reusable subclass of NSMenu that is used by both. BUG=30655 TEST=Right click on any Page action or Browser Action, observe a context menu appears. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=36021

Patch Set 1 #

Patch Set 2 : Including missing .gypi file... #

Total comments: 20

Patch Set 3 : Adding asyncronous icon loading... #

Patch Set 4 : Pam's comments. More cleanup. #

Patch Set 5 : Browser action menus enabled. #

Total comments: 6

Patch Set 6 : Final changes before submit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -37 lines) Patch
M chrome/browser/cocoa/autocomplete_text_field.mm View 1 2 3 4 5 3 chunks +15 lines, -13 lines 0 comments Download
M chrome/browser/cocoa/autocomplete_text_field_cell.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/autocomplete_text_field_cell.mm View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/autocomplete_text_field_editor.mm View 1 2 3 4 5 2 chunks +44 lines, -4 lines 0 comments Download
M chrome/browser/cocoa/extensions/browser_actions_controller.mm View 5 9 chunks +24 lines, -20 lines 0 comments Download
A chrome/browser/cocoa/extensions/extension_action_context_menu.h View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/extensions/extension_action_context_menu.mm View 1 2 3 1 chunk +195 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Bons
10 years, 11 months ago (2010-01-07 21:39:21 UTC) #1
Mark Mentovai
LG, coupla no-big-deal comments, coupla questions. http://codereview.chromium.org/525098/diff/3001/3006 File chrome/browser/cocoa/autocomplete_text_field_editor.mm (right): http://codereview.chromium.org/525098/diff/3001/3006#newcode109 chrome/browser/cocoa/autocomplete_text_field_editor.mm:109: GetExtensionsService()->GetExtensionById( Maybe you ...
10 years, 11 months ago (2010-01-07 22:20:16 UTC) #2
Bons
http://codereview.chromium.org/525098/diff/3001/3006 File chrome/browser/cocoa/autocomplete_text_field_editor.mm (right): http://codereview.chromium.org/525098/diff/3001/3006#newcode109 chrome/browser/cocoa/autocomplete_text_field_editor.mm:109: GetExtensionsService()->GetExtensionById( On 2010/01/07 22:20:16, Mark Mentovai wrote: > Maybe ...
10 years, 11 months ago (2010-01-08 20:57:05 UTC) #3
Pam (message me for reviews)
What he said, plus some tiny nits. - Pam http://codereview.chromium.org/525098/diff/3001/3002 File chrome/browser/cocoa/autocomplete_text_field.mm (right): http://codereview.chromium.org/525098/diff/3001/3002#newcode117 chrome/browser/cocoa/autocomplete_text_field.mm:117: ...
10 years, 11 months ago (2010-01-08 21:05:02 UTC) #4
Bons
http://codereview.chromium.org/525098/diff/3001/3002 File chrome/browser/cocoa/autocomplete_text_field.mm (right): http://codereview.chromium.org/525098/diff/3001/3002#newcode117 chrome/browser/cocoa/autocomplete_text_field.mm:117: const NSRect hintIconFrame = [cell securityImageFrameForFrame:[self bounds]]; On 2010/01/08 ...
10 years, 11 months ago (2010-01-08 21:38:09 UTC) #5
Andrew Bonventre
Added browser action support as well...
10 years, 11 months ago (2010-01-11 23:32:55 UTC) #6
Pam (message me for reviews)
OK. - Pam http://codereview.chromium.org/525098/diff/12001/13008 File chrome/browser/cocoa/extensions/browser_actions_controller.mm (right): http://codereview.chromium.org/525098/diff/12001/13008#newcode184 chrome/browser/cocoa/extensions/browser_actions_controller.mm:184: // NSButton between alloc/init and setCell:. ...
10 years, 11 months ago (2010-01-12 01:06:07 UTC) #7
Mark Mentovai
Check unit_tests crash on try run: [35493:267:0111/154547:79820979219076:FATAL:/b/slave/mac/build/src/chrome/browser/cocoa/autocomplete_text_field.mm(142)] Check failed: editor != nil.
10 years, 11 months ago (2010-01-12 01:41:29 UTC) #8
Mark Mentovai
mmmhmm lgtm with these changes http://codereview.chromium.org/525098/diff/12001/13001 File chrome/browser/cocoa/autocomplete_text_field.mm (right): http://codereview.chromium.org/525098/diff/12001/13001#newcode130 chrome/browser/cocoa/autocomplete_text_field.mm:130: if ([theEvent modifierFlags] & ...
10 years, 11 months ago (2010-01-12 01:54:10 UTC) #9
Andrew Bonventre
10 years, 11 months ago (2010-01-12 17:24:23 UTC) #10
Going to make sure the try bots do OK then submit.

http://codereview.chromium.org/525098/diff/12001/13001
File chrome/browser/cocoa/autocomplete_text_field.mm (right):

http://codereview.chromium.org/525098/diff/12001/13001#newcode130
chrome/browser/cocoa/autocomplete_text_field.mm:130: if ([theEvent
modifierFlags] & NSControlKeyMask == 0) {
On 2010/01/12 01:54:10, Mark Mentovai wrote:
> Check your logic here.  This ought to be:
> 
>       if (([theEvent modifierFlags] & NSControlKeyMask) == 0) {
> 
> As currently written, it's equivalent to:
> 
>       if ([theEvent modifierFlags] & (NSControlKeyMask == 0)) {
> 
> so this will never fire.  Make sure that this works properly.

Done.

http://codereview.chromium.org/525098/diff/12001/13008
File chrome/browser/cocoa/extensions/browser_actions_controller.mm (right):

http://codereview.chromium.org/525098/diff/12001/13008#newcode184
chrome/browser/cocoa/extensions/browser_actions_controller.mm:184: // NSButton
between alloc/init and setCell:.
On 2010/01/12 01:06:07, Pam wrote:
> This comment is now harder to follow, visually if not semantically. It would
be
> clearer if the two new lines [cell ...] were moved down.

Done.

http://codereview.chromium.org/525098/diff/12001/13002
File chrome/browser/cocoa/extensions/extension_action_context_menu.h (right):

http://codereview.chromium.org/525098/diff/12001/13002#newcode16
chrome/browser/cocoa/extensions/extension_action_context_menu.h:16: // if a user
{right|CTRL}-clicks the view of the given extension.
On 2010/01/12 01:54:10, Mark Mentovai wrote:
> Nit: CTRL -> lowercase
> Nit: CTRL -> control
> 
> I think you can just say right-click.  Control-click is a well-known way to
> achieve right-click on the Mac.  'Course, if you think it's clearer to spell
out
> "control" here too, that's OK.

Done.

Powered by Google App Engine
This is Rietveld 408576698