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
3 // found in the LICENSE file.
5 #include "ui/message_center/fake_message_center_tray_delegate.h"
7 #include "base/message_loop/message_loop.h"
8 #include "ui/message_center/message_center_tray.h"
10 namespace message_center
{
12 FakeMessageCenterTrayDelegate::FakeMessageCenterTrayDelegate(
13 MessageCenter
* message_center
,
14 base::Closure quit_closure
)
15 : tray_(new MessageCenterTray(this, message_center
)),
16 quit_closure_(quit_closure
),
17 displayed_first_run_balloon_(false) {}
19 FakeMessageCenterTrayDelegate::~FakeMessageCenterTrayDelegate() {
22 void FakeMessageCenterTrayDelegate::OnMessageCenterTrayChanged() {
25 bool FakeMessageCenterTrayDelegate::ShowPopups() {
29 void FakeMessageCenterTrayDelegate::HidePopups() {
32 bool FakeMessageCenterTrayDelegate::ShowMessageCenter() {
36 void FakeMessageCenterTrayDelegate::HideMessageCenter() {
39 bool FakeMessageCenterTrayDelegate::ShowNotifierSettings() {
43 bool FakeMessageCenterTrayDelegate::IsContextMenuEnabled() const {
47 MessageCenterTray
* FakeMessageCenterTrayDelegate::GetMessageCenterTray() {
51 void FakeMessageCenterTrayDelegate::DisplayFirstRunBalloon() {
52 displayed_first_run_balloon_
= true;
53 base::MessageLoop::current()->PostTask(FROM_HERE
, quit_closure_
);
56 } // namespace message_center