Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Unified Diff: chrome/browser/ui/views/keyboard_overlay_dialog_view.cc

Issue 10824023: Revert "Revert 148383 - Move the keyboard overlay view to ash." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_dialog_view.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
-}
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_dialog_view.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698