Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / tools / measure_page_load_time / ie_bho / MeasurePageLoadTime.cpp
blobd3a8d542519d218446128966213606e04e0cbe78
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.
5 // MeasurePageLoadTime.cpp : Implementation of DLL Exports.
7 #include "stdafx.h"
8 #include "resource.h"
9 #include "MeasurePageLoadTime.h"
12 class CMeasurePageLoadTimeModule : public CAtlDllModuleT< CMeasurePageLoadTimeModule >
14 public :
15 DECLARE_LIBID(LIBID_MeasurePageLoadTimeLib)
16 DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MEASUREPAGELOADTIME, "{56C6D9F9-643C-4F6E-906C-5F7CECB23C24}")
19 CMeasurePageLoadTimeModule _AtlModule;
22 #ifdef _MANAGED
23 #pragma managed(push, off)
24 #endif
26 // DLL Entry Point
27 extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
29 if (dwReason == DLL_PROCESS_ATTACH)
31 DisableThreadLibraryCalls(hInstance);
33 return _AtlModule.DllMain(dwReason, lpReserved);
36 #ifdef _MANAGED
37 #pragma managed(pop)
38 #endif
43 // Used to determine whether the DLL can be unloaded by OLE
44 STDAPI DllCanUnloadNow(void)
46 return _AtlModule.DllCanUnloadNow();
50 // Returns a class factory to create an object of the requested type
51 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
53 return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
57 // DllRegisterServer - Adds entries to the system registry
58 STDAPI DllRegisterServer(void)
60 // registers object, typelib and all interfaces in typelib
61 HRESULT hr = _AtlModule.DllRegisterServer();
62 return hr;
66 // DllUnregisterServer - Removes entries from the system registry
67 STDAPI DllUnregisterServer(void)
69 HRESULT hr = _AtlModule.DllUnregisterServer();
70 return hr;