Refactor notification presenter for new desktop notification interface.

This commit is contained in:
Cheng Zhao 2014-07-27 10:27:41 +00:00
parent 4e63780e4a
commit 6dd580526e
5 changed files with 82 additions and 131 deletions

View file

@ -66,24 +66,12 @@ net::URLRequestContextGetter* BrowserClient::CreateRequestContext(
void BrowserClient::ShowDesktopNotification(
const content::ShowDesktopNotificationHostMsgParams& params,
int render_process_id,
int render_view_id,
bool worker) {
content::RenderFrameHost* render_frame_host,
content::DesktopNotificationDelegate* delegate,
base::Closure* cancel_callback) {
auto presenter = notification_presenter();
if (!presenter)
return;
presenter->ShowNotification(params, render_process_id, render_view_id);
}
void BrowserClient::CancelDesktopNotification(
int render_process_id,
int render_view_id,
int notification_id) {
auto presenter = notification_presenter();
if (!presenter)
return;
presenter->CancelNotification(
render_process_id, render_view_id, notification_id);
presenter->ShowNotification(params, delegate, cancel_callback);
}
content::MediaObserver* BrowserClient::GetMediaObserver() {