Home | History | Annotate | Download | only in views
      1 // Copyright 2013 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_VIEWS_MESSAGE_CENTER_CONTROLLER_H_
      6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_CONTROLLER_H_
      7 
      8 #include <string>
      9 
     10 #include "base/memory/scoped_ptr.h"
     11 #include "base/strings/string16.h"
     12 #include "ui/base/models/menu_model.h"
     13 #include "ui/message_center/notifier_settings.h"
     14 
     15 namespace message_center {
     16 
     17 // Interface used by views to report clicks and other user actions. The views
     18 // by themselves do not know how to perform those operations, they ask
     19 // MessageCenterController to do them. Implemented by MessageCeneterView and
     20 // MessagePopupCollection.
     21 class MessageCenterController {
     22  public:
     23   virtual void ClickOnNotification(const std::string& notification_id) = 0;
     24   virtual void RemoveNotification(const std::string& notification_id,
     25                                   bool by_user) = 0;
     26   virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
     27       const NotifierId& notifier_id,
     28       const base::string16& display_source) = 0;
     29   virtual bool HasClickedListener(const std::string& notification_id) = 0;
     30   virtual void ClickOnNotificationButton(const std::string& notification_id,
     31                                          int button_index) = 0;
     32 };
     33 
     34 }  // namespace message_center
     35 
     36 #endif  // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_CONTROLLER_H_
     37