Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Unified Diff: content/renderer/notification_provider.h

Issue 740543003: Remove the old Web Notification code-path (Chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unittest references Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/notification_icon_loader.cc ('k') | content/renderer/notification_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/notification_provider.h
diff --git a/content/renderer/notification_provider.h b/content/renderer/notification_provider.h
deleted file mode 100644
index 7428e2f5da1a5329df3caf300a0130650c8a1928..0000000000000000000000000000000000000000
--- a/content/renderer/notification_provider.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 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 CONTENT_RENDERER_NOTIFICATION_PROVIDER_H_
-#define CONTENT_RENDERER_NOTIFICATION_PROVIDER_H_
-
-#include "base/memory/scoped_vector.h"
-#include "content/public/renderer/render_frame_observer.h"
-#include "content/renderer/active_notification_tracker.h"
-#include "third_party/WebKit/public/web/WebNotification.h"
-#include "third_party/WebKit/public/web/WebNotificationPresenter.h"
-
-class SkBitmap;
-
-namespace content {
-
-class NotificationIconLoader;
-
-// NotificationProvider class is owned by the RenderFrame. Only to be used on
-// the main thread.
-class NotificationProvider : public RenderFrameObserver,
- public blink::WebNotificationPresenter {
- public:
- explicit NotificationProvider(RenderFrame* render_frame);
- ~NotificationProvider() override;
-
- private:
- // RenderFrameObserver implementation.
- bool OnMessageReceived(const IPC::Message& message) override;
-
- // blink::WebNotificationPresenter implementation.
- virtual bool show(const blink::WebNotification& proxy);
- virtual void cancel(const blink::WebNotification& proxy);
- virtual void objectDestroyed(const blink::WebNotification& proxy);
- virtual blink::WebNotificationPresenter::Permission checkPermission(
- const blink::WebSecurityOrigin& origin);
-
- // Sends an IPC to the browser process to display the notification identified
- // by |notification|, accompanied by the downloaded icon.
- void DisplayNotification(int notification_id, const SkBitmap& icon);
-
- // Removes the IconDownload object associated with |notification_id|, stopping
- // any in-progress download. Returns whether the notification was removed.
- bool RemovePendingNotification(int notification_id);
-
- // IPC handlers.
- void OnDisplay(int id);
- void OnClose(int id, bool by_user);
- void OnClick(int id);
- void OnNavigate();
-
- // A vector tracking notifications whose icon is still being downloaded.
- typedef ScopedVector<NotificationIconLoader> PendingNotifications;
- PendingNotifications pending_notifications_;
-
- // A tracker object which manages the active notifications and the IDs
- // that are used to refer to them over IPC.
- ActiveNotificationTracker manager_;
-
- DISALLOW_COPY_AND_ASSIGN(NotificationProvider);
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_NOTIFICATION_PROVIDER_H_
« no previous file with comments | « content/renderer/notification_icon_loader.cc ('k') | content/renderer/notification_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698