OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura/desktop_host.h" | 5 #include "ui/aura/desktop_host.h" |
6 | 6 |
7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 if ((keycode >= ui::VKEY_0 && keycode <= ui::VKEY_9) || | 188 if ((keycode >= ui::VKEY_0 && keycode <= ui::VKEY_9) || |
189 (keycode >= ui::VKEY_A && keycode <= ui::VKEY_Z) || | 189 (keycode >= ui::VKEY_A && keycode <= ui::VKEY_Z) || |
190 (keycode >= ui::VKEY_NUMPAD0 && keycode <= ui::VKEY_NUMPAD9)) { | 190 (keycode >= ui::VKEY_NUMPAD0 && keycode <= ui::VKEY_NUMPAD9)) { |
191 return true; | 191 return true; |
192 } | 192 } |
193 | 193 |
194 switch (keycode) { | 194 switch (keycode) { |
195 case ui::VKEY_BACK: | 195 case ui::VKEY_BACK: |
196 case ui::VKEY_RETURN: | 196 case ui::VKEY_RETURN: |
197 case ui::VKEY_ESCAPE: | 197 case ui::VKEY_ESCAPE: |
| 198 case ui::VKEY_SPACE: |
198 case ui::VKEY_TAB: | 199 case ui::VKEY_TAB: |
199 // In addition to the keys listed at MSDN, we include other | 200 // In addition to the keys listed at MSDN, we include other |
200 // graphic-character and numpad keys. | 201 // graphic-character and numpad keys. |
201 case ui::VKEY_MULTIPLY: | 202 case ui::VKEY_MULTIPLY: |
202 case ui::VKEY_ADD: | 203 case ui::VKEY_ADD: |
203 case ui::VKEY_SUBTRACT: | 204 case ui::VKEY_SUBTRACT: |
204 case ui::VKEY_DECIMAL: | 205 case ui::VKEY_DECIMAL: |
205 case ui::VKEY_DIVIDE: | 206 case ui::VKEY_DIVIDE: |
206 case ui::VKEY_OEM_1: | 207 case ui::VKEY_OEM_1: |
207 case ui::VKEY_OEM_2: | 208 case ui::VKEY_OEM_2: |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 return new DesktopHostLinux(bounds); | 489 return new DesktopHostLinux(bounds); |
489 } | 490 } |
490 | 491 |
491 // static | 492 // static |
492 gfx::Size DesktopHost::GetNativeDisplaySize() { | 493 gfx::Size DesktopHost::GetNativeDisplaySize() { |
493 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 494 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
494 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 495 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
495 } | 496 } |
496 | 497 |
497 } // namespace aura | 498 } // namespace aura |
OLD | NEW |