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

Issue 1585013002: MacViews: Use Cocoa folder icons in tree views. (Closed)

Created:
4 years, 11 months ago by karandeepb
Modified:
4 years, 11 months ago
Reviewers:
Robert Sesek, tapted
CC:
chromium-reviews, rsesek+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Use Cocoa folder icons in tree views. Chrome's Cocoa UI retrieves some image assets from the System using APIs such as +[NSImage imageNamed:key]. To support this under toolkit-views, provide a ui::ResourceDelegate on Mac that can transparently map some IDR_ resource IDs to a system-provided asset. Initially do this for folder icons in views::TreeView to provide a folder icon that is consistent with the running OSX version. The following resource ids are currently intercepted - IDR_FOLDER_OPEN, IDR_FOLDER_CLOSED, IDR_FOLDER_OPEN_RTL and IDR_FOLDER_CLOSED_RTL. Although IDR_FOLDER_CLOSED is in ui/resources (and not ui/views/resources), it is currently unused on Mac (chrome://syncfs-internals/ refers to it in its CSS, but doesn't actually use that style anywhere in its html or js). Hence this CL, does not alter any icons on Chrome Mac, except under Views. BUG=543674 Committed: https://crrev.com/e60fc3cf40cbc732e5ccaf6ff3785cc1351fbe03 Cr-Commit-Position: refs/heads/master@{#370819}

Patch Set 1 : #

Total comments: 29

Patch Set 2 : Removed folder icon from devtools and rtl support, addressed review comments. #

Total comments: 17

Patch Set 3 : Addressed review comments. #

Total comments: 12

Patch Set 4 : Rebased #

Patch Set 5 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -1 line) Patch
M chrome/browser/chrome_browser_main_mac.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_mac.mm View 1 1 chunk +2 lines, -1 line 0 comments Download
A chrome/browser/resource_delegate_mac.h View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/resource_delegate_mac.mm View 1 2 3 4 1 chunk +84 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (12 generated)
karandeepb
PTAL Trent. This is a preliminary CL. Let me know if the approach looks feasible ...
4 years, 11 months ago (2016-01-14 04:21:33 UTC) #5
tapted
How much do we get by just implementing GetNativeImageNamed? i.e. Do the particular assets we ...
4 years, 11 months ago (2016-01-14 23:43:50 UTC) #6
karandeepb
PTAL Trent. Thanks. https://codereview.chromium.org/1585013002/diff/40001/chrome/browser/DEPS File chrome/browser/DEPS (right): https://codereview.chromium.org/1585013002/diff/40001/chrome/browser/DEPS#newcode4 chrome/browser/DEPS:4: "+blink/grit/devtools_resources.h", On 2016/01/14 23:43:50, tapted wrote: ...
4 years, 11 months ago (2016-01-18 00:31:18 UTC) #8
tapted
https://codereview.chromium.org/1585013002/diff/40001/chrome/browser/chrome_browser_main_mac.h File chrome/browser/chrome_browser_main_mac.h (right): https://codereview.chromium.org/1585013002/diff/40001/chrome/browser/chrome_browser_main_mac.h#newcode10 chrome/browser/chrome_browser_main_mac.h:10: #include "chrome/browser/resource_delegate_mac.h" On 2016/01/18 00:31:17, karandeepb wrote: > On ...
4 years, 11 months ago (2016-01-18 04:15:42 UTC) #9
karandeepb
PTAL Trent. Thanks. https://codereview.chromium.org/1585013002/diff/60001/chrome/browser/resource_delegate_mac.mm File chrome/browser/resource_delegate_mac.mm (right): https://codereview.chromium.org/1585013002/diff/60001/chrome/browser/resource_delegate_mac.mm#newcode18 chrome/browser/resource_delegate_mac.mm:18: BIG // 32X32. On 2016/01/18 04:15:42, ...
4 years, 11 months ago (2016-01-18 09:25:41 UTC) #10
tapted
looking good! I think this is worth going ahead with. I would just add some ...
4 years, 11 months ago (2016-01-19 00:36:52 UTC) #11
tapted
https://codereview.chromium.org/1585013002/diff/80001/chrome/browser/resource_delegate_mac.mm File chrome/browser/resource_delegate_mac.mm (right): https://codereview.chromium.org/1585013002/diff/80001/chrome/browser/resource_delegate_mac.mm#newcode38 chrome/browser/resource_delegate_mac.mm:38: }; oh and there shouldn't be semicolons after all ...
4 years, 11 months ago (2016-01-19 00:38:47 UTC) #12
karandeepb
PTAL Trent. Thanks. https://codereview.chromium.org/1585013002/diff/80001/chrome/browser/resource_delegate_mac.h File chrome/browser/resource_delegate_mac.h (right): https://codereview.chromium.org/1585013002/diff/80001/chrome/browser/resource_delegate_mac.h#newcode11 chrome/browser/resource_delegate_mac.h:11: namespace ui { On 2016/01/19 00:36:52, ...
4 years, 11 months ago (2016-01-20 10:22:37 UTC) #16
tapted
lgtm
4 years, 11 months ago (2016-01-21 00:36:17 UTC) #17
karandeepb
PTAL @rsesek. Thanks.
4 years, 11 months ago (2016-01-21 09:09:43 UTC) #19
Robert Sesek
LGTM
4 years, 11 months ago (2016-01-21 15:29:43 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1585013002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1585013002/120001
4 years, 11 months ago (2016-01-21 23:05:55 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:120001)
4 years, 11 months ago (2016-01-21 23:22:52 UTC) #24
commit-bot: I haz the power
4 years, 11 months ago (2016-01-21 23:23:58 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e60fc3cf40cbc732e5ccaf6ff3785cc1351fbe03
Cr-Commit-Position: refs/heads/master@{#370819}

Powered by Google App Engine
This is Rietveld 408576698