Chromium Code Reviews| Index: chrome/browser/geolocation/win7_location_api_win.h |
| diff --git a/chrome/browser/geolocation/win7_location_api_win.h b/chrome/browser/geolocation/win7_location_api_win.h |
| index 78bbed45d5c5ab6e2c457a3eee0ada65ad289433..2c2a6a14e919a49b46cef34450e89ee76b38a4dc 100644 |
| --- a/chrome/browser/geolocation/win7_location_api_win.h |
| +++ b/chrome/browser/geolocation/win7_location_api_win.h |
| @@ -11,6 +11,7 @@ |
| #include <sensors.h> |
| #include <Windows.h> |
| +#include "app/win/scoped_com_initializer.h" |
| #include "base/time.h" |
| struct Geoposition; |
| @@ -21,12 +22,12 @@ typedef HRESULT (WINAPI* PropVariantToDoubleFunction) |
| class Win7LocationApi { |
| public: |
| - // Public for testing. See Create() below for normal usage. |
| - Win7LocationApi(HINSTANCE prop_library, |
| - PropVariantToDoubleFunction PropVariantToDouble_function, |
| - ILocation* locator); |
| + // Public for testing. See Create() above for normal usage. |
|
bulach
2011/01/11 16:46:49
should I rotate my monitor? :)
John Knottenbelt
2011/01/12 11:16:13
Done.
|
| + Win7LocationApi(); |
| + void Init(HINSTANCE prop_library, |
|
bulach
2011/01/11 16:46:49
actually, perhaps make both the ctor and init priv
John Knottenbelt
2011/01/12 11:16:13
Done.
|
| + PropVariantToDoubleFunction PropVariantToDouble_function, |
| + ILocation* locator); |
| virtual ~Win7LocationApi(); |
| - |
| // Attempts to load propsys.dll, initialise |location_| and requests the user |
| // for access to location information. Creates and returns ownership of an |
| // instance of Win7LocationApi if all succeed. |
| @@ -50,6 +51,8 @@ class Win7LocationApi { |
| // This class is responsible for closing it. |
| HINSTANCE prop_lib_; |
| PropVariantToDoubleFunction PropVariantToDouble_function_; |
| + // Ensure that COM has been initialised when we use the class. |
|
bulach
2011/01/11 16:46:49
s/has been initialized/has been initialized for th
John Knottenbelt
2011/01/12 11:16:13
Done.
|
| + app::win::ScopedCOMInitializer com_initializer_; |
|
bulach
2011/01/11 16:46:49
make this as the first member of this class.
John Knottenbelt
2011/01/12 11:16:13
Done.
John Knottenbelt
2011/01/12 11:16:13
Done.
|
| DISALLOW_COPY_AND_ASSIGN(Win7LocationApi); |
| }; |