Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / login / ui / keyboard_driven_oobe_key_handler.cc
blob42dfcc5c57ca29ba5b4796d3daa32af5d2d2d5ea
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h"
10 namespace chromeos {
12 KeyboardDrivenOobeKeyHandler::KeyboardDrivenOobeKeyHandler() {
13 ash::Shell::GetInstance()->AddPreTargetHandler(this);
15 KeyboardDrivenOobeKeyHandler::~KeyboardDrivenOobeKeyHandler() {
16 ash::Shell::GetInstance()->RemovePreTargetHandler(this);
19 void KeyboardDrivenOobeKeyHandler::OnKeyEvent(ui::KeyEvent* event) {
20 if (event->key_code() == ui::VKEY_F6) {
21 ash::Shell::GetInstance()->GetPrimarySystemTray()->CloseSystemBubble();
22 event->StopPropagation();
26 } // namespace chromeos