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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/prefs/pref_service.h" | |
17 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
18 #include "base/values.h" | 17 #include "base/values.h" |
19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
21 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
22 #include "chrome/grit/chromium_strings.h" | 21 #include "chrome/grit/chromium_strings.h" |
23 #include "chrome/grit/generated_resources.h" | 22 #include "chrome/grit/generated_resources.h" |
24 #include "chromeos/chromeos_switches.h" | 23 #include "chromeos/chromeos_switches.h" |
| 24 #include "components/prefs/pref_service.h" |
25 #include "content/public/browser/page_navigator.h" | 25 #include "content/public/browser/page_navigator.h" |
26 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
27 #include "content/public/browser/web_contents_delegate.h" | 27 #include "content/public/browser/web_contents_delegate.h" |
28 #include "content/public/browser/web_ui.h" | 28 #include "content/public/browser/web_ui.h" |
29 #include "content/public/browser/web_ui_data_source.h" | 29 #include "content/public/browser/web_ui_data_source.h" |
30 #include "content/public/browser/web_ui_message_handler.h" | 30 #include "content/public/browser/web_ui_message_handler.h" |
31 #include "grit/browser_resources.h" | 31 #include "grit/browser_resources.h" |
32 #include "ui/base/ime/chromeos/ime_keyboard.h" | 32 #include "ui/base/ime/chromeos/ime_keyboard.h" |
33 #include "ui/base/ime/chromeos/input_method_manager.h" | 33 #include "ui/base/ime/chromeos/input_method_manager.h" |
34 | 34 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) | 405 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) |
406 : WebDialogUI(web_ui) { | 406 : WebDialogUI(web_ui) { |
407 Profile* profile = Profile::FromWebUI(web_ui); | 407 Profile* profile = Profile::FromWebUI(web_ui); |
408 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); | 408 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); |
409 web_ui->AddMessageHandler(handler); | 409 web_ui->AddMessageHandler(handler); |
410 | 410 |
411 // Set up the chrome://keyboardoverlay/ source. | 411 // Set up the chrome://keyboardoverlay/ source. |
412 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); | 412 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); |
413 } | 413 } |
OLD | NEW |