• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include <Objbase.h>
6 #include <commctrl.h>
7 #include <windows.h>
8 
9 #include "libcef/browser/alloy/alloy_browser_main.h"
10 
11 #include "base/logging.h"
12 
PlatformInitialize()13 void AlloyBrowserMainParts::PlatformInitialize() {
14   HRESULT res;
15 
16   // Initialize common controls.
17   res = CoInitialize(nullptr);
18   DCHECK(SUCCEEDED(res));
19   INITCOMMONCONTROLSEX InitCtrlEx;
20   InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
21   InitCtrlEx.dwICC = ICC_STANDARD_CLASSES;
22   InitCommonControlsEx(&InitCtrlEx);
23 
24   // Start COM stuff.
25   res = OleInitialize(nullptr);
26   DCHECK(SUCCEEDED(res));
27 }
28