Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_NOTIFICATION_MESSAGE_FILTER_H_ | |
| 6 #define CONTENT_BROWSER_NOTIFICATION_MESSAGE_FILTER_H_ | |
| 7 | |
| 8 #include "content/public/browser/browser_message_filter.h" | |
| 9 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" | |
|
Mike West
2014/10/24 13:20:18
I think you can forward-declare this.
Peter Beverloo
2014/10/24 13:57:35
Nope, it's an enum and we can't forward declare (n
| |
| 10 | |
| 11 class GURL; | |
| 12 | |
| 13 namespace content { | |
| 14 | |
| 15 class BrowserContext; | |
| 16 class ContentClient; | |
| 17 class ResourceContext; | |
| 18 struct ShowDesktopNotificationHostMsgParams; | |
| 19 | |
| 20 class NotificationMessageFilter : public BrowserMessageFilter { | |
| 21 public: | |
| 22 NotificationMessageFilter( | |
| 23 int process_id, | |
| 24 ResourceContext* resource_context, | |
| 25 BrowserContext* browser_context); | |
| 26 | |
| 27 // BrowserMessageFilter implementation. Called on the UI thread. | |
| 28 bool OnMessageReceived(const IPC::Message& message) override; | |
| 29 void OverrideThreadForMessage( | |
| 30 const IPC::Message& message, content::BrowserThread::ID* thread) override; | |
| 31 | |
| 32 protected: | |
| 33 ~NotificationMessageFilter() override; | |
| 34 | |
| 35 private: | |
| 36 void OnCheckNotificationPermission( | |
| 37 const GURL& origin, blink::WebNotificationPermission* permission); | |
| 38 void OnShowPlatformNotification( | |
| 39 int notification_id, const ShowDesktopNotificationHostMsgParams& params); | |
| 40 void OnClosePlatformNotification(int notification_id); | |
| 41 | |
| 42 int process_id_; | |
| 43 ResourceContext* resource_context_; | |
| 44 BrowserContext* browser_context_; | |
| 45 }; | |
| 46 | |
| 47 } // namespace content | |
| 48 | |
| 49 #endif // CONTENT_BROWSER_NOTIFICATION_MESSAGE_FILTER_H_ | |
| OLD | NEW |