OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/system/network/tray_sms.h" | 5 #include "ash/system/network/tray_sms.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 LayoutDetailedView(); | 106 LayoutDetailedView(); |
107 else | 107 else |
108 LayoutNotificationView(); | 108 LayoutNotificationView(); |
109 } | 109 } |
110 | 110 |
111 virtual ~SmsMessageView() { | 111 virtual ~SmsMessageView() { |
112 } | 112 } |
113 | 113 |
114 // Overridden from ButtonListener. | 114 // Overridden from ButtonListener. |
115 virtual void ButtonPressed(views::Button* sender, | 115 virtual void ButtonPressed(views::Button* sender, |
116 const views::Event& event) OVERRIDE { | 116 const ui::Event& event) OVERRIDE { |
117 tray_->RemoveMessage(index_); | 117 tray_->RemoveMessage(index_); |
118 tray_->Update(false); | 118 tray_->Update(false); |
119 } | 119 } |
120 | 120 |
121 private: | 121 private: |
122 void LayoutDetailedView() { | 122 void LayoutDetailedView() { |
123 views::ImageButton* close_button = new views::ImageButton(this); | 123 views::ImageButton* close_button = new views::ImageButton(this); |
124 close_button->SetImage(views::CustomButton::BS_NORMAL, | 124 close_button->SetImage(views::CustomButton::BS_NORMAL, |
125 ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 125 ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
126 IDR_AURA_WINDOW_CLOSE)); | 126 IDR_AURA_WINDOW_CLOSE)); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 if (GetLatestMessage(&index, &number, &text)) | 369 if (GetLatestMessage(&index, &number, &text)) |
370 notification_->Update(index, number, text); | 370 notification_->Update(index, number, text); |
371 } else if (notify) { | 371 } else if (notify) { |
372 ShowNotificationView(); | 372 ShowNotificationView(); |
373 } | 373 } |
374 } | 374 } |
375 } | 375 } |
376 | 376 |
377 } // namespace internal | 377 } // namespace internal |
378 } // namespace ash | 378 } // namespace ash |
OLD | NEW |