OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 } | 156 } |
157 return result; | 157 return result; |
158 } | 158 } |
159 | 159 |
160 // ChromeBrowserMainPartsWin --------------------------------------------------- | 160 // ChromeBrowserMainPartsWin --------------------------------------------------- |
161 | 161 |
162 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( | 162 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( |
163 const content::MainFunctionParams& parameters) | 163 const content::MainFunctionParams& parameters) |
164 : ChromeBrowserMainParts(parameters) { | 164 : ChromeBrowserMainParts(parameters) { |
165 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | |
166 CommandLine::ForCurrentProcess()->AppendSwitch( | |
167 switches::kEnableTouchEvents); | |
168 } | |
169 } | 165 } |
170 | 166 |
171 ChromeBrowserMainPartsWin::~ChromeBrowserMainPartsWin() { | 167 ChromeBrowserMainPartsWin::~ChromeBrowserMainPartsWin() { |
172 } | 168 } |
173 | 169 |
174 void ChromeBrowserMainPartsWin::ToolkitInitialized() { | 170 void ChromeBrowserMainPartsWin::ToolkitInitialized() { |
175 ChromeBrowserMainParts::ToolkitInitialized(); | 171 ChromeBrowserMainParts::ToolkitInitialized(); |
176 gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont; | 172 gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont; |
177 gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize; | 173 gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize; |
178 } | 174 } |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if (resource_id) | 338 if (resource_id) |
343 return l10n_util::GetStringUTF16(resource_id); | 339 return l10n_util::GetStringUTF16(resource_id); |
344 return string16(); | 340 return string16(); |
345 } | 341 } |
346 | 342 |
347 // static | 343 // static |
348 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 344 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
349 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 345 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
350 installer::SetTranslationDelegate(&delegate); | 346 installer::SetTranslationDelegate(&delegate); |
351 } | 347 } |
OLD | NEW |