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

Issue 1274083002: Add flag to show toolkit-views dialogs on Mac, start with HTTP-Auth. (Closed)

Created:
5 years, 4 months ago by tapted
Modified:
5 years, 2 months ago
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add flag to show toolkit-views dialogs on Mac, start with HTTP-Auth. We want to perform a side-by-side comparison of views and Cocoa using a representative set of browser dialogs on Mac. Adds --enable-mac-views-dialogs and a corresponding chrome://flag for this. Initially, the conversion necessary to optionally provide views-based HTTP- Auth dialogs on Mac is performed. Dialogs are typically provided for a platform by providing a cross-platform function prototype, which is defined either in c/b/ui/views or c/b/ui/cocoa. To allow a principally Cocoa build to call both, the views definition needs to be "aliased" to avoid a symbol conflict. The approach is thus: - Provide Views-only function prototype aliases in c/b/ui/browser_dialogs.h - Cocoa includes this to optionally provide a views dialog instead at runtime - A "fallback" file (c/b/ui/views/browser_dialogs_views.cc) for non-Mac-Cocoa builds provides the original/unaliased definitions, which always call the alias. This approach minimizes disruption to callsites, and keeps most of the create- dialog logic where it already is. (For example, login_prompt_views.cc, which doesn't have a corresponding header so moving the logic would be problematic). It also keeps the "fallback" file simple and mechanical in nature. For the first dialog, there's a 60kB impact to sizes on Mac. This is partly due to there being (temporarily) two versions of this dialog, but also because the first dialog will explore some new codepaths previously culled at link time (mostly related to views textfields). BUG=511051 TEST=On Mac, enable the flag and go to an HTTP-Auth site (e.g. apted.net/chat). The dialog should be views-based: currently it's longer/narrower, but some simple tweaks (see http://crbug.com/506150#c5) will make them almost indistinguishable. Committed: https://crrev.com/081286e5f336151e19ff5ad8514e0ae3621d74ed Cr-Commit-Position: refs/heads/master@{#342586}

Patch Set 1 #

Patch Set 2 : doh; #

Patch Set 3 : histograms #

Patch Set 4 : Meatier comments #

Total comments: 6

Patch Set 5 : toolkit-views-dialogs-mac -> mac-views-dialogs, #if #

Patch Set 6 : rebase ug - fix histograms: knew I forgot to rename something (darn flaky tryjobs..) #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -6 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_dialogs.h View 1 2 3 4 3 chunks +22 lines, -0 lines 0 comments Download
A chrome/browser/ui/browser_dialogs_mac.cc View 1 2 3 4 1 chunk +17 lines, -0 lines 1 comment Download
M chrome/browser/ui/cocoa/login_prompt_cocoa.mm View 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/browser_dialogs_views.cc View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/login_prompt_views.cc View 1 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 4 chunks +5 lines, -3 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
tapted
Hi Michael, please take a look
5 years, 4 months ago (2015-08-07 01:05:28 UTC) #2
msw
The aliasing is a little confusing, but lgtm with a nit and a couple qs. ...
5 years, 4 months ago (2015-08-07 02:23:34 UTC) #3
tapted
Thanks Mike! https://codereview.chromium.org/1274083002/diff/60001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/1274083002/diff/60001/chrome/browser/ui/browser_dialogs.h#newcode86 chrome/browser/ui/browser_dialogs.h:86: // Creates a toolkit-views based LoginHandler (e.g. ...
5 years, 4 months ago (2015-08-07 03:40:17 UTC) #4
tapted
+asvitkine: Please review for the histograms change
5 years, 4 months ago (2015-08-07 03:45:12 UTC) #6
Alexei Svitkine (slow)
lgtm
5 years, 4 months ago (2015-08-07 14:49:49 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1274083002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1274083002/80001
5 years, 4 months ago (2015-08-09 23:35:34 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/97010)
5 years, 4 months ago (2015-08-10 01:09:56 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1274083002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1274083002/100001
5 years, 4 months ago (2015-08-10 03:46:14 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 4 months ago (2015-08-10 06:36:38 UTC) #16
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/081286e5f336151e19ff5ad8514e0ae3621d74ed Cr-Commit-Position: refs/heads/master@{#342586}
5 years, 4 months ago (2015-08-10 06:37:23 UTC) #17
Ruud van Asseldonk
https://codereview.chromium.org/1274083002/diff/100001/chrome/browser/ui/browser_dialogs_mac.cc File chrome/browser/ui/browser_dialogs_mac.cc (right): https://codereview.chromium.org/1274083002/diff/100001/chrome/browser/ui/browser_dialogs_mac.cc#newcode8 chrome/browser/ui/browser_dialogs_mac.cc:8: #include "chrome/common/chrome_switches.cc" Is the inclusion of the source file ...
5 years, 2 months ago (2015-10-14 13:50:08 UTC) #18
tapted
5 years, 2 months ago (2015-10-14 23:28:39 UTC) #19
Message was sent while issue was closed.
On 2015/10/14 13:50:08, Ruud van Asseldonk wrote:
>
https://codereview.chromium.org/1274083002/diff/100001/chrome/browser/ui/brow...
> File chrome/browser/ui/browser_dialogs_mac.cc (right):
> 
>
https://codereview.chromium.org/1274083002/diff/100001/chrome/browser/ui/brow...
> chrome/browser/ui/browser_dialogs_mac.cc:8: #include
> "chrome/common/chrome_switches.cc"
> Is the inclusion of the source file here a typo?

ugh. yes - thanks. Wow. I wonder if passing -Wl,-all_load would detect ODR
violations like this... Maybe we need a bot for that. Or maybe LTO will make
this happen anyway. Anyway, fix: https://codereview.chromium.org/1403143002/

Powered by Google App Engine
This is Rietveld 408576698