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

Side by Side Diff: chrome/browser/notifications/persistent_notification_delegate.cc

Issue 1269923003: Plumb notification action index for desktop SW notificationclick (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@actions
Patch Set: Created 5 years, 4 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/persistent_notification_delegate.h" 5 #include "chrome/browser/notifications/persistent_notification_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "chrome/browser/notifications/platform_notification_service_impl.h" 9 #include "chrome/browser/notifications/platform_notification_service_impl.h"
10 #include "content/public/common/persistent_notification_status.h" 10 #include "content/public/common/persistent_notification_status.h"
(...skipping 15 matching lines...) Expand all
26 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose( 26 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose(
27 browser_context_, 27 browser_context_,
28 persistent_notification_id_, 28 persistent_notification_id_,
29 origin_); 29 origin_);
30 } 30 }
31 31
32 void PersistentNotificationDelegate::Click() { 32 void PersistentNotificationDelegate::Click() {
33 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( 33 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
34 browser_context_, 34 browser_context_,
35 persistent_notification_id_, 35 persistent_notification_id_,
36 origin_); 36 origin_,
37 -1 /* action_index */);
38 }
39
40 void PersistentNotificationDelegate::ButtonClick(int button_index) {
41 PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
42 browser_context_,
43 persistent_notification_id_,
44 origin_,
45 button_index);
37 } 46 }
38 47
39 std::string PersistentNotificationDelegate::id() const { 48 std::string PersistentNotificationDelegate::id() const {
40 return id_; 49 return id_;
41 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698