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

Side by Side Diff: chrome/browser/gtk/options/fonts_page_gtk.cc

Issue 1132006: Move app/gfx/canvas and app/gfx/font to gfx/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/options/fonts_page_gtk.h" 5 #include "chrome/browser/gtk/options/fonts_page_gtk.h"
6 6
7 #include "app/gfx/font.h"
8 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
9 #include "app/l10n_util_collator.h" 8 #include "app/l10n_util_collator.h"
10 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/gtk/gtk_util.h" 10 #include "chrome/browser/gtk/gtk_util.h"
12 #include "chrome/browser/gtk/options/options_layout_gtk.h" 11 #include "chrome/browser/gtk/options/options_layout_gtk.h"
13 #include "chrome/browser/profile.h" 12 #include "chrome/browser/profile.h"
14 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "gfx/font.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 16
17 namespace { 17 namespace {
18 18
19 // Make a Gtk font name string from a font family name and pixel size. 19 // Make a Gtk font name string from a font family name and pixel size.
20 std::string MakeFontName(std::wstring family_name, int pixel_size) { 20 std::string MakeFontName(std::wstring family_name, int pixel_size) {
21 // The given font might not be available (the default fonts we use are not 21 // The given font might not be available (the default fonts we use are not
22 // installed by default on some distros). So figure out which font we are 22 // installed by default on some distros). So figure out which font we are
23 // actually falling back to and display that. (See crbug.com/31381.) 23 // actually falling back to and display that. (See crbug.com/31381.)
24 std::wstring actual_family_name = gfx::Font::CreateFont( 24 std::wstring actual_family_name = gfx::Font::CreateFont(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 int index = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box)); 197 int index = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box));
198 if (index < 0 || 198 if (index < 0 ||
199 static_cast<size_t>(index) >= sorted_encoding_list_.size()) { 199 static_cast<size_t>(index) >= sorted_encoding_list_.size()) {
200 NOTREACHED(); 200 NOTREACHED();
201 return; 201 return;
202 } 202 }
203 default_encoding_.SetValue( 203 default_encoding_.SetValue(
204 ASCIIToWide(CharacterEncoding::GetCanonicalEncodingNameByCommandId( 204 ASCIIToWide(CharacterEncoding::GetCanonicalEncodingNameByCommandId(
205 sorted_encoding_list_[index].encoding_id))); 205 sorted_encoding_list_[index].encoding_id)));
206 } 206 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/notifications/balloon_view_gtk.cc ('k') | chrome/browser/gtk/tabs/dragged_tab_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698