OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/chrome_url_data_manager.h" | 5 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/ref_counted_memory.h" | 12 #include "base/ref_counted_memory.h" |
13 #include "base/singleton.h" | 13 #include "base/singleton.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/thread.h" | 15 #include "base/thread.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 #include "base/win_util.h" | 18 #include "base/win/windows_version.h" |
19 #endif | 19 #endif |
20 #include "chrome/browser/appcache/view_appcache_internals_job_factory.h" | 20 #include "chrome/browser/appcache/view_appcache_internals_job_factory.h" |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/browser_thread.h" | 22 #include "chrome/browser/browser_thread.h" |
23 #include "chrome/browser/dom_ui/shared_resources_data_source.h" | 23 #include "chrome/browser/dom_ui/shared_resources_data_source.h" |
24 #include "chrome/browser/net/chrome_url_request_context.h" | 24 #include "chrome/browser/net/chrome_url_request_context.h" |
25 #include "chrome/browser/net/view_blob_internals_job_factory.h" | 25 #include "chrome/browser/net/view_blob_internals_job_factory.h" |
26 #include "chrome/browser/net/view_http_cache_job_factory.h" | 26 #include "chrome/browser/net/view_http_cache_job_factory.h" |
27 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
28 #include "chrome/common/ref_counted_util.h" | 28 #include "chrome/common/ref_counted_util.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 // static | 298 // static |
299 void ChromeURLDataManager::DataSource::SetFontAndTextDirection( | 299 void ChromeURLDataManager::DataSource::SetFontAndTextDirection( |
300 DictionaryValue* localized_strings) { | 300 DictionaryValue* localized_strings) { |
301 localized_strings->SetString("fontfamily", | 301 localized_strings->SetString("fontfamily", |
302 l10n_util::GetStringUTF16(IDS_WEB_FONT_FAMILY)); | 302 l10n_util::GetStringUTF16(IDS_WEB_FONT_FAMILY)); |
303 | 303 |
304 int web_font_size_id = IDS_WEB_FONT_SIZE; | 304 int web_font_size_id = IDS_WEB_FONT_SIZE; |
305 #if defined(OS_WIN) | 305 #if defined(OS_WIN) |
306 // Some fonts used for some languages changed a lot in terms of the font | 306 // Some fonts used for some languages changed a lot in terms of the font |
307 // metric in Vista. So, we need to use different size before Vista. | 307 // metric in Vista. So, we need to use different size before Vista. |
308 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) | 308 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
309 web_font_size_id = IDS_WEB_FONT_SIZE_XP; | 309 web_font_size_id = IDS_WEB_FONT_SIZE_XP; |
310 #endif | 310 #endif |
311 localized_strings->SetString("fontsize", | 311 localized_strings->SetString("fontsize", |
312 l10n_util::GetStringUTF16(web_font_size_id)); | 312 l10n_util::GetStringUTF16(web_font_size_id)); |
313 | 313 |
314 localized_strings->SetString("textdirection", | 314 localized_strings->SetString("textdirection", |
315 base::i18n::IsRTL() ? "rtl" : "ltr"); | 315 base::i18n::IsRTL() ? "rtl" : "ltr"); |
316 } | 316 } |
317 | 317 |
318 URLRequestJob* ChromeURLDataManager::Factory(URLRequest* request, | 318 URLRequestJob* ChromeURLDataManager::Factory(URLRequest* request, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 net::ERR_INVALID_URL)); | 423 net::ERR_INVALID_URL)); |
424 } | 424 } |
425 } | 425 } |
426 | 426 |
427 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, | 427 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, |
428 const FilePath& path) | 428 const FilePath& path) |
429 : URLRequestFileJob(request, path) { | 429 : URLRequestFileJob(request, path) { |
430 } | 430 } |
431 | 431 |
432 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } | 432 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } |
OLD | NEW |