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

Side by Side Diff: chrome/browser/views/shell_dialogs_win.cc

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
« no previous file with comments | « chrome/browser/views/shelf_item_dialog.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 &SelectFontDialogImpl::FontNotSelected, params, run_state)); 705 &SelectFontDialogImpl::FontNotSelected, params, run_state));
706 } 706 }
707 } 707 }
708 708
709 void SelectFontDialogImpl::FontSelected(LOGFONT logfont, 709 void SelectFontDialogImpl::FontSelected(LOGFONT logfont,
710 void* params, 710 void* params,
711 RunState run_state) { 711 RunState run_state) {
712 if (listener_) { 712 if (listener_) {
713 HFONT font = CreateFontIndirect(&logfont); 713 HFONT font = CreateFontIndirect(&logfont);
714 if (font) { 714 if (font) {
715 listener_->FontSelected(ChromeFont::CreateFont(font), params); 715 listener_->FontSelected(gfx::Font::CreateFont(font), params);
716 DeleteObject(font); 716 DeleteObject(font);
717 } else { 717 } else {
718 listener_->FontSelectionCanceled(params); 718 listener_->FontSelectionCanceled(params);
719 } 719 }
720 } 720 }
721 EndRun(run_state); 721 EndRun(run_state);
722 } 722 }
723 723
724 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { 724 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) {
725 if (listener_) 725 if (listener_)
726 listener_->FontSelectionCanceled(params); 726 listener_->FontSelectionCanceled(params);
727 EndRun(run_state); 727 EndRun(run_state);
728 } 728 }
729 729
730 // static 730 // static
731 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { 731 SelectFontDialog* SelectFontDialog::Create(Listener* listener) {
732 return new SelectFontDialogImpl(listener); 732 return new SelectFontDialogImpl(listener);
733 } 733 }
OLDNEW
« no previous file with comments | « chrome/browser/views/shelf_item_dialog.cc ('k') | chrome/browser/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698