| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/dom_ui/keyboard_overlay_ui.h" | 5 #include "chrome/browser/chromeos/dom_ui/keyboard_overlay_ui.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "base/weak_ptr.h" | 11 #include "base/weak_ptr.h" |
| 12 #include "chrome/browser/browser_thread.h" | 12 #include "chrome/browser/browser_thread.h" |
| 13 #include "chrome/browser/chromeos/cros/cros_library.h" | 13 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 14 #include "chrome/browser/chromeos/cros/input_method_library.h" | 14 #include "chrome/browser/chromeos/cros/input_method_library.h" |
| 15 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 15 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 17 #include "chrome/common/jstemplate_builder.h" | 17 #include "chrome/common/jstemplate_builder.h" |
| 18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "cros/chromeos_input_method.h" | |
| 20 #include "grit/browser_resources.h" | 19 #include "grit/browser_resources.h" |
| 21 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 21 #include "third_party/cros/chromeos_input_method.h" |
| 22 | 22 |
| 23 | 23 |
| 24 class KeyboardOverlayUIHTMLSource : public ChromeURLDataManager::DataSource { | 24 class KeyboardOverlayUIHTMLSource : public ChromeURLDataManager::DataSource { |
| 25 public: | 25 public: |
| 26 KeyboardOverlayUIHTMLSource(); | 26 KeyboardOverlayUIHTMLSource(); |
| 27 | 27 |
| 28 // Called when the keyboard overlay has requested a resource underneath | 28 // Called when the keyboard overlay has requested a resource underneath |
| 29 // the path we registered. | 29 // the path we registered. |
| 30 virtual void StartDataRequest(const std::string& path, | 30 virtual void StartDataRequest(const std::string& path, |
| 31 bool is_off_the_record, | 31 bool is_off_the_record, |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 KeyboardOverlayUIHTMLSource* html_source = new KeyboardOverlayUIHTMLSource(); | 292 KeyboardOverlayUIHTMLSource* html_source = new KeyboardOverlayUIHTMLSource(); |
| 293 | 293 |
| 294 // Set up the chrome://keyboardoverlay/ source. | 294 // Set up the chrome://keyboardoverlay/ source. |
| 295 BrowserThread::PostTask( | 295 BrowserThread::PostTask( |
| 296 BrowserThread::IO, FROM_HERE, | 296 BrowserThread::IO, FROM_HERE, |
| 297 NewRunnableMethod( | 297 NewRunnableMethod( |
| 298 ChromeURLDataManager::GetInstance(), | 298 ChromeURLDataManager::GetInstance(), |
| 299 &ChromeURLDataManager::AddDataSource, | 299 &ChromeURLDataManager::AddDataSource, |
| 300 make_scoped_refptr(html_source))); | 300 make_scoped_refptr(html_source))); |
| 301 } | 301 } |
| OLD | NEW |