| Index: chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
|
| diff --git a/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc b/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
|
| index 432c31024fefa358c1add513c262fd981c795530..db2149c90667504d862c9ff35887e3ce9eb34bbf 100644
|
| --- a/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
|
| +++ b/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
|
| @@ -17,6 +17,11 @@
|
|
|
| using ui::WebDialogDelegate;
|
|
|
| +namespace {
|
| +// Store the pointer to the view currently shown.
|
| +KeyboardOverlayDialogView* g_instance = NULL;
|
| +}
|
| +
|
| KeyboardOverlayDialogView::KeyboardOverlayDialogView(
|
| Profile* profile,
|
| WebDialogDelegate* delegate)
|
| @@ -27,6 +32,9 @@ KeyboardOverlayDialogView::~KeyboardOverlayDialogView() {
|
| }
|
|
|
| void KeyboardOverlayDialogView::ShowDialog() {
|
| + // Ignore the call if another view is already shown.
|
| + if (g_instance)
|
| + return;
|
|
|
| KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate(
|
| l10n_util::GetStringUTF16(IDS_KEYBOARD_OVERLAY_TITLE));
|
| @@ -51,4 +59,10 @@ void KeyboardOverlayDialogView::ShowDialog() {
|
| size.height());
|
| view->GetWidget()->SetBounds(bounds);
|
| view->GetWidget()->Show();
|
| +
|
| + g_instance = view;
|
| +}
|
| +
|
| +void KeyboardOverlayDialogView::WindowClosing() {
|
| + g_instance = NULL;
|
| }
|
|
|