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 10 matching lines...) Expand all Loading... |
21 #include "chromeos/ime/input_method_manager.h" | 21 #include "chromeos/ime/input_method_manager.h" |
22 #include "content/public/browser/page_navigator.h" | 22 #include "content/public/browser/page_navigator.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/browser/web_contents_delegate.h" | 24 #include "content/public/browser/web_contents_delegate.h" |
25 #include "content/public/browser/web_ui.h" | 25 #include "content/public/browser/web_ui.h" |
26 #include "content/public/browser/web_ui_data_source.h" | 26 #include "content/public/browser/web_ui_data_source.h" |
27 #include "content/public/browser/web_ui_message_handler.h" | 27 #include "content/public/browser/web_ui_message_handler.h" |
28 #include "grit/browser_resources.h" | 28 #include "grit/browser_resources.h" |
29 #include "grit/chromium_strings.h" | 29 #include "grit/chromium_strings.h" |
30 #include "grit/generated_resources.h" | 30 #include "grit/generated_resources.h" |
31 #include "ui/base/l10n/l10n_util.h" | |
32 #include "ui/base/resource/resource_bundle.h" | |
33 | 31 |
34 using chromeos::input_method::ModifierKey; | 32 using chromeos::input_method::ModifierKey; |
35 using content::WebUIMessageHandler; | 33 using content::WebUIMessageHandler; |
36 using ui::WebDialogUI; | 34 using ui::WebDialogUI; |
37 | 35 |
38 namespace { | 36 namespace { |
39 | 37 |
40 const char kLearnMoreURL[] = | 38 const char kLearnMoreURL[] = |
41 #if defined(OFFICIAL_BUILD) | 39 #if defined(OFFICIAL_BUILD) |
42 "chrome-extension://honijodknafkokifofgiaalefdiedpko/" | 40 "chrome-extension://honijodknafkokifofgiaalefdiedpko/" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 375 |
378 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) | 376 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) |
379 : WebDialogUI(web_ui) { | 377 : WebDialogUI(web_ui) { |
380 Profile* profile = Profile::FromWebUI(web_ui); | 378 Profile* profile = Profile::FromWebUI(web_ui); |
381 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); | 379 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); |
382 web_ui->AddMessageHandler(handler); | 380 web_ui->AddMessageHandler(handler); |
383 | 381 |
384 // Set up the chrome://keyboardoverlay/ source. | 382 // Set up the chrome://keyboardoverlay/ source. |
385 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); | 383 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); |
386 } | 384 } |
OLD | NEW |