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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 2339633002: mash: Port KeyboardUIMus to mojo:ash; remove sysui. (Closed)
Patch Set: Add mash NOTIMPLEMENTED() in AccessibilityManager::UpdateVirtualKeyboardFromPref() Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « ash/sysui/sysui_application.cc ('k') | tools/determinism/compare_build_artifacts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 return; 937 return;
938 938
939 const bool enabled = profile_->GetPrefs()->GetBoolean( 939 const bool enabled = profile_->GetPrefs()->GetBoolean(
940 prefs::kAccessibilityVirtualKeyboardEnabled); 940 prefs::kAccessibilityVirtualKeyboardEnabled);
941 941
942 if (virtual_keyboard_enabled_ == enabled) 942 if (virtual_keyboard_enabled_ == enabled)
943 return; 943 return;
944 virtual_keyboard_enabled_ = enabled; 944 virtual_keyboard_enabled_ = enabled;
945 945
946 keyboard::SetAccessibilityKeyboardEnabled(enabled); 946 keyboard::SetAccessibilityKeyboardEnabled(enabled);
947 // Note that there are two versions of the on-screen keyboard. A full layout 947 if (!chrome::IsRunningInMash()) {
948 // is provided for accessibility, which includes sticky modifier keys to 948 // Note that there are two versions of the on-screen keyboard. A full layout
949 // enable typing of hotkeys. A compact version is used in touchview mode 949 // is provided for accessibility, which includes sticky modifier keys to
950 // to provide a layout with larger keys to facilitate touch typing. In the 950 // enable typing of hotkeys. A compact version is used in touchview mode
951 // event that the a11y keyboard is being disabled, an on-screen keyboard might 951 // to provide a layout with larger keys to facilitate touch typing. In the
952 // still be enabled and a forced reset is required to pick up the layout 952 // event that the a11y keyboard is being disabled, an on-screen keyboard
953 // change. 953 // might still be enabled and a forced reset is required to pick up the
954 if (keyboard::IsKeyboardEnabled()) 954 // layout change.
955 ash::Shell::GetInstance()->CreateKeyboard(); 955 if (keyboard::IsKeyboardEnabled())
956 else 956 ash::Shell::GetInstance()->CreateKeyboard();
957 ash::Shell::GetInstance()->DeactivateKeyboard(); 957 else
958 ash::Shell::GetInstance()->DeactivateKeyboard();
959 } else {
960 // TODO(mash): Support on-screen keyboard. See http://crbug.com/646565
961 NOTIMPLEMENTED();
962 }
958 963
959 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, 964 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD,
960 enabled, ash::A11Y_NOTIFICATION_NONE); 965 enabled, ash::A11Y_NOTIFICATION_NONE);
961 NotifyAccessibilityStatusChanged(details); 966 NotifyAccessibilityStatusChanged(details);
962 } 967 }
963 968
964 void AccessibilityManager::EnableMonoAudio(bool enabled) { 969 void AccessibilityManager::EnableMonoAudio(bool enabled) {
965 if (!profile_) 970 if (!profile_)
966 return; 971 return;
967 972
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 content::BrowserContext* context) { 1594 content::BrowserContext* context) {
1590 keyboard_listener_extension_id_ = id; 1595 keyboard_listener_extension_id_ = id;
1591 1596
1592 extensions::ExtensionRegistry* registry = 1597 extensions::ExtensionRegistry* registry =
1593 extensions::ExtensionRegistry::Get(context); 1598 extensions::ExtensionRegistry::Get(context);
1594 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1599 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1595 extension_registry_observer_.Add(registry); 1600 extension_registry_observer_.Add(registry);
1596 } 1601 }
1597 1602
1598 } // namespace chromeos 1603 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/sysui/sysui_application.cc ('k') | tools/determinism/compare_build_artifacts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698