| 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/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chromeos/chromeos_switches.h" | 26 #include "chromeos/chromeos_switches.h" |
| 27 #include "components/prefs/pref_service.h" | 27 #include "components/prefs/pref_service.h" |
| 28 #include "content/public/browser/page_navigator.h" | 28 #include "content/public/browser/page_navigator.h" |
| 29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 30 #include "content/public/browser/web_contents_delegate.h" | 30 #include "content/public/browser/web_contents_delegate.h" |
| 31 #include "content/public/browser/web_ui.h" | 31 #include "content/public/browser/web_ui.h" |
| 32 #include "content/public/browser/web_ui_data_source.h" | 32 #include "content/public/browser/web_ui_data_source.h" |
| 33 #include "content/public/browser/web_ui_message_handler.h" | 33 #include "content/public/browser/web_ui_message_handler.h" |
| 34 #include "ui/base/ime/chromeos/ime_keyboard.h" | 34 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 35 #include "ui/base/ime/chromeos/input_method_manager.h" | 35 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 36 #include "ui/chromeos/events/pref_names.h" |
| 36 #include "ui/display/manager/display_manager.h" | 37 #include "ui/display/manager/display_manager.h" |
| 37 | 38 |
| 38 using chromeos::input_method::ModifierKey; | 39 using chromeos::input_method::ModifierKey; |
| 39 using content::WebUIMessageHandler; | 40 using content::WebUIMessageHandler; |
| 40 using ui::WebDialogUI; | 41 using ui::WebDialogUI; |
| 41 | 42 |
| 42 namespace { | 43 namespace { |
| 43 | 44 |
| 44 const char kLearnMoreURL[] = | 45 const char kLearnMoreURL[] = |
| 45 #if defined(OFFICIAL_BUILD) | 46 #if defined(OFFICIAL_BUILD) |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 424 |
| 424 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) | 425 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) |
| 425 : WebDialogUI(web_ui) { | 426 : WebDialogUI(web_ui) { |
| 426 Profile* profile = Profile::FromWebUI(web_ui); | 427 Profile* profile = Profile::FromWebUI(web_ui); |
| 427 web_ui->AddMessageHandler(base::MakeUnique<KeyboardOverlayHandler>(profile)); | 428 web_ui->AddMessageHandler(base::MakeUnique<KeyboardOverlayHandler>(profile)); |
| 428 | 429 |
| 429 // Set up the chrome://keyboardoverlay/ source. | 430 // Set up the chrome://keyboardoverlay/ source. |
| 430 content::WebUIDataSource::Add(profile, | 431 content::WebUIDataSource::Add(profile, |
| 431 CreateKeyboardOverlayUIHTMLSource(profile)); | 432 CreateKeyboardOverlayUIHTMLSource(profile)); |
| 432 } | 433 } |
| OLD | NEW |