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

Issue 12221055: Use a uniform opaque type to represent web contents modal dialogs (Closed)

Created:
7 years, 10 months ago by Mike Wittman
Modified:
7 years, 10 months ago
CC:
chromium-reviews, tfarina, sail+watch_chromium.org, dvh
Visibility:
Public.

Description

Use a uniform opaque type to represent web contents modal dialogs Since the WebContentsModalDialog interface is going away, the platform-independent code in WebContentsModalDialogManager requires an opaque type with which to identify dialogs. In a first attempt at this under https://codereview.chromium.org/12224020, comments indicated that the Mac implementation of the web contents modal dialog does not fit any of the abstracted native types provided by ui/gfx/native_widget_types.h. So, define a special typedef NativeWebContentsModalDialog that uses the existing gfx::NativeView abstraction on platforms where supported, mainly to document the expected type. On Mac, we use a void* which is the preferred type for this, per Sailesh in comments in this review. BUG=157161 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=182878

Patch Set 1 #

Total comments: 2

Patch Set 2 : address review comment #

Patch Set 3 : use void* typedef for Mac #

Patch Set 4 : update unit test #

Patch Set 5 : use ConstrainedWindowMac pointer for NativeWebContentsModalDialog on Cocoa #

Patch Set 6 : add TODO #

Total comments: 1

Patch Set 7 : go back to gfx::NativeView on non-Mac #

Patch Set 8 : rebase #

Patch Set 9 : disable unused webui certificate viewer on linux #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -27 lines) Patch
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/constrained_window_gtk.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/constrained_window_gtk.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/ui/native_web_contents_modal_dialog.h View 1 2 3 4 5 6 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/ui/native_web_contents_modal_dialog_manager.h View 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/constrained_window_views.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/constrained_window_views.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/web_contents_modal_dialog.h View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/web_contents_modal_dialog_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/web_contents_modal_dialog_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/certificate_viewer_webui.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Mike Wittman
Second try on the the WCMDM opaque ID after feedback from the earlier review. Note ...
7 years, 10 months ago (2013-02-07 00:34:41 UTC) #1
sail
https://codereview.chromium.org/12221055/diff/1/chrome/browser/ui/native_web_contents_modal_dialog.h File chrome/browser/ui/native_web_contents_modal_dialog.h (right): https://codereview.chromium.org/12221055/diff/1/chrome/browser/ui/native_web_contents_modal_dialog.h#newcode13 chrome/browser/ui/native_web_contents_modal_dialog.h:13: @protocol ConstrainedWindowSheet; I don't think this would compile if ...
7 years, 10 months ago (2013-02-07 00:46:08 UTC) #2
Mike Wittman
https://codereview.chromium.org/12221055/diff/1/chrome/browser/ui/native_web_contents_modal_dialog.h File chrome/browser/ui/native_web_contents_modal_dialog.h (right): https://codereview.chromium.org/12221055/diff/1/chrome/browser/ui/native_web_contents_modal_dialog.h#newcode13 chrome/browser/ui/native_web_contents_modal_dialog.h:13: @protocol ConstrainedWindowSheet; I've updated the ifdefs based on the ...
7 years, 10 months ago (2013-02-11 22:20:30 UTC) #3
sail
lgtm
7 years, 10 months ago (2013-02-11 22:26:21 UTC) #4
Mike Wittman
Sailesh - it turns out the change in patch set 2 does not work as ...
7 years, 10 months ago (2013-02-12 00:16:43 UTC) #5
sail
On 2013/02/12 00:16:43, Mike Wittman wrote: > Sailesh - it turns out the change in ...
7 years, 10 months ago (2013-02-12 00:20:58 UTC) #6
Mike Wittman
Hi Sailesh - can you take one more look at this? :) Temporarily, I'd like ...
7 years, 10 months ago (2013-02-13 18:59:21 UTC) #7
sail
On 2013/02/13 18:59:21, Mike Wittman wrote: > Hi Sailesh - can you take one more ...
7 years, 10 months ago (2013-02-13 19:01:41 UTC) #8
Ben Goodger (Google)
Hey Mike, one thing that isn't clear from your cl desc is why it's necessary ...
7 years, 10 months ago (2013-02-13 23:27:01 UTC) #9
Mike Wittman
On 2013/02/13 23:27:01, Ben Goodger (Google) wrote: > Hey Mike, one thing that isn't clear ...
7 years, 10 months ago (2013-02-13 23:46:25 UTC) #10
Ben Goodger (Google)
lgtm https://codereview.chromium.org/12221055/diff/16001/chrome/browser/ui/native_web_contents_modal_dialog.h File chrome/browser/ui/native_web_contents_modal_dialog.h (right): https://codereview.chromium.org/12221055/diff/16001/chrome/browser/ui/native_web_contents_modal_dialog.h#newcode11 chrome/browser/ui/native_web_contents_modal_dialog.h:11: // Use a void* since none of the ...
7 years, 10 months ago (2013-02-14 23:24:32 UTC) #11
Ben Goodger (Google)
ignore the comments on that last part they must have been left in a cookie ...
7 years, 10 months ago (2013-02-14 23:25:19 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/12221055/15003
7 years, 10 months ago (2013-02-15 00:23:28 UTC) #13
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-02-15 01:02:31 UTC) #14
Mike Wittman
Hi Elliot, can you review patch set 9 on this CL? The background is that ...
7 years, 10 months ago (2013-02-15 20:03:16 UTC) #15
Elliot Glaysher
On 2013/02/15 20:03:16, Mike Wittman wrote: > I don't see a reason to use CertificateViewerDialog ...
7 years, 10 months ago (2013-02-15 22:01:43 UTC) #16
Mike Wittman
On 2013/02/15 22:01:43, Elliot Glaysher wrote: > On 2013/02/15 20:03:16, Mike Wittman wrote: > > ...
7 years, 10 months ago (2013-02-15 22:24:38 UTC) #17
Elliot Glaysher
lgtm On 2013/02/15 22:24:38, Mike Wittman wrote: > On 2013/02/15 22:01:43, Elliot Glaysher wrote: > ...
7 years, 10 months ago (2013-02-15 22:29:44 UTC) #18
Mike Wittman
On 2013/02/15 22:29:44, Elliot Glaysher wrote: > lgtm > > On 2013/02/15 22:24:38, Mike Wittman ...
7 years, 10 months ago (2013-02-15 23:18:43 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/12221055/26001
7 years, 10 months ago (2013-02-15 23:26:38 UTC) #20
commit-bot: I haz the power
7 years, 10 months ago (2013-02-16 00:56:35 UTC) #21
Message was sent while issue was closed.
Change committed as 182878

Powered by Google App Engine
This is Rietveld 408576698