Windows Toasts: Don't call WFI statically
This commit is contained in:
parent
2c84d70f8f
commit
b4ac9547c4
1 changed files with 4 additions and 9 deletions
|
@ -12,20 +12,15 @@
|
||||||
using namespace ABI::Windows::Data::Xml::Dom;
|
using namespace ABI::Windows::Data::Xml::Dom;
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
// Initialize Windows Runtime
|
|
||||||
|
|
||||||
HRESULT init = Windows::Foundation::Initialize(RO_INIT_MULTITHREADED);
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
WindowsToastNotification::WindowsToastNotification(
|
WindowsToastNotification::WindowsToastNotification(
|
||||||
const std::string& app_name,
|
const std::string& app_name,
|
||||||
scoped_ptr<content::DesktopNotificationDelegate> delegate)
|
scoped_ptr<content::DesktopNotificationDelegate> delegate)
|
||||||
: delegate_(delegate.Pass()),
|
: delegate_(delegate.Pass()),
|
||||||
weak_factory_(this) {
|
weak_factory_(this) {
|
||||||
|
// If it wasn't for Windows 7, we could do this statically
|
||||||
|
HRESULT init = Windows::Foundation::Initialize(RO_INIT_MULTITHREADED);
|
||||||
|
|
||||||
ScopedHString toast_manager_str(
|
ScopedHString toast_manager_str(
|
||||||
RuntimeClass_Windows_UI_Notifications_ToastNotificationManager);
|
RuntimeClass_Windows_UI_Notifications_ToastNotificationManager);
|
||||||
if (!toast_manager_str.success())
|
if (!toast_manager_str.success())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue