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/chromeos/network/tray_sms.h" | 5 #include "ash/system/chromeos/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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 TraySms::~TraySms() { | 287 TraySms::~TraySms() { |
288 } | 288 } |
289 | 289 |
290 views::View* TraySms::CreateDefaultView(user::LoginStatus status) { | 290 views::View* TraySms::CreateDefaultView(user::LoginStatus status) { |
291 CHECK(default_ == NULL); | 291 CHECK(default_ == NULL); |
292 default_ = new SmsDefaultView(this); | 292 default_ = new SmsDefaultView(this); |
293 default_->SetVisible(!messages_.empty()); | 293 default_->SetVisible(!messages_.empty()); |
294 return default_; | 294 return default_; |
295 } | 295 } |
296 | 296 |
297 views::View* TraySms::CreateDetailedView(user::LoginStatus status) { | 297 views::View* TraySms::CreateDetailedView(user::LoginStatus status, |
| 298 int bubble_width) { |
298 CHECK(detailed_ == NULL); | 299 CHECK(detailed_ == NULL); |
299 HideNotificationView(); | 300 HideNotificationView(); |
300 if (messages_.empty()) | 301 if (messages_.empty()) |
301 return NULL; | 302 return NULL; |
302 detailed_ = new SmsDetailedView(this); | 303 detailed_ = new SmsDetailedView(this); |
303 return detailed_; | 304 return detailed_; |
304 } | 305 } |
305 | 306 |
306 views::View* TraySms::CreateNotificationView(user::LoginStatus status) { | 307 views::View* TraySms::CreateNotificationView(user::LoginStatus status) { |
307 CHECK(notification_ == NULL); | 308 CHECK(notification_ == NULL); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 if (GetLatestMessage(&index, &number, &text)) | 370 if (GetLatestMessage(&index, &number, &text)) |
370 notification_->Update(index, number, text); | 371 notification_->Update(index, number, text); |
371 } else if (notify) { | 372 } else if (notify) { |
372 ShowNotificationView(); | 373 ShowNotificationView(); |
373 } | 374 } |
374 } | 375 } |
375 } | 376 } |
376 | 377 |
377 } // namespace internal | 378 } // namespace internal |
378 } // namespace ash | 379 } // namespace ash |
OLD | NEW |