Add ShouldDisplayOverFullscreen support to web notifications.

Added WebNotificationDelegate base class for common functionality of
NotificationObjectProxy and PersistentNotificationDelegate.

Note that this change does not enable this functionality.

BUG=481318

Review-Url: https://codereview.chromium.org/2377553003
Cr-Commit-Position: refs/heads/master@{#421963}
diff --git a/chrome/browser/notifications/web_notification_delegate.h b/chrome/browser/notifications/web_notification_delegate.h
new file mode 100644
index 0000000..93c46ab
--- /dev/null
+++ b/chrome/browser/notifications/web_notification_delegate.h
@@ -0,0 +1,49 @@
+// 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_WEB_NOTIFICATION_DELEGATE_H_
+#define CHROME_BROWSER_NOTIFICATIONS_WEB_NOTIFICATION_DELEGATE_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "chrome/browser/notifications/notification_delegate.h"
+#include "url/gurl.h"
+
+namespace content {
+class BrowserContext;
+}
+
+// Base class for the PersistentNotificationDelegate and the
+// NotificationObjectProxy. All common functionality for displaying web
+// notifications is found here.
+// TODO(peter, crbug.com/596161): Migrate this functionality offered by the
+// delegate to the NotificationDisplayService.
+class WebNotificationDelegate : public NotificationDelegate {
+ public:
+  // NotificationDelegate implementation.
+  std::string id() const override;
+  void SettingsClick() override;
+  bool ShouldDisplaySettingsButton() override;
+  bool ShouldDisplayOverFullscreen() const override;
+
+ protected:
+  WebNotificationDelegate(content::BrowserContext* browser_context,
+                          const std::string& notification_id,
+                          const GURL& origin);
+
+  ~WebNotificationDelegate() override;
+
+  content::BrowserContext* browser_context() { return browser_context_; }
+  const GURL& origin() { return origin_; }
+
+ private:
+  content::BrowserContext* browser_context_;
+  std::string notification_id_;
+  GURL origin_;
+
+  DISALLOW_COPY_AND_ASSIGN(WebNotificationDelegate);
+};
+
+#endif  // CHROME_BROWSER_NOTIFICATIONS_WEB_NOTIFICATION_DELEGATE_H_