OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/webui/keyboard_overlay_ui.h" | 5 #include "chrome/browser/chromeos/webui/keyboard_overlay_ui.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "base/weak_ptr.h" | 9 #include "base/weak_ptr.h" |
10 #include "chrome/browser/browser_thread.h" | |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "chrome/browser/chromeos/cros/input_method_library.h" | 11 #include "chrome/browser/chromeos/cros/input_method_library.h" |
13 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 12 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/tab_contents/tab_contents.h" | |
16 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
17 #include "chrome/common/jstemplate_builder.h" | 15 #include "chrome/common/jstemplate_builder.h" |
18 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "content/browser/browser_thread.h" |
| 18 #include "content/browser/tab_contents/tab_contents.h" |
19 #include "grit/browser_resources.h" | 19 #include "grit/browser_resources.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "third_party/cros/chromeos_input_method.h" | 21 #include "third_party/cros/chromeos_input_method.h" |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
24 | 24 |
25 | 25 |
26 class KeyboardOverlayUIHTMLSource : public ChromeURLDataManager::DataSource { | 26 class KeyboardOverlayUIHTMLSource : public ChromeURLDataManager::DataSource { |
27 public: | 27 public: |
28 KeyboardOverlayUIHTMLSource(); | 28 KeyboardOverlayUIHTMLSource(); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 KeyboardOverlayUI::KeyboardOverlayUI(TabContents* contents) | 292 KeyboardOverlayUI::KeyboardOverlayUI(TabContents* contents) |
293 : HtmlDialogUI(contents) { | 293 : HtmlDialogUI(contents) { |
294 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(); | 294 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(); |
295 AddMessageHandler((handler)->Attach(this)); | 295 AddMessageHandler((handler)->Attach(this)); |
296 KeyboardOverlayUIHTMLSource* html_source = new KeyboardOverlayUIHTMLSource(); | 296 KeyboardOverlayUIHTMLSource* html_source = new KeyboardOverlayUIHTMLSource(); |
297 | 297 |
298 // Set up the chrome://keyboardoverlay/ source. | 298 // Set up the chrome://keyboardoverlay/ source. |
299 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 299 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
300 } | 300 } |
OLD | NEW |