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 |
deleted file mode 100644 |
index 1ca47ea1c2c1e71058385c57ca095dc3ef9b4afd..0000000000000000000000000000000000000000 |
--- a/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc |
+++ /dev/null |
@@ -1,65 +0,0 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h" |
- |
-#include "base/utf_string_conversions.h" |
-#include "chrome/browser/ui/views/keyboard_overlay_delegate.h" |
-#include "content/public/browser/browser_context.h" |
-#include "grit/generated_resources.h" |
-#include "ui/base/l10n/l10n_util.h" |
-#include "ui/gfx/screen.h" |
-#include "ui/views/widget/widget.h" |
-#include "ui/web_dialogs/web_dialog_delegate.h" |
- |
-#if defined(OS_CHROMEOS) |
-#include "chrome/browser/chromeos/input_method/input_method_manager.h" |
-#endif |
- |
-using ui::WebDialogDelegate; |
- |
-namespace { |
-// Store the pointer to the view currently shown. |
-KeyboardOverlayDialogView* g_instance = NULL; |
-} |
- |
-KeyboardOverlayDialogView::KeyboardOverlayDialogView( |
- content::BrowserContext* context, |
- WebDialogDelegate* delegate, |
- WebContentsHandler* handler) |
- : views::WebDialogView(context, delegate, handler) { |
-} |
- |
-KeyboardOverlayDialogView::~KeyboardOverlayDialogView() { |
-} |
- |
-void KeyboardOverlayDialogView::ShowDialog( |
- content::BrowserContext* context, |
- WebContentsHandler* handler) { |
- // Ignore the call if another view is already shown. |
- if (g_instance) |
- return; |
- |
-#if defined(OS_CHROMEOS) |
- // Temporarily disable all accelerators for IME switching including Shift+Alt |
- // since the user might press Shift+Alt to remember an accelerator that starts |
- // with Shift+Alt (e.g. Shift+Alt+Tab for moving focus backwards). |
- chromeos::input_method::InputMethodManager::GetInstance()->DisableHotkeys(); |
-#endif |
- KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate( |
- l10n_util::GetStringUTF16(IDS_KEYBOARD_OVERLAY_TITLE)); |
- KeyboardOverlayDialogView* view = |
- new KeyboardOverlayDialogView(context, delegate, handler); |
- delegate->Show(view); |
- |
- g_instance = view; |
-} |
- |
-void KeyboardOverlayDialogView::WindowClosing() { |
-#if defined(OS_CHROMEOS) |
- // Re-enable the IME accelerators. See the comment in ShowDialog() above. |
- chromeos::input_method::InputMethodManager::GetInstance()->EnableHotkeys(); |
-#endif |
- g_instance = NULL; |
-} |