| 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 "base/win/metro.h" | 5 #include "base/win/metro.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 | 8 |
| 9 namespace base { | 9 namespace base { |
| 10 namespace win { | 10 namespace win { |
| 11 | 11 |
| 12 const char kActivateApplication[] = "ActivateApplication"; |
| 13 |
| 12 HMODULE GetMetroModule() { | 14 HMODULE GetMetroModule() { |
| 13 return GetModuleHandleA("metro_driver.dll"); | 15 return GetModuleHandleA("metro_driver.dll"); |
| 14 } | 16 } |
| 15 | 17 |
| 16 wchar_t* LocalAllocAndCopyString(const string16& src) { | 18 wchar_t* LocalAllocAndCopyString(const string16& src) { |
| 17 size_t dest_size = (src.length() + 1) * sizeof(wchar_t); | 19 size_t dest_size = (src.length() + 1) * sizeof(wchar_t); |
| 18 wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size)); | 20 wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size)); |
| 19 base::wcslcpy(dest, src.c_str(), dest_size); | 21 base::wcslcpy(dest, src.c_str(), dest_size); |
| 20 return dest; | 22 return dest; |
| 21 } | 23 } |
| 22 | 24 |
| 23 } // namespace win | 25 } // namespace win |
| 24 } // namespace base | 26 } // namespace base |
| 25 | |
| OLD | NEW |