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

Unified Diff: ash/common/system/tray/tray_notification_view.h

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: update return type Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/system_tray_unittest.cc ('k') | ash/common/system/tray/tray_notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_notification_view.h
diff --git a/ash/common/system/tray/tray_notification_view.h b/ash/common/system/tray/tray_notification_view.h
index 87a907f0ad85d8812c2e47a5367c30ef7fa75ecc..e452f0ec9cedb5e652047678951ce2cf38296418 100644
--- a/ash/common/system/tray/tray_notification_view.h
+++ b/ash/common/system/tray/tray_notification_view.h
@@ -15,62 +15,25 @@ class ImageView;
}
namespace ash {
-class SystemTrayItem;
// A view for closable notification views, laid out like:
// -------------------
// | icon contents x |
// ----------------v--
// The close button will call OnClose() when clicked.
-class TrayNotificationView : public views::SlideOutView,
- public views::ButtonListener {
+class TrayNotificationView : public views::View {
public:
// If icon_id is 0, no icon image will be set.
- TrayNotificationView(SystemTrayItem* owner, int icon_id);
+ explicit TrayNotificationView(int icon_id);
~TrayNotificationView() override;
// InitView must be called once with the contents to be displayed.
void InitView(views::View* contents);
- // Replaces the contents view.
- void UpdateView(views::View* new_contents);
-
- // Autoclose timer operations.
- void StartAutoCloseTimer(int seconds);
- void StopAutoCloseTimer();
- void RestartAutoCloseTimer();
-
- // Overridden from ButtonListener.
- void ButtonPressed(views::Button* sender, const ui::Event& event) override;
-
- // Overridden from views::View.
- bool OnMousePressed(const ui::MouseEvent& event) override;
-
- // Overridden from ui::EventHandler.
- void OnGestureEvent(ui::GestureEvent* event) override;
-
- protected:
- // Called when the close button is pressed. Does nothing by default.
- virtual void OnClose();
- // Called when the notification is clicked on. Does nothing by default.
- virtual void OnClickAction();
-
- // Overridden from views::SlideOutView.
- void OnSlideOut() override;
-
- SystemTrayItem* owner() { return owner_; }
-
private:
- void HandleClose();
- void HandleClickAction();
-
- SystemTrayItem* owner_;
int icon_id_;
views::ImageView* icon_;
- int autoclose_delay_;
- base::OneShotTimer autoclose_;
-
DISALLOW_COPY_AND_ASSIGN(TrayNotificationView);
};
« no previous file with comments | « ash/common/system/tray/system_tray_unittest.cc ('k') | ash/common/system/tray/tray_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698