| Index: chrome/browser/printing/cloud_print/privet_notifications.h
|
| diff --git a/chrome/browser/printing/cloud_print/privet_notifications.h b/chrome/browser/printing/cloud_print/privet_notifications.h
|
| index 2e9df8d1f2eeaff6ab489bf40aca09e57132407d..a6a64fae4d332c18419aed4578560f29a4d31455 100644
|
| --- a/chrome/browser/printing/cloud_print/privet_notifications.h
|
| +++ b/chrome/browser/printing/cloud_print/privet_notifications.h
|
| @@ -16,6 +16,7 @@
|
| #include "components/prefs/pref_member.h"
|
|
|
| class NotificationUIManager;
|
| +class Profile;
|
|
|
| namespace content {
|
| class BrowserContext;
|
| @@ -30,6 +31,7 @@ namespace cloud_print {
|
| class PrivetDeviceLister;
|
| class PrivetHTTPAsynchronousFactory;
|
| class PrivetHTTPResolution;
|
| +class PrivetNotificationDelegate;
|
| struct DeviceDescription;
|
|
|
| #if defined(ENABLE_MDNS)
|
| @@ -119,6 +121,10 @@ class PrivetNotificationService
|
| void OnNotificationsEnabledChanged();
|
| void StartLister();
|
|
|
| + // Virtual for testing. The returned delegate is refcounted.
|
| + virtual PrivetNotificationDelegate* CreateNotificationDelegate(
|
| + Profile* profile);
|
| +
|
| content::BrowserContext* const profile_;
|
| std::unique_ptr<PrivetDeviceLister> device_lister_;
|
| scoped_refptr<local_discovery::ServiceDiscoverySharedClient>
|
| @@ -133,20 +139,24 @@ class PrivetNotificationService
|
|
|
| class PrivetNotificationDelegate : public NotificationDelegate {
|
| public:
|
| - explicit PrivetNotificationDelegate(content::BrowserContext* profile);
|
| + explicit PrivetNotificationDelegate(Profile* profile);
|
|
|
| // NotificationDelegate implementation.
|
| std::string id() const override;
|
| void ButtonClick(int button_index) override;
|
|
|
| - private:
|
| + protected:
|
| // Refcounted.
|
| ~PrivetNotificationDelegate() override;
|
|
|
| - void OpenTab(const GURL& url);
|
| - void DisableNotifications();
|
| + private:
|
| + // ButtonClick() response handlers. Virtual for testing.
|
| + virtual void OpenTab(const GURL& url);
|
| + virtual void DisableNotifications();
|
|
|
| - content::BrowserContext* const profile_;
|
| + void CloseNotification();
|
| +
|
| + Profile* const profile_;
|
| };
|
|
|
| } // namespace cloud_print
|
|
|