| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 9 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 bool chromebook_function_key = CommandLine::ForCurrentProcess()->HasSwitch( | 95 bool chromebook_function_key = CommandLine::ForCurrentProcess()->HasSwitch( |
| 96 switches::kEnableChromebookFunctionKey); | 96 switches::kEnableChromebookFunctionKey); |
| 97 | 97 |
| 98 const base::FundamentalValue show_options(true); | 98 const base::FundamentalValue show_options(true); |
| 99 | 99 |
| 100 if (!chromeos_keyboard) { | 100 if (!chromeos_keyboard) { |
| 101 web_ui()->CallJavascriptFunction( | 101 web_ui()->CallJavascriptFunction( |
| 102 "options.KeyboardOverlay.showCapsLockOptions", show_options); | 102 "options.KeyboardOverlay.showCapsLockOptions", show_options); |
| 103 } | 103 } |
| 104 | 104 |
| 105 if (chromebook_function_key) { | 105 if (chromeos_keyboard && chromebook_function_key) { |
| 106 web_ui()->CallJavascriptFunction( | 106 web_ui()->CallJavascriptFunction( |
| 107 "options.KeyboardOverlay.showFunctionKeyOptions", show_options); | 107 "options.KeyboardOverlay.showFunctionKeyOptions", show_options); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace options | 111 } // namespace options |
| 112 } // namespace chromeos | 112 } // namespace chromeos |
| OLD | NEW |