Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: chrome/browser/dom_ui/downloads_ui.cc

Issue 71005: Merge 13114 - Make the font family and the font size used in dom UI localizab... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.cc ('k') | chrome/browser/dom_ui/history_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/downloads_ui.h" 5 #include "chrome/browser/dom_ui/downloads_ui.h"
6 6
7 #include "base/gfx/png_encoder.h" 7 #include "base/gfx/png_encoder.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "base/time_format.h" 10 #include "base/time_format.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Controls. 87 // Controls.
88 localized_strings.SetString(L"control_pause", 88 localized_strings.SetString(L"control_pause",
89 l10n_util::GetString(IDS_DOWNLOAD_LINK_PAUSE)); 89 l10n_util::GetString(IDS_DOWNLOAD_LINK_PAUSE));
90 localized_strings.SetString(L"control_showinfolder", 90 localized_strings.SetString(L"control_showinfolder",
91 l10n_util::GetString(IDS_DOWNLOAD_LINK_SHOW)); 91 l10n_util::GetString(IDS_DOWNLOAD_LINK_SHOW));
92 localized_strings.SetString(L"control_cancel", 92 localized_strings.SetString(L"control_cancel",
93 l10n_util::GetString(IDS_DOWNLOAD_LINK_CANCEL)); 93 l10n_util::GetString(IDS_DOWNLOAD_LINK_CANCEL));
94 localized_strings.SetString(L"control_resume", 94 localized_strings.SetString(L"control_resume",
95 l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME)); 95 l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME));
96 96
97 localized_strings.SetString(L"textdirection", 97 SetFontAndTextDirection(&localized_strings);
98 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
99 L"rtl" : L"ltr");
100 98
101 static const StringPiece downloads_html( 99 static const StringPiece downloads_html(
102 ResourceBundle::GetSharedInstance().GetRawDataResource( 100 ResourceBundle::GetSharedInstance().GetRawDataResource(
103 IDR_DOWNLOADS_HTML)); 101 IDR_DOWNLOADS_HTML));
104 const std::string full_html = jstemplate_builder::GetTemplateHtml( 102 const std::string full_html = jstemplate_builder::GetTemplateHtml(
105 downloads_html, &localized_strings, "t"); 103 downloads_html, &localized_strings, "t");
106 104
107 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 105 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
108 html_bytes->data.resize(full_html.size()); 106 html_bytes->data.resize(full_html.size());
109 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin()); 107 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin());
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 handler->Init(); 502 handler->Init();
505 503
506 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); 504 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource();
507 505
508 // Set up the chrome-ui://downloads/ source. 506 // Set up the chrome-ui://downloads/ source.
509 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 507 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
510 NewRunnableMethod(&chrome_url_data_manager, 508 NewRunnableMethod(&chrome_url_data_manager,
511 &ChromeURLDataManager::AddDataSource, 509 &ChromeURLDataManager::AddDataSource,
512 html_source)); 510 html_source));
513 } 511 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.cc ('k') | chrome/browser/dom_ui/history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698