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/chromeos/keyboard_overlay_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.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 22 matching lines...) Expand all Loading... |
33 using content::WebUIMessageHandler; | 33 using content::WebUIMessageHandler; |
34 using ui::WebDialogUI; | 34 using ui::WebDialogUI; |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 const char kLearnMoreURL[] = | 38 const char kLearnMoreURL[] = |
39 #if defined(OFFICIAL_BUILD) | 39 #if defined(OFFICIAL_BUILD) |
40 "chrome-extension://honijodknafkokifofgiaalefdiedpko/" | 40 "chrome-extension://honijodknafkokifofgiaalefdiedpko/" |
41 "main.html?answer=188743"; | 41 "main.html?answer=188743"; |
42 #else | 42 #else |
43 "http://support.google.com/chromeos/bin/answer.py?answer=183101"; | 43 "https://support.google.com/chromebook/answer/183101"; |
44 #endif | 44 #endif |
45 | 45 |
46 struct ModifierToLabel { | 46 struct ModifierToLabel { |
47 const ModifierKey modifier; | 47 const ModifierKey modifier; |
48 const char* label; | 48 const char* label; |
49 } kModifierToLabels[] = { | 49 } kModifierToLabels[] = { |
50 {chromeos::input_method::kSearchKey, "search"}, | 50 {chromeos::input_method::kSearchKey, "search"}, |
51 {chromeos::input_method::kControlKey, "ctrl"}, | 51 {chromeos::input_method::kControlKey, "ctrl"}, |
52 {chromeos::input_method::kAltKey, "alt"}, | 52 {chromeos::input_method::kAltKey, "alt"}, |
53 {chromeos::input_method::kVoidKey, "disabled"}, | 53 {chromeos::input_method::kVoidKey, "disabled"}, |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 | 403 |
404 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) | 404 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) |
405 : WebDialogUI(web_ui) { | 405 : WebDialogUI(web_ui) { |
406 Profile* profile = Profile::FromWebUI(web_ui); | 406 Profile* profile = Profile::FromWebUI(web_ui); |
407 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); | 407 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); |
408 web_ui->AddMessageHandler(handler); | 408 web_ui->AddMessageHandler(handler); |
409 | 409 |
410 // Set up the chrome://keyboardoverlay/ source. | 410 // Set up the chrome://keyboardoverlay/ source. |
411 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); | 411 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); |
412 } | 412 } |
OLD | NEW |