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 "stdafx.h" | 5 #include "stdafx.h" |
6 #include "win8/metro_driver/metro_driver.h" | 6 #include "win8/metro_driver/metro_driver.h" |
7 | 7 |
8 #include <roerrorapi.h> | 8 #include <roerrorapi.h> |
9 #include <shobjidl.h> | 9 #include <shobjidl.h> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 mswr::ComPtr<winapp::Core::ICoreApplication> InitWindows7(); | 80 mswr::ComPtr<winapp::Core::ICoreApplication> InitWindows7(); |
81 | 81 |
82 extern "C" __declspec(dllexport) | 82 extern "C" __declspec(dllexport) |
83 int InitMetro() { | 83 int InitMetro() { |
84 // Metro mode or its emulation is not supported in Vista or XP. | 84 // Metro mode or its emulation is not supported in Vista or XP. |
85 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 85 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
86 return 1; | 86 return 1; |
87 // Initialize the command line. | 87 // Initialize the command line. |
88 CommandLine::Init(0, NULL); | 88 base::CommandLine::Init(0, NULL); |
89 // Initialize the logging system. | 89 // Initialize the logging system. |
90 logging::LoggingSettings settings; | 90 logging::LoggingSettings settings; |
91 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 91 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
92 logging::InitLogging(settings); | 92 logging::InitLogging(settings); |
93 #if defined(NDEBUG) | 93 #if defined(NDEBUG) |
94 logging::SetMinLogLevel(logging::LOG_ERROR); | 94 logging::SetMinLogLevel(logging::LOG_ERROR); |
95 #else | 95 #else |
96 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 96 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
97 HANDLE registration = | 97 HANDLE registration = |
98 ::AddVectoredExceptionHandler(TRUE, ErrorReportingHandler); | 98 ::AddVectoredExceptionHandler(TRUE, ErrorReportingHandler); |
(...skipping 25 matching lines...) Expand all Loading... |
124 extern "C" __declspec(dllexport) | 124 extern "C" __declspec(dllexport) |
125 HRESULT ActivateApplication(const wchar_t* app_id) { | 125 HRESULT ActivateApplication(const wchar_t* app_id) { |
126 base::win::ScopedComPtr<IApplicationActivationManager> activator; | 126 base::win::ScopedComPtr<IApplicationActivationManager> activator; |
127 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); | 127 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); |
128 if (SUCCEEDED(hr)) { | 128 if (SUCCEEDED(hr)) { |
129 DWORD pid = 0; | 129 DWORD pid = 0; |
130 hr = activator->ActivateApplication(app_id, L"", AO_NONE, &pid); | 130 hr = activator->ActivateApplication(app_id, L"", AO_NONE, &pid); |
131 } | 131 } |
132 return hr; | 132 return hr; |
133 } | 133 } |
OLD | NEW |