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

Side by Side Diff: chrome/browser/remoting/setup_flow.cc

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/sync/sync_setup_flow.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) 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/remoting/setup_flow.h" 5 #include "chrome/browser/remoting/setup_flow.h"
6 6
7 #include "app/gfx/font_util.h" 7 #include "app/gfx/font_util.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 23 matching lines...) Expand all
34 SetupFlow::SetupFlow(const std::string& args, Profile* profile) 34 SetupFlow::SetupFlow(const std::string& args, Profile* profile)
35 : dialog_start_args_(args), 35 : dialog_start_args_(args),
36 profile_(profile) { 36 profile_(profile) {
37 } 37 }
38 38
39 SetupFlow::~SetupFlow() { 39 SetupFlow::~SetupFlow() {
40 } 40 }
41 41
42 void SetupFlow::GetDialogSize(gfx::Size* size) const { 42 void SetupFlow::GetDialogSize(gfx::Size* size) const {
43 PrefService* prefs = profile_->GetPrefs(); 43 PrefService* prefs = profile_->GetPrefs();
44 gfx::Font approximate_web_font = gfx::Font::CreateFont( 44 gfx::Font approximate_web_font(
45 UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)), 45 UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
46 prefs->GetInteger(prefs::kWebKitDefaultFontSize)); 46 prefs->GetInteger(prefs::kWebKitDefaultFontSize));
47 47
48 // TODO(pranavk) Replace the following SYNC resources with REMOTING Resources. 48 // TODO(pranavk) Replace the following SYNC resources with REMOTING Resources.
49 *size = gfx::GetLocalizedContentsSizeForFont( 49 *size = gfx::GetLocalizedContentsSizeForFont(
50 IDS_SYNC_SETUP_WIZARD_WIDTH_CHARS, 50 IDS_SYNC_SETUP_WIZARD_WIDTH_CHARS,
51 IDS_SYNC_SETUP_WIZARD_HEIGHT_LINES, 51 IDS_SYNC_SETUP_WIZARD_HEIGHT_LINES,
52 approximate_web_font); 52 approximate_web_font);
53 } 53 }
54 54
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (b) { 88 if (b) {
89 b->BrowserShowHtmlDialog(flow, NULL); 89 b->BrowserShowHtmlDialog(flow, NULL);
90 } else { 90 } else {
91 delete flow; 91 delete flow;
92 return NULL; 92 return NULL;
93 } 93 }
94 return flow; 94 return flow;
95 } 95 }
96 96
97 } // namespace remoting_setup 97 } // namespace remoting_setup
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/sync/sync_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698