Expose NotificationPresenter to public
This commit is contained in:
parent
9897f3aab0
commit
6f81d1e29f
5 changed files with 57 additions and 58 deletions
58
brightray/browser/platform_notification_service.h
Normal file
58
brightray/browser/platform_notification_service.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
// Copyright (c) 2015 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-CHROMIUM file.
|
||||
|
||||
#ifndef BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
|
||||
#define BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
|
||||
|
||||
#include "content/public/browser/platform_notification_service.h"
|
||||
|
||||
namespace brightray {
|
||||
|
||||
class BrowserClient;
|
||||
|
||||
class PlatformNotificationService
|
||||
: public content::PlatformNotificationService {
|
||||
public:
|
||||
explicit PlatformNotificationService(BrowserClient* browser_client);
|
||||
~PlatformNotificationService() override;
|
||||
|
||||
protected:
|
||||
// content::PlatformNotificationService:
|
||||
blink::WebNotificationPermission CheckPermissionOnUIThread(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& origin,
|
||||
int render_process_id) override;
|
||||
blink::WebNotificationPermission CheckPermissionOnIOThread(
|
||||
content::ResourceContext* resource_context,
|
||||
const GURL& origin,
|
||||
int render_process_id) override;
|
||||
void DisplayNotification(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& origin,
|
||||
const SkBitmap& icon,
|
||||
const content::PlatformNotificationData& notification_data,
|
||||
scoped_ptr<content::DesktopNotificationDelegate> delegate,
|
||||
base::Closure* cancel_callback) override;
|
||||
void DisplayPersistentNotification(
|
||||
content::BrowserContext* browser_context,
|
||||
int64_t service_worker_registration_id,
|
||||
const GURL& origin,
|
||||
const SkBitmap& icon,
|
||||
const content::PlatformNotificationData& notification_data) override;
|
||||
void ClosePersistentNotification(
|
||||
content::BrowserContext* browser_context,
|
||||
int64_t persistent_notification_id) override;
|
||||
bool GetDisplayedPersistentNotifications(
|
||||
content::BrowserContext* browser_context,
|
||||
std::set<std::string>* displayed_notifications) override;
|
||||
|
||||
private:
|
||||
BrowserClient* browser_client_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PlatformNotificationService);
|
||||
};
|
||||
|
||||
} // namespace brightray
|
||||
|
||||
#endif // BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
|
Loading…
Add table
Add a link
Reference in a new issue