OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/options/chromeos/keyboard_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h" |
6 | 6 |
7 #include "ash/new_window_delegate.h" | 7 #include "ash/new_window_delegate.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 void KeyboardHandler::RegisterMessages() { | 150 void KeyboardHandler::RegisterMessages() { |
151 // Callback to show keyboard overlay. | 151 // Callback to show keyboard overlay. |
152 web_ui()->RegisterMessageCallback( | 152 web_ui()->RegisterMessageCallback( |
153 "showKeyboardShortcuts", | 153 "showKeyboardShortcuts", |
154 base::Bind(&KeyboardHandler::HandleShowKeyboardShortcuts, | 154 base::Bind(&KeyboardHandler::HandleShowKeyboardShortcuts, |
155 base::Unretained(this))); | 155 base::Unretained(this))); |
156 } | 156 } |
157 | 157 |
158 void KeyboardHandler::HandleShowKeyboardShortcuts(const base::ListValue* args) { | 158 void KeyboardHandler::HandleShowKeyboardShortcuts(const base::ListValue* args) { |
| 159 #if defined(USE_ATHENA) |
| 160 // Athena doesn't have ash::Shell and its new_window_delegate so keyboard |
| 161 // shortcut overlays are not supported. |
| 162 // TODO(mukai): re-enable this. |
159 ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay(); | 163 ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay(); |
| 164 #endif |
160 } | 165 } |
161 | 166 |
162 } // namespace options | 167 } // namespace options |
163 } // namespace chromeos | 168 } // namespace chromeos |
OLD | NEW |