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

Issue 2973004: [Mac]Implement ViewID support. (Closed)

Created:
10 years, 5 months ago by James Su
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, John Grabowski, Erik does not do reviews, Paul Godavari, brettw-cc_chromium.org, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

[Mac]Implement ViewID support. This CL implement ViewID support by using NSView's tag property. ReloadButton is also changed to use a dedicated property to store the current button command rather than using the tag property. This CL removes tag values of toolbar buttons set in Toolbar.xib. Because now we use tag property for ViewID support. BUG=44692 need ViewIds on mac TEST=none

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 41

Patch Set 3 : Update CL according to review feedback. #

Total comments: 1

Patch Set 4 : Turns out that, it's not a good solution. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -65 lines) Patch
M chrome/app/nibs/Toolbar.xib View 1 2 3 12 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/cocoa/base_view.h View 1 2 3 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/cocoa/base_view.mm View 1 2 2 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/base_view_unittest.mm View 1 2 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 1 2 3 4 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/cocoa/bookmark_bar_view.mm View 1 2 3 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 2 chunks +11 lines, -2 lines 0 comments Download
A chrome/browser/cocoa/button_with_viewid.h View 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/button_with_viewid.mm View 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/delayedmenu_button.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/download_shelf_view.mm View 1 2 3 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/cocoa/draggable_button.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/extensions/browser_actions_container_view.mm View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/find_bar_text_field.mm View 1 2 3 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/cocoa/find_bar_view.mm View 1 2 3 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/cocoa/location_bar/autocomplete_text_field.mm View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/menu_button.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/reload_button.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/reload_button.mm View 1 2 3 4 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/cocoa/reload_button_unittest.mm View 5 chunks +20 lines, -20 lines 0 comments Download
M chrome/browser/cocoa/side_tab_strip_view.mm View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_contents_controller.mm View 1 2 4 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/cocoa/tab_controller.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_controller.mm View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_controller_target.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/cocoa/tab_controller_unittest.mm View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/cocoa/tab_strip_controller.mm View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_view.mm View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_view.mm View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/toolbar_controller.mm View 1 2 3 3 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller_unittest.mm View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/cocoa/toolbar_view.mm View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
A chrome/browser/cocoa/view_id_util.h View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/view_id_util.mm View 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/view_id_util_browsertest.cc View 1 2 1 chunk +89 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.mm View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
James Su
10 years, 5 months ago (2010-07-10 00:18:46 UTC) #1
Nico
I'm not familiar with what this view id stuff wants to achieve. I'm hoping John ...
10 years, 5 months ago (2010-07-10 06:34:54 UTC) #2
John Grabowski
I know what this is for; I will review in the morning. Thanks for hitting ...
10 years, 5 months ago (2010-07-10 07:24:10 UTC) #3
James Su
ViewID is mainly for ui tests, for example browser_keyevents_browsertest.cc and browser_focus_uitest.cc. http://codereview.chromium.org/2973004/diff/2001/3016 File chrome/browser/cocoa/tab_contents_controller.mm (right): ...
10 years, 5 months ago (2010-07-10 18:47:26 UTC) #4
John Grabowski
Really glad to see ViewIDs come to the Mac. http://codereview.chromium.org/2973004/diff/2001/3001 File chrome/app/nibs/Toolbar.xib (left): http://codereview.chromium.org/2973004/diff/2001/3001#oldcode1 chrome/app/nibs/Toolbar.xib:1: ...
10 years, 5 months ago (2010-07-12 04:47:57 UTC) #5
James Su
http://codereview.chromium.org/2973004/diff/2001/3001 File chrome/app/nibs/Toolbar.xib (left): http://codereview.chromium.org/2973004/diff/2001/3001#oldcode1 chrome/app/nibs/Toolbar.xib:1: <?xml version="1.0" encoding="UTF-8"?> On 2010/07/12 04:47:58, John Grabowski wrote: ...
10 years, 5 months ago (2010-07-13 07:20:50 UTC) #6
John Grabowski
Looks pretty good; here's a summary of remaining concerns: 1. tag use in stoplight. Can ...
10 years, 5 months ago (2010-07-13 20:02:46 UTC) #7
James Su
Hi, Just noticed that I made a mistake. Turns out that the toolbar buttons rely ...
10 years, 5 months ago (2010-07-15 05:01:48 UTC) #8
James Su
Anyway, I just updated this CL to make it workable. Just for your reference. On ...
10 years, 5 months ago (2010-07-15 05:29:37 UTC) #9
John Grabowski
There are lots of options; I've got interview in 5min but let's talk after lunch. ...
10 years, 5 months ago (2010-07-15 17:58:52 UTC) #10
John Grabowski
10 years, 5 months ago (2010-07-15 19:40:53 UTC) #11
I think it seems like a good idea to use a new property.
How about the viewID property, and have all relevant NSViews derive from
BaseView (or whatever has the @property defined)?

You could write a +[NSView viewForViewID:] category method which looks for
the viewID; if not found (e.g. applies to an NSView you could not subclass),
use a map.  Or contains a switch to grab it explictly.

jrg


On Wed, Jul 14, 2010 at 10:01 PM, <suzhe@chromium.org> wrote:

> Hi,
> Just noticed that I made a mistake.
> Turns out that the toolbar buttons rely on the tag property to send
> commands to
> the browser window. See commandDispatch and
> commandDispatchUsingKeyModifiers
> methods of BrowserWindowController.
> So if we want to use the tag property for ViewID support, we need to find
> another approach for this problem.
>
> For now, I'd rather prefer to use another solution for ViewID support and
> leave
> the tag property as it.
>
> What's your opinion?
>
> I'll try to work out a new solution and send it to you for review before
> the end
> of tomorrow.
>
> Regards
> James Su
>
>
> http://codereview.chromium.org/2973004/show
>

Powered by Google App Engine
This is Rietveld 408576698