Windows Toasts: Enable Basic Notifications
To test this puppy out, build and open up the Chromium Dev Tools. Then, run `new Notification("Test title", {body: "Test body"});`
This commit is contained in:
parent
54997db5f2
commit
498bff9e5a
7 changed files with 819 additions and 2 deletions
38
brightray/browser/win/notification_presenter_win.h
Normal file
38
brightray/browser/win/notification_presenter_win.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Copyright (c) 2013 Patrick Reynolds <piki@github.com>. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE-CHROMIUM file.
|
||||
|
||||
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_WIN_H_
|
||||
#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_WIN_H_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "browser/notification_presenter.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
namespace brightray {
|
||||
|
||||
class NotificationPresenterWin : public NotificationPresenter {
|
||||
public:
|
||||
NotificationPresenterWin();
|
||||
~NotificationPresenterWin();
|
||||
|
||||
// NotificationPresenter:
|
||||
void ShowNotification(
|
||||
const content::PlatformNotificationData&,
|
||||
const SkBitmap& icon,
|
||||
scoped_ptr<content::DesktopNotificationDelegate> delegate,
|
||||
base::Closure* cancel_callback) override;
|
||||
|
||||
void RemoveNotification();
|
||||
|
||||
private:
|
||||
|
||||
void CancelNotification();
|
||||
void DeleteNotification();
|
||||
};
|
||||
|
||||
} // namespace brightray
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue