summaryrefslogtreecommitdiffstats
path: root/components/web_modal
diff options
context:
space:
mode:
authorandresantoso <andresantoso@chromium.org>2015-03-02 17:36:51 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-03 01:38:10 +0000
commit5f1263bb318f072343f59dec4b310a522c80b9a2 (patch)
tree779c54669e6c04e635a93b4f19e71721cee98631 /components/web_modal
parent62a1ccd2bfd61886dcdb3fed4e020fd77771699f (diff)
downloadchromium_src-5f1263bb318f072343f59dec4b310a522c80b9a2.zip
chromium_src-5f1263bb318f072343f59dec4b310a522c80b9a2.tar.gz
chromium_src-5f1263bb318f072343f59dec4b310a522c80b9a2.tar.bz2
MacViews: Unify web contents modal dialog types
The #if around NativeWebContentsModalDialog is a problem for building the MacViews browser. Unify them to be gfx::NativeWindow on all platforms. Refactor the cocoa side to move code from ConstrainedWindowMac into SingleWebContentsDialogManagerCocoa, while keeping ConstrainedWindowMac's interface the same as before. The Views side only needs simple changes from NativeView to NativeWindow. BUG=425229 Review URL: https://codereview.chromium.org/866263008 Cr-Commit-Position: refs/heads/master@{#318813}
Diffstat (limited to 'components/web_modal')
-rw-r--r--components/web_modal/native_web_contents_modal_dialog.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/components/web_modal/native_web_contents_modal_dialog.h b/components/web_modal/native_web_contents_modal_dialog.h
index 4bb956a..ef459b1 100644
--- a/components/web_modal/native_web_contents_modal_dialog.h
+++ b/components/web_modal/native_web_contents_modal_dialog.h
@@ -11,21 +11,8 @@ namespace web_modal {
// TODO(gbillock): rename this file
-#if defined(OS_MACOSX)
-// Use a void* since none of the gfx::Native* types are suitable for
-// representing the web contents modal dialog under Cocoa.
-typedef void* NativeWebContentsModalDialog;
-#else
-typedef gfx::NativeView NativeWebContentsModalDialog;
-#endif
-
-#if defined(OS_MACOSX)
-// Use a void* since none of the gfx::Native* types are suitable for
-// representing a popup window under Cocoa.
-typedef void* NativePopup;
-#else
-typedef gfx::NativeView NativePopup;
-#endif
+using NativeWebContentsModalDialog = gfx::NativeWindow;
+using NativePopup = gfx::NativeWindow;
} // namespace web_modal