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

Side by Side Diff: printing/print_settings_initializer.cc

Issue 22835002: Supports gfx::FontList in gfx::Canvas and ui::ElideText family. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: layout_text.h => text_utils.h Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/status_bubble_gtk.cc ('k') | ui/base/cocoa/menu_controller.mm » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "printing/print_settings_initializer.h" 5 #include "printing/print_settings_initializer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 10
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "printing/print_job_constants.h" 16 #include "printing/print_job_constants.h"
17 #include "printing/print_settings.h" 17 #include "printing/print_settings.h"
18 #include "printing/units.h" 18 #include "printing/units.h"
19 #include "ui/base/text/text_elider.h" 19 #include "ui/base/text/text_elider.h"
20 #include "ui/gfx/font.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 22
22 using base::DictionaryValue; 23 using base::DictionaryValue;
23 24
24 namespace printing { 25 namespace printing {
25 26
26 void PrintSettingsInitializer::InitHeaderFooterStrings( 27 void PrintSettingsInitializer::InitHeaderFooterStrings(
27 const DictionaryValue& job_settings, 28 const DictionaryValue& job_settings,
28 PrintSettings* print_settings) { 29 PrintSettings* print_settings) {
29 if (!job_settings.GetBoolean(kSettingHeaderFooterEnabled, 30 if (!job_settings.GetBoolean(kSettingHeaderFooterEnabled,
(...skipping 10 matching lines...) Expand all
40 !job_settings.GetString(kSettingHeaderFooterURL, &url)) { 41 !job_settings.GetString(kSettingHeaderFooterURL, &url)) {
41 NOTREACHED(); 42 NOTREACHED();
42 } 43 }
43 44
44 print_settings->date = date; 45 print_settings->date = date;
45 print_settings->title = title; 46 print_settings->title = title;
46 print_settings->url = ui::ElideUrl(GURL(url), gfx::Font(), 0, std::string()); 47 print_settings->url = ui::ElideUrl(GURL(url), gfx::Font(), 0, std::string());
47 } 48 }
48 49
49 } // namespace printing 50 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/status_bubble_gtk.cc ('k') | ui/base/cocoa/menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698