diff --git a/brightray/browser/platform_notification_service_impl.cc b/brightray/browser/platform_notification_service_impl.cc index db8572ee8987..36045f6db4f2 100644 --- a/brightray/browser/platform_notification_service_impl.cc +++ b/brightray/browser/platform_notification_service_impl.cc @@ -8,6 +8,10 @@ #include "content/public/browser/desktop_notification_delegate.h" +#if defined(OS_WIN) +#include "base/win/windows_version.h" +#endif + namespace brightray { // static @@ -20,8 +24,16 @@ PlatformNotificationServiceImpl::PlatformNotificationServiceImpl() {} PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {} NotificationPresenter* PlatformNotificationServiceImpl::notification_presenter() { - if (!notification_presenter_) + if (!notification_presenter_) { + #if defined(OS_WIN) + // Bail out if on Windows 7 or even lower, no operating will follow + if (base::win::GetVersion() < base::win::VERSION_WIN8) { + return notification_presenter_.get(); + } + #endif + // Create a new presenter if on OS X, Linux, or Windows 8+ notification_presenter_.reset(NotificationPresenter::Create()); + } return notification_presenter_.get(); }