cc: Make picture pile base thread safe.
[chromium-blink-merge.git] / content / browser / notification_message_filter.h
blob92f7b47b38d9e7ea16b42b704aa9e53c250c7285
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.
5 #ifndef CONTENT_BROWSER_NOTIFICATION_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_NOTIFICATION_MESSAGE_FILTER_H_
8 #include "content/public/browser/browser_message_filter.h"
9 #include "third_party/WebKit/public/platform/WebNotificationPermission.h"
11 class GURL;
13 namespace content {
15 class ResourceContext;
16 struct ShowDesktopNotificationHostMsgParams;
18 class NotificationMessageFilter : public BrowserMessageFilter {
19 public:
20 NotificationMessageFilter(
21 int process_id,
22 ResourceContext* resource_context);
24 // BrowserMessageFilter implementation. Called on the UI thread.
25 bool OnMessageReceived(const IPC::Message& message) override;
26 void OverrideThreadForMessage(
27 const IPC::Message& message, content::BrowserThread::ID* thread) override;
29 protected:
30 ~NotificationMessageFilter() override;
32 private:
33 void OnCheckNotificationPermission(
34 const GURL& origin, blink::WebNotificationPermission* permission);
35 void OnShowPlatformNotification(
36 int notification_id, const ShowDesktopNotificationHostMsgParams& params);
37 void OnClosePlatformNotification(int notification_id);
39 int process_id_;
40 ResourceContext* resource_context_;
43 } // namespace content
45 #endif // CONTENT_BROWSER_NOTIFICATION_MESSAGE_FILTER_H_