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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } | 143 } |
144 } | 144 } |
145 return result; | 145 return result; |
146 } | 146 } |
147 | 147 |
148 // ChromeBrowserMainPartsWin --------------------------------------------------- | 148 // ChromeBrowserMainPartsWin --------------------------------------------------- |
149 | 149 |
150 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( | 150 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( |
151 const content::MainFunctionParams& parameters) | 151 const content::MainFunctionParams& parameters) |
152 : ChromeBrowserMainParts(parameters) { | 152 : ChromeBrowserMainParts(parameters) { |
| 153 if ((base::win::GetVersion() >= base::win::VERSION_WIN7) && |
| 154 (base::win::IsTouchEnabled())) { |
| 155 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 156 switches::kEnableTouchEvents); |
| 157 } |
153 if (base::win::IsMetroProcess()) { | 158 if (base::win::IsMetroProcess()) { |
154 typedef const wchar_t* (*GetMetroSwitches)(void); | 159 typedef const wchar_t* (*GetMetroSwitches)(void); |
155 GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>( | 160 GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>( |
156 GetProcAddress(base::win::GetMetroModule(), | 161 GetProcAddress(base::win::GetMetroModule(), |
157 "GetMetroCommandLineSwitches")); | 162 "GetMetroCommandLineSwitches")); |
158 string16 metro_switches = (*metro_switches_proc)(); | 163 string16 metro_switches = (*metro_switches_proc)(); |
159 if (!metro_switches.empty()) { | 164 if (!metro_switches.empty()) { |
160 CommandLine extra_switches(CommandLine::NO_PROGRAM); | 165 CommandLine extra_switches(CommandLine::NO_PROGRAM); |
161 extra_switches.ParseFromString(metro_switches); | 166 extra_switches.ParseFromString(metro_switches); |
162 CommandLine::ForCurrentProcess()->AppendArguments(extra_switches, false); | 167 CommandLine::ForCurrentProcess()->AppendArguments(extra_switches, false); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 if (resource_id) | 344 if (resource_id) |
340 return l10n_util::GetStringUTF16(resource_id); | 345 return l10n_util::GetStringUTF16(resource_id); |
341 return string16(); | 346 return string16(); |
342 } | 347 } |
343 | 348 |
344 // static | 349 // static |
345 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 350 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
346 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 351 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
347 installer::SetTranslationDelegate(&delegate); | 352 installer::SetTranslationDelegate(&delegate); |
348 } | 353 } |
OLD | NEW |