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

Side by Side Diff: ash/system/chromeos/network/tray_sms.cc

Issue 12260046: Show notification when activating with no connection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix logic and type icon Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/system_tray_bubble.h" 10 #include "ash/system/tray/system_tray_bubble.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 CHECK(detailed_ == NULL); 301 CHECK(detailed_ == NULL);
302 HideNotificationView(); 302 HideNotificationView();
303 if (messages_.empty()) 303 if (messages_.empty())
304 return NULL; 304 return NULL;
305 detailed_ = new SmsDetailedView(this); 305 detailed_ = new SmsDetailedView(this);
306 return detailed_; 306 return detailed_;
307 } 307 }
308 308
309 views::View* TraySms::CreateNotificationView(user::LoginStatus status) { 309 views::View* TraySms::CreateNotificationView(user::LoginStatus status) {
310 CHECK(notification_ == NULL); 310 CHECK(notification_ == NULL);
311 if (detailed_)
312 return NULL;
311 size_t index; 313 size_t index;
312 std::string number, text; 314 std::string number, text;
313 if (GetLatestMessage(&index, &number, &text)) 315 if (GetLatestMessage(&index, &number, &text))
314 notification_ = new SmsNotificationView(this, index, number, text); 316 notification_ = new SmsNotificationView(this, index, number, text);
315 return notification_; 317 return notification_;
316 } 318 }
317 319
318 void TraySms::DestroyDefaultView() { 320 void TraySms::DestroyDefaultView() {
319 default_ = NULL; 321 default_ = NULL;
320 } 322 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 if (GetLatestMessage(&index, &number, &text)) 374 if (GetLatestMessage(&index, &number, &text))
373 notification_->Update(index, number, text); 375 notification_->Update(index, number, text);
374 } else if (notify) { 376 } else if (notify) {
375 ShowNotificationView(); 377 ShowNotificationView();
376 } 378 }
377 } 379 }
378 } 380 }
379 381
380 } // namespace internal 382 } // namespace internal
381 } // namespace ash 383 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698