Commit b13ea409 authored by spang@chromium.org's avatar spang@chromium.org

ozone: Protect X11-specific code under chrome/browser/ui/ash

This fixes some build errors for the "chromeos=1 use_ozone=1" build. The
code under ash/accelerators is currently only supported under X11.

BUG=361341
TEST=chrome --ozone-platform=test

Review URL: https://codereview.chromium.org/232133005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262923 0039d316-1c4b-4281-b951-d872f2087c98
parent 0e19df41
...@@ -64,7 +64,11 @@ class AcceleratorDispatcherLinux : public AcceleratorDispatcher, ...@@ -64,7 +64,11 @@ class AcceleratorDispatcherLinux : public AcceleratorDispatcher,
if (IsKeyEvent(event)) { if (IsKeyEvent(event)) {
ui::KeyEvent key_event(event, false); ui::KeyEvent key_event(event, false);
if (MenuClosedForPossibleAccelerator(key_event)) { if (MenuClosedForPossibleAccelerator(key_event)) {
#if defined(USE_X11)
XPutBackEvent(event->xany.display, event); XPutBackEvent(event->xany.display, event);
#else
NOTIMPLEMENTED();
#endif
return ui::POST_DISPATCH_QUIT_LOOP; return ui::POST_DISPATCH_QUIT_LOOP;
} }
......
...@@ -44,12 +44,14 @@ bool ShouldOpenAshOnStartup() { ...@@ -44,12 +44,14 @@ bool ShouldOpenAshOnStartup() {
void OpenAsh() { void OpenAsh() {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#if defined(USE_X11)
if (base::SysInfo::IsRunningOnChromeOS()) { if (base::SysInfo::IsRunningOnChromeOS()) {
// Hides the cursor outside of the Aura root window. The cursor will be // Hides the cursor outside of the Aura root window. The cursor will be
// drawn within the Aura root window, and it'll remain hidden after the // drawn within the Aura root window, and it'll remain hidden after the
// Aura window is closed. // Aura window is closed.
ui::HideHostCursor(); ui::HideHostCursor();
} }
#endif
// Hide the mouse cursor completely at boot. // Hide the mouse cursor completely at boot.
if (!chromeos::LoginState::Get()->IsUserLoggedIn()) if (!chromeos::LoginState::Get()->IsUserLoggedIn())
......
...@@ -55,12 +55,14 @@ void InitAfterSessionStart() { ...@@ -55,12 +55,14 @@ void InitAfterSessionStart() {
if (!mru_list.empty()) if (!mru_list.empty())
mru_list.front()->Focus(); mru_list.front()->Focus();
#if defined(USE_X11)
// Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode. // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode.
ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode());
// Enable long press action to toggle spoken feedback with hotrod // Enable long press action to toggle spoken feedback with hotrod
// remote which can't handle shortcut. // remote which can't handle shortcut.
ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode());
#endif
} }
class AccessibilityDelegateImpl : public ash::AccessibilityDelegate { class AccessibilityDelegateImpl : public ash::AccessibilityDelegate {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment