| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 std::string ProxySettingsHTMLSource::GetSource() const { | 63 std::string ProxySettingsHTMLSource::GetSource() const { |
| 64 return chrome::kChromeUIProxySettingsHost; | 64 return chrome::kChromeUIProxySettingsHost; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ProxySettingsHTMLSource::StartDataRequest( | 67 void ProxySettingsHTMLSource::StartDataRequest( |
| 68 const std::string& path, | 68 const std::string& path, |
| 69 int render_process_id, | 69 int render_process_id, |
| 70 int render_frame_id, | 70 int render_frame_id, |
| 71 const content::URLDataSource::GotDataCallback& callback) { | 71 const content::URLDataSource::GotDataCallback& callback) { |
| 72 webui::SetFontAndTextDirection(localized_strings_.get()); | 72 webui::SetTextDirection(localized_strings_.get()); |
| 73 | 73 |
| 74 static const base::StringPiece html( | 74 static const base::StringPiece html( |
| 75 ResourceBundle::GetSharedInstance().GetRawDataResource( | 75 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 76 IDR_PROXY_SETTINGS_HTML)); | 76 IDR_PROXY_SETTINGS_HTML)); |
| 77 std::string full_html = webui::GetI18nTemplateHtml( | 77 std::string full_html = webui::GetI18nTemplateHtml( |
| 78 html, localized_strings_.get()); | 78 html, localized_strings_.get()); |
| 79 | 79 |
| 80 callback.Run(base::RefCountedString::TakeString(&full_html)); | 80 callback.Run(base::RefCountedString::TakeString(&full_html)); |
| 81 } | 81 } |
| 82 | 82 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (!initialized_handlers_) { | 124 if (!initialized_handlers_) { |
| 125 core_handler_->InitializeHandler(); | 125 core_handler_->InitializeHandler(); |
| 126 proxy_handler_->InitializeHandler(); | 126 proxy_handler_->InitializeHandler(); |
| 127 initialized_handlers_ = true; | 127 initialized_handlers_ = true; |
| 128 } | 128 } |
| 129 core_handler_->InitializePage(); | 129 core_handler_->InitializePage(); |
| 130 proxy_handler_->InitializePage(); | 130 proxy_handler_->InitializePage(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace chromeos | 133 } // namespace chromeos |
| OLD | NEW |