OLD | NEW |
---|---|
(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 | |
OLD | NEW |