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

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

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 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 "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 "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 void SetupFlow::GetDOMMessageHandlers( 159 void SetupFlow::GetDOMMessageHandlers(
160 std::vector<DOMMessageHandler*>* handlers) const { 160 std::vector<DOMMessageHandler*>* handlers) const {
161 // The called will be responsible for deleting this object. 161 // The called will be responsible for deleting this object.
162 handlers->push_back(const_cast<SetupFlow*>(this)); 162 handlers->push_back(const_cast<SetupFlow*>(this));
163 } 163 }
164 164
165 void SetupFlow::GetDialogSize(gfx::Size* size) const { 165 void SetupFlow::GetDialogSize(gfx::Size* size) const {
166 PrefService* prefs = profile_->GetPrefs(); 166 PrefService* prefs = profile_->GetPrefs();
167 gfx::Font approximate_web_font( 167 gfx::Font approximate_web_font(
168 UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily)), 168 UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
169 prefs->GetInteger(prefs::kWebKitDefaultFontSize)); 169 prefs->GetInteger(prefs::kWebKitDefaultFontSize));
170 170
171 // TODO(pranavk) Replace the following SYNC resources with REMOTING Resources. 171 // TODO(pranavk) Replace the following SYNC resources with REMOTING Resources.
172 *size = gfx::GetLocalizedContentsSizeForFont( 172 *size = gfx::GetLocalizedContentsSizeForFont(
173 IDS_SYNC_SETUP_WIZARD_WIDTH_CHARS, 173 IDS_SYNC_SETUP_WIZARD_WIDTH_CHARS,
174 IDS_SYNC_SETUP_WIZARD_HEIGHT_LINES, 174 IDS_SYNC_SETUP_WIZARD_HEIGHT_LINES,
175 approximate_web_font); 175 approximate_web_font);
176 } 176 }
177 177
178 // A callback to notify the delegate that the dialog closed. 178 // A callback to notify the delegate that the dialog closed.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 BrowserThread::PostTask( 259 BrowserThread::PostTask(
260 BrowserThread::UI, FROM_HERE, 260 BrowserThread::UI, FROM_HERE,
261 new DeleteTask<SetupFlowStep>(current_step_.release())); 261 new DeleteTask<SetupFlowStep>(current_step_.release()));
262 } 262 }
263 263
264 current_step_.reset(next_step); 264 current_step_.reset(next_step);
265 StartCurrentStep(); 265 StartCurrentStep();
266 } 266 }
267 267
268 } // namespace remoting 268 } // namespace remoting
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc ('k') | chrome/browser/sync/sync_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698