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

Side by Side Diff: chrome/browser/views/shell_dialogs_win.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/views/sad_tab_view.cc ('k') | chrome/browser/views/status_bubble_views.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/shell_dialogs.h" 5 #include "chrome/browser/shell_dialogs.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 run_state)); 1100 run_state));
1101 } 1101 }
1102 } 1102 }
1103 1103
1104 void SelectFontDialogImpl::FontSelected(LOGFONT logfont, 1104 void SelectFontDialogImpl::FontSelected(LOGFONT logfont,
1105 void* params, 1105 void* params,
1106 RunState run_state) { 1106 RunState run_state) {
1107 if (listener_) { 1107 if (listener_) {
1108 HFONT font = CreateFontIndirect(&logfont); 1108 HFONT font = CreateFontIndirect(&logfont);
1109 if (font) { 1109 if (font) {
1110 listener_->FontSelected(gfx::Font::CreateFont(font), params); 1110 listener_->FontSelected(gfx::Font(font), params);
1111 DeleteObject(font); 1111 DeleteObject(font);
1112 } else { 1112 } else {
1113 listener_->FontSelectionCanceled(params); 1113 listener_->FontSelectionCanceled(params);
1114 } 1114 }
1115 } 1115 }
1116 EndRun(run_state); 1116 EndRun(run_state);
1117 } 1117 }
1118 1118
1119 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { 1119 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) {
1120 if (listener_) 1120 if (listener_)
1121 listener_->FontSelectionCanceled(params); 1121 listener_->FontSelectionCanceled(params);
1122 EndRun(run_state); 1122 EndRun(run_state);
1123 } 1123 }
1124 1124
1125 // static 1125 // static
1126 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { 1126 SelectFontDialog* SelectFontDialog::Create(Listener* listener) {
1127 return new SelectFontDialogImpl(listener); 1127 return new SelectFontDialogImpl(listener);
1128 } 1128 }
OLDNEW
« no previous file with comments | « chrome/browser/views/sad_tab_view.cc ('k') | chrome/browser/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698