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

Unified Diff: ash/keyboard/keyboard_ui.cc

Issue 2084733002: mash: Move tray accessibility and keyboard to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@typenamespace
Patch Set: rebase Created 4 years, 6 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 | « ash/keyboard/keyboard_ui.h ('k') | ash/keyboard/keyboard_ui_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/keyboard/keyboard_ui.cc
diff --git a/ash/keyboard/keyboard_ui.cc b/ash/keyboard/keyboard_ui.cc
deleted file mode 100644
index 1ab3f104d0e0b76168e444f36bda442592e950a0..0000000000000000000000000000000000000000
--- a/ash/keyboard/keyboard_ui.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 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 "ash/keyboard/keyboard_ui.h"
-
-#include "ash/common/accessibility_delegate.h"
-#include "ash/common/system/accessibility_observer.h"
-#include "ash/common/system/tray/wm_system_tray_notifier.h"
-#include "ash/common/wm_shell.h"
-#include "ash/keyboard/keyboard_ui_observer.h"
-#include "ash/system/tray_accessibility.h"
-#include "base/memory/ptr_util.h"
-#include "ui/keyboard/keyboard_controller.h"
-
-namespace ash {
-
-class KeyboardUIImpl : public KeyboardUI, public AccessibilityObserver {
- public:
- KeyboardUIImpl() {
- WmShell::Get()->system_tray_notifier()->AddAccessibilityObserver(this);
- }
-
- ~KeyboardUIImpl() override {
- if (WmShell::HasInstance() && WmShell::Get()->system_tray_notifier())
- WmShell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this);
- }
-
- // KeyboardUI:
- void Show() override {
- keyboard::KeyboardController::GetInstance()->ShowKeyboard(true);
- }
- void Hide() override {
- // Do nothing as this is called from ash::Shell, which also calls through
- // to the appropriate keyboard functions.
- }
- bool IsEnabled() override {
- return WmShell::Get()
- ->GetAccessibilityDelegate()
- ->IsVirtualKeyboardEnabled();
- }
-
- // AccessibilityObserver:
- void OnAccessibilityModeChanged(
- AccessibilityNotificationVisibility notify) override {
- FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(),
- OnKeyboardEnabledStateChanged(IsEnabled()));
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(KeyboardUIImpl);
-};
-
-KeyboardUI::~KeyboardUI() {}
-
-// static
-std::unique_ptr<KeyboardUI> KeyboardUI::Create() {
- return base::WrapUnique(new KeyboardUIImpl);
-}
-
-void KeyboardUI::AddObserver(KeyboardUIObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-KeyboardUI::KeyboardUI() {}
-
-} // namespace ash
« no previous file with comments | « ash/keyboard/keyboard_ui.h ('k') | ash/keyboard/keyboard_ui_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698