| 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/proxy_settings_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/system/input_device_settings.h" | 10 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 std::string ProxySettingsHTMLSource::GetSource() const { | 61 std::string ProxySettingsHTMLSource::GetSource() const { |
| 62 return chrome::kChromeUIProxySettingsHost; | 62 return chrome::kChromeUIProxySettingsHost; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void ProxySettingsHTMLSource::StartDataRequest( | 65 void ProxySettingsHTMLSource::StartDataRequest( |
| 66 const std::string& path, | 66 const std::string& path, |
| 67 int render_process_id, | 67 int render_process_id, |
| 68 int render_frame_id, | 68 int render_frame_id, |
| 69 const content::URLDataSource::GotDataCallback& callback) { | 69 const content::URLDataSource::GotDataCallback& callback) { |
| 70 webui::SetFontAndTextDirection(localized_strings_.get()); | 70 webui::SetTextDirection(localized_strings_.get()); |
| 71 | 71 |
| 72 static const base::StringPiece html( | 72 static const base::StringPiece html( |
| 73 ResourceBundle::GetSharedInstance().GetRawDataResource( | 73 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 74 IDR_PROXY_SETTINGS_HTML)); | 74 IDR_PROXY_SETTINGS_HTML)); |
| 75 std::string full_html = webui::GetI18nTemplateHtml( | 75 std::string full_html = webui::GetI18nTemplateHtml( |
| 76 html, localized_strings_.get()); | 76 html, localized_strings_.get()); |
| 77 | 77 |
| 78 callback.Run(base::RefCountedString::TakeString(&full_html)); | 78 callback.Run(base::RefCountedString::TakeString(&full_html)); |
| 79 } | 79 } |
| 80 | 80 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 if (!initialized_handlers_) { | 122 if (!initialized_handlers_) { |
| 123 core_handler_->InitializeHandler(); | 123 core_handler_->InitializeHandler(); |
| 124 proxy_handler_->InitializeHandler(); | 124 proxy_handler_->InitializeHandler(); |
| 125 initialized_handlers_ = true; | 125 initialized_handlers_ = true; |
| 126 } | 126 } |
| 127 core_handler_->InitializePage(); | 127 core_handler_->InitializePage(); |
| 128 proxy_handler_->InitializePage(); | 128 proxy_handler_->InitializePage(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace chromeos | 131 } // namespace chromeos |
| OLD | NEW |