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

Side by Side Diff: app/win_util.cc

Issue 113565: Create a new app_strings target that builds strings for the app_base and even... (Closed) Base URL: svn://chrome-svn/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 | Annotate | Revision Log
« no previous file with comments | « app/resources/app_strings.grd ('k') | chrome/chrome.sln » ('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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 "app/win_util.h" 5 #include "app/win_util.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlapp.h> 8 #include <atlapp.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #include <dwmapi.h> 10 #include <dwmapi.h>
11 #include <shellapi.h> 11 #include <shellapi.h>
12 #include <shlobj.h> 12 #include <shlobj.h>
13 13
14 #include "app/l10n_util.h" 14 #include "app/l10n_util.h"
15 #include "app/l10n_util_win.h" 15 #include "app/l10n_util_win.h"
16 #include "base/file_util.h" 16 #include "base/file_util.h"
17 #include "base/gfx/gdi_util.h" 17 #include "base/gfx/gdi_util.h"
18 #include "base/gfx/png_encoder.h" 18 #include "base/gfx/png_encoder.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/registry.h" 20 #include "base/registry.h"
21 #include "base/scoped_handle.h" 21 #include "base/scoped_handle.h"
22 #include "base/string_util.h" 22 #include "base/string_util.h"
23 #include "base/win_util.h" 23 #include "base/win_util.h"
24 #include "grit/generated_resources.h" 24 #include "grit/app_strings.h"
25 #include "net/base/mime_util.h" 25 #include "net/base/mime_util.h"
26 26
27 // Ensure that we pick up this link library. 27 // Ensure that we pick up this link library.
28 #pragma comment(lib, "dwmapi.lib") 28 #pragma comment(lib, "dwmapi.lib")
29 29
30 namespace win_util { 30 namespace win_util {
31 31
32 const int kAutoHideTaskbarThicknessPx = 2; 32 const int kAutoHideTaskbarThicknessPx = 2;
33 33
34 namespace { 34 namespace {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return true; 218 return true;
219 } 219 }
220 return false; 220 return false;
221 } 221 }
222 222
223 std::wstring FormatFilterForExtensions( 223 std::wstring FormatFilterForExtensions(
224 const std::vector<std::wstring>& file_ext, 224 const std::vector<std::wstring>& file_ext,
225 const std::vector<std::wstring>& ext_desc, 225 const std::vector<std::wstring>& ext_desc,
226 bool include_all_files) { 226 bool include_all_files) {
227 const std::wstring all_ext = L"*.*"; 227 const std::wstring all_ext = L"*.*";
228 const std::wstring all_desc = l10n_util::GetString(IDS_SAVEAS_ALL_FILES); 228 const std::wstring all_desc = l10n_util::GetString(IDS_APP_SAVEAS_ALL_FILES);
229 229
230 DCHECK(file_ext.size()>=ext_desc.size()); 230 DCHECK(file_ext.size()>=ext_desc.size());
231 231
232 std::wstring result; 232 std::wstring result;
233 233
234 for (size_t i=0; i<file_ext.size(); ++i) { 234 for (size_t i=0; i<file_ext.size(); ++i) {
235 std::wstring ext = file_ext[i]; 235 std::wstring ext = file_ext[i];
236 std::wstring desc; 236 std::wstring desc;
237 if (i<ext_desc.size()) 237 if (i<ext_desc.size())
238 desc = ext_desc[i]; 238 desc = ext_desc[i];
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 815
816 gfx::Font GetWindowTitleFont() { 816 gfx::Font GetWindowTitleFont() {
817 NONCLIENTMETRICS ncm; 817 NONCLIENTMETRICS ncm;
818 win_util::GetNonClientMetrics(&ncm); 818 win_util::GetNonClientMetrics(&ncm);
819 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); 819 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
820 ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); 820 ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
821 return gfx::Font::CreateFont(caption_font); 821 return gfx::Font::CreateFont(caption_font);
822 } 822 }
823 823
824 } // namespace win_util 824 } // namespace win_util
OLDNEW
« no previous file with comments | « app/resources/app_strings.grd ('k') | chrome/chrome.sln » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698