• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_TRAY_DELEGATE_H_
6 #define UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_TRAY_DELEGATE_H_
7 
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/message_center/message_center_tray_delegate.h"
12 
13 namespace message_center {
14 
15 class MessageCenter;
16 class MessageCenterTray;
17 
18 // A message center tray delegate which does nothing.
19 class FakeMessageCenterTrayDelegate : public MessageCenterTrayDelegate {
20  public:
21   FakeMessageCenterTrayDelegate(MessageCenter* message_center,
22                                 base::Closure quit_closure);
23   virtual ~FakeMessageCenterTrayDelegate();
24 
displayed_first_run_balloon()25   bool displayed_first_run_balloon() const {
26     return displayed_first_run_balloon_;
27   }
28 
29   // Overridden from MessageCenterTrayDelegate:
30   virtual void OnMessageCenterTrayChanged() OVERRIDE;
31   virtual bool ShowPopups() OVERRIDE;
32   virtual void HidePopups() OVERRIDE;
33   virtual bool ShowMessageCenter() OVERRIDE;
34   virtual void HideMessageCenter() OVERRIDE;
35   virtual bool ShowNotifierSettings() OVERRIDE;
36   virtual bool IsContextMenuEnabled() const OVERRIDE;
37   virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE;
38   virtual void DisplayFirstRunBalloon() OVERRIDE;
39 
40  private:
41   scoped_ptr<MessageCenterTray> tray_;
42   base::Closure quit_closure_;
43   bool displayed_first_run_balloon_;
44 
45   DISALLOW_COPY_AND_ASSIGN(FakeMessageCenterTrayDelegate);
46 };
47 
48 }  // namespace message_center
49 
50 #endif  // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_TRAY_DELEGATE_H_
51