OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/base/webui/web_ui_util.h" | 5 #include "ui/base/webui/web_ui_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "grit/app_locale_settings.h" | |
16 #include "net/base/escape.h" | 15 #include "net/base/escape.h" |
17 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
18 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
19 #include "ui/base/window_open_disposition.h" | 18 #include "ui/base/window_open_disposition.h" |
20 #include "ui/gfx/codec/png_codec.h" | 19 #include "ui/gfx/codec/png_codec.h" |
21 #include "ui/gfx/font.h" | 20 #include "ui/gfx/font.h" |
22 #include "ui/gfx/image/image_skia.h" | 21 #include "ui/gfx/image/image_skia.h" |
| 22 #include "ui/strings/grit/app_locale_settings.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
26 #include "base/win/windows_version.h" | 26 #include "base/win/windows_version.h" |
27 #endif | 27 #endif |
28 | 28 |
29 namespace webui { | 29 namespace webui { |
30 | 30 |
31 std::string GetBitmapDataUrl(const SkBitmap& bitmap) { | 31 std::string GetBitmapDataUrl(const SkBitmap& bitmap) { |
32 TRACE_EVENT2("oobe", "GetImageDataUrl", | 32 TRACE_EVENT2("oobe", "GetImageDataUrl", |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 #endif | 147 #endif |
148 | 148 |
149 localized_strings->SetString("fontfamily", font_family); | 149 localized_strings->SetString("fontfamily", font_family); |
150 localized_strings->SetString("fontsize", | 150 localized_strings->SetString("fontsize", |
151 l10n_util::GetStringUTF8(web_font_size_id)); | 151 l10n_util::GetStringUTF8(web_font_size_id)); |
152 localized_strings->SetString("textdirection", | 152 localized_strings->SetString("textdirection", |
153 base::i18n::IsRTL() ? "rtl" : "ltr"); | 153 base::i18n::IsRTL() ? "rtl" : "ltr"); |
154 } | 154 } |
155 | 155 |
156 } // namespace webui | 156 } // namespace webui |
OLD | NEW |