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

Side by Side Diff: ui/arc/notification/arc_notification_delegate.cc

Issue 2845003002: Merge ArcNotificationItem and ArcCustomNotificationItem (Closed)
Patch Set: Addressed comments (#56) Created 3 years, 7 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
(Empty)
1 // Copyright 2017 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 #include "ui/arc/notification/arc_notification_delegate.h"
6
7 #include "ui/arc/notification/arc_custom_notification_view.h"
8
hidehiko 2017/05/08 10:12:39 Missing #include "ui/arc/notification/arc_notifica
yoshiki 2017/05/08 14:31:19 Done.
9 namespace arc {
10
11 ArcNotificationDelegate::ArcNotificationDelegate(
12 base::WeakPtr<ArcNotificationItem> item)
13 : item_(item) {
14 DCHECK(item_);
15 }
16
17 ArcNotificationDelegate::~ArcNotificationDelegate() {}
18
19 std::unique_ptr<message_center::CustomContent>
20 ArcNotificationDelegate::CreateCustomContent() {
21 DCHECK(item_);
22 auto view = base::MakeUnique<ArcCustomNotificationView>(item_.get());
23 auto content_view_delegate = view->CreateContentViewDelegate();
24 return base::MakeUnique<message_center::CustomContent>(
25 std::move(view), std::move(content_view_delegate));
26 }
27
28 void ArcNotificationDelegate::Close(bool by_user) {
29 DCHECK(item_);
30 item_->Close(by_user);
31 }
32
33 void ArcNotificationDelegate::Click() {
34 DCHECK(item_);
35 item_->Click();
36 }
37
38 } // namespace arc
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_notification_delegate.h ('k') | ui/arc/notification/arc_notification_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698