summaryrefslogtreecommitdiffstats
path: root/athena/extensions
diff options
context:
space:
mode:
authorandresantoso <andresantoso@chromium.org>2014-11-14 17:14:39 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-15 01:14:56 +0000
commitf8f9fd1845d0e954f3d917bf64050ecd887b8811 (patch)
treeae41d4a3e43cefa3f1f597b2eef41c6edb0e9695 /athena/extensions
parent96c8d8fa1d6d070e64697847f5f4291d2fe4d291 (diff)
downloadchromium_src-f8f9fd1845d0e954f3d917bf64050ecd887b8811.zip
chromium_src-f8f9fd1845d0e954f3d917bf64050ecd887b8811.tar.gz
chromium_src-f8f9fd1845d0e954f3d917bf64050ecd887b8811.tar.bz2
MacViews: Fix inconsistencies with window modal dialog parent types.
On Aura, both gfx::NativeView and gfx::NativeWindow map to the same type (aura::Window*). On Mac, they map to different types (NSView* and NSWindow*) so they are not interchangeable. CreateBrowserModalDialogViews() is changed back to take a NativeWindow parent because that is what the callers expect. It was recently changed to NativeView in https://crrev.com/699553002. Added platform_util::GetViewForWindow() to convert the parent to the NativeView type that the Widget expects. BUG=425229 Review URL: https://codereview.chromium.org/718913004 Cr-Commit-Position: refs/heads/master@{#304324}
Diffstat (limited to 'athena/extensions')
-rw-r--r--athena/extensions/athena_constrained_window_views_client.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/athena/extensions/athena_constrained_window_views_client.cc b/athena/extensions/athena_constrained_window_views_client.cc
index d56503f..1645639 100644
--- a/athena/extensions/athena_constrained_window_views_client.cc
+++ b/athena/extensions/athena_constrained_window_views_client.cc
@@ -19,7 +19,7 @@
namespace athena {
namespace {
-// Provides the host envrionment for web modal dialogs. See
+// Provides the host environment for web modal dialogs. See
// web_modal::WebContentsModalDialogHost, and ModalDialogHost for more
// details.
class ModalDialogHostImpl : public web_modal::WebContentsModalDialogHost,
@@ -121,6 +121,9 @@ class AthenaConstrainedWindowViewsClient
return ModalDialogHostImpl::Get(parent);
return nullptr;
}
+ gfx::NativeView GetDialogHostView(gfx::NativeWindow parent) override {
+ return parent;
+ }
DISALLOW_COPY_AND_ASSIGN(AthenaConstrainedWindowViewsClient);
};