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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 | « ash/system/audio/volume_view.cc ('k') | ash/system/chromeos/power/power_status_view.h » ('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/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/fixed_sized_scroll_view.h" 8 #include "ash/system/tray/fixed_sized_scroll_view.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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 CreateSpecialRow(IDS_ASH_STATUS_TRAY_SMS, this); 193 CreateSpecialRow(IDS_ASH_STATUS_TRAY_SMS, this);
194 } 194 }
195 195
196 void Update() { 196 void Update() {
197 UpdateMessageList(); 197 UpdateMessageList();
198 Layout(); 198 Layout();
199 SchedulePaint(); 199 SchedulePaint();
200 } 200 }
201 201
202 // Overridden from views::View. 202 // Overridden from views::View.
203 virtual gfx::Size GetPreferredSize() OVERRIDE { 203 virtual gfx::Size GetPreferredSize() const OVERRIDE {
204 gfx::Size preferred_size = TrayDetailsView::GetPreferredSize(); 204 gfx::Size preferred_size = TrayDetailsView::GetPreferredSize();
205 if (preferred_size.height() < kMessageListMinHeight) 205 if (preferred_size.height() < kMessageListMinHeight)
206 preferred_size.set_height(kMessageListMinHeight); 206 preferred_size.set_height(kMessageListMinHeight);
207 return preferred_size; 207 return preferred_size;
208 } 208 }
209 209
210 private: 210 private:
211 void UpdateMessageList() { 211 void UpdateMessageList() {
212 const base::ListValue& messages = 212 const base::ListValue& messages =
213 static_cast<TraySms*>(owner())->messages(); 213 static_cast<TraySms*>(owner())->messages();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 std::string number, text; 410 std::string number, text;
411 if (GetLatestMessage(&index, &number, &text)) 411 if (GetLatestMessage(&index, &number, &text))
412 notification_->Update(index, number, text); 412 notification_->Update(index, number, text);
413 } else if (notify) { 413 } else if (notify) {
414 ShowNotificationView(); 414 ShowNotificationView();
415 } 415 }
416 } 416 }
417 } 417 }
418 418
419 } // namespace ash 419 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/audio/volume_view.cc ('k') | ash/system/chromeos/power/power_status_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698