diff options
author | hshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-25 10:29:38 +0000 |
---|---|---|
committer | hshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-25 10:29:38 +0000 |
commit | fbaa8719cb541d0bdf9a93dd62da1036e5893e79 (patch) | |
tree | 23a2c6fe368458b23f8b0a55fd922fa1a809163e /ash/keyboard_overlay | |
parent | ede77641b903bbbe71402497de074a9b17a2dbea (diff) | |
download | chromium_src-fbaa8719cb541d0bdf9a93dd62da1036e5893e79.zip chromium_src-fbaa8719cb541d0bdf9a93dd62da1036e5893e79.tar.gz chromium_src-fbaa8719cb541d0bdf9a93dd62da1036e5893e79.tar.bz2 |
Fix keyboard overlay crash on Chrome OS.
Widget::InitParams.context is not allowed to be NULL when using
aura, so initialize it to be the primary root window.
Note: there used to be a NULL check for params.context but this
got removed by https://codereview.chromium.org/11829040. Now it
is assumed that one of the params.context or params.parent must
be valid.
BUG=172058
TEST=manual, CQ
Review URL: https://chromiumcodereview.appspot.com/12047105
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/keyboard_overlay')
-rw-r--r-- | ash/keyboard_overlay/keyboard_overlay_delegate.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ash/keyboard_overlay/keyboard_overlay_delegate.cc b/ash/keyboard_overlay/keyboard_overlay_delegate.cc index 97ef04a..8381432 100644 --- a/ash/keyboard_overlay/keyboard_overlay_delegate.cc +++ b/ash/keyboard_overlay/keyboard_overlay_delegate.cc @@ -13,6 +13,7 @@ #include "base/values.h" #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_message_handler.h" +#include "ui/aura/root_window.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/screen.h" #include "ui/views/controls/webview/web_dialog_view.h" @@ -77,6 +78,7 @@ void KeyboardOverlayDelegate::Show(views::WebDialogView* view) { views::Widget* widget = new views::Widget; views::Widget::InitParams params( views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); + params.context = Shell::GetPrimaryRootWindow(); params.delegate = view; widget->Init(params); |