 Chromium Code Reviews
 Chromium Code Reviews Issue 2033093003:
  [Notification] Make HTML5 Notification use ActionCenter on Windows 10, behind Flags. 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2033093003:
  [Notification] Make HTML5 Notification use ActionCenter on Windows 10, behind Flags. 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chrome/browser/notifications/notification_platform_bridge_win.h | 
| diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.h b/chrome/browser/notifications/notification_platform_bridge_win.h | 
| similarity index 56% | 
| copy from chrome/browser/notifications/notification_platform_bridge_mac.h | 
| copy to chrome/browser/notifications/notification_platform_bridge_win.h | 
| index ad261aaa79764597f596b48b1d6b0472d580f005..4a113aead532c7d53c7079177fa711cc762fdd18 100644 | 
| --- a/chrome/browser/notifications/notification_platform_bridge_mac.h | 
| +++ b/chrome/browser/notifications/notification_platform_bridge_win.h | 
| @@ -1,29 +1,27 @@ | 
| -// Copyright 2015 The Chromium Authors. All rights reserved. | 
| +// Copyright 2016 The Chromium Authors. All rights reserved. | 
| // Use of this source code is governed by a BSD-style license that can be | 
| // found in the LICENSE file. | 
| -#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 
| -#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 
| +#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_WIN_H_ | 
| +#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_WIN_H_ | 
| + | 
| +#include <windows.ui.notifications.h> | 
| #include <set> | 
| #include <string> | 
| -#include "base/mac/scoped_nsobject.h" | 
| -#include "base/macros.h" | 
| #include "chrome/browser/notifications/notification_platform_bridge.h" | 
| +namespace winui = ABI::Windows::UI; | 
| + | 
| class Notification; | 
| -@class NotificationCenterDelegate; | 
| -@class NSUserNotificationCenter; | 
| -class PrefService; | 
| // This class is an implementation of NotificationPlatformBridge that will | 
| -// send platform notifications to the the MacOSX notification center. | 
| -class NotificationPlatformBridgeMac : public NotificationPlatformBridge { | 
| +// send platform notifications to the Windows Notification Area. | 
| +class NotificationPlatformBridgeWin : public NotificationPlatformBridge { | 
| public: | 
| - explicit NotificationPlatformBridgeMac( | 
| - NSUserNotificationCenter* notification_center); | 
| - ~NotificationPlatformBridgeMac() override; | 
| + NotificationPlatformBridgeWin(); | 
| + ~NotificationPlatformBridgeWin() override; | 
| // NotificationPlatformBridge implementation. | 
| void Display(const std::string& notification_id, | 
| @@ -37,14 +35,11 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge { | 
| std::set<std::string>* notifications) const override; | 
| bool SupportsNotificationCenter() const override; | 
| - private: | 
| - // Cocoa class that receives callbacks from the NSUserNotificationCenter. | 
| - base::scoped_nsobject<NotificationCenterDelegate> delegate_; | 
| + HRESULT OnActivate(winui::Notifications::IToastNotification* notification, | 
| 
chrisha
2016/06/02 21:14:10
No comment for this function?
 
huangs
2016/06/14 01:12:35
Added.  This is callback when notification gets cl
 | 
| + IInspectable* inspectable); | 
| - // The notification center to use, this can be overriden in tests | 
| - NSUserNotificationCenter* notification_center_; | 
| - | 
| - DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); | 
| + private: | 
| + DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeWin); | 
| }; | 
| -#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 
| +#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_WIN_H_ |