OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/login/keyboard_driven_oobe_key_handler.h" | 5 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 | 11 |
12 KeyboardDrivenOobeKeyHandler::KeyboardDrivenOobeKeyHandler() { | 12 KeyboardDrivenOobeKeyHandler::KeyboardDrivenOobeKeyHandler() { |
13 ash::Shell::GetInstance()->AddPreTargetHandler(this); | 13 ash::Shell::GetInstance()->AddPreTargetHandler(this); |
14 } | 14 } |
15 KeyboardDrivenOobeKeyHandler::~KeyboardDrivenOobeKeyHandler() { | 15 KeyboardDrivenOobeKeyHandler::~KeyboardDrivenOobeKeyHandler() { |
16 ash::Shell::GetInstance()->RemovePreTargetHandler(this); | 16 ash::Shell::GetInstance()->RemovePreTargetHandler(this); |
17 } | 17 } |
18 | 18 |
19 void KeyboardDrivenOobeKeyHandler::OnKeyEvent(ui::KeyEvent* event) { | 19 void KeyboardDrivenOobeKeyHandler::OnKeyEvent(ui::KeyEvent* event) { |
20 if (event->key_code() == ui::VKEY_F6) { | 20 if (event->key_code() == ui::VKEY_F6) { |
21 ash::Shell::GetInstance()->GetPrimarySystemTray()->CloseSystemBubble(); | 21 ash::Shell::GetInstance()->GetPrimarySystemTray()->CloseSystemBubble(); |
22 event->StopPropagation(); | 22 event->StopPropagation(); |
23 } | 23 } |
24 } | 24 } |
25 | 25 |
26 } // namespace chromeos | 26 } // namespace chromeos |
OLD | NEW |