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

Side by Side Diff: ash/system/power/power_status_view.cc

Issue 13925006: Declares GetHeightForWidth() for those who need it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/power/power_status_view.h ('k') | ash/system/tray/hover_highlight_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/power/power_status_view.h" 5 #include "ash/system/power/power_status_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/power/tray_power.h" 9 #include "ash/system/power/tray_power.h"
10 #include "ash/system/tray/fixed_sized_image_view.h" 10 #include "ash/system/tray/fixed_sized_image_view.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 void PowerStatusView::ChildPreferredSizeChanged(views::View* child) { 284 void PowerStatusView::ChildPreferredSizeChanged(views::View* child) {
285 PreferredSizeChanged(); 285 PreferredSizeChanged();
286 } 286 }
287 287
288 gfx::Size PowerStatusView::GetPreferredSize() { 288 gfx::Size PowerStatusView::GetPreferredSize() {
289 gfx::Size size = views::View::GetPreferredSize(); 289 gfx::Size size = views::View::GetPreferredSize();
290 return gfx::Size(size.width(), kTrayPopupItemHeight); 290 return gfx::Size(size.width(), kTrayPopupItemHeight);
291 } 291 }
292 292
293 int PowerStatusView::GetHeightForWidth(int width) {
294 return kTrayPopupItemHeight;
295 }
296
293 void PowerStatusView::Layout() { 297 void PowerStatusView::Layout() {
294 views::View::Layout(); 298 views::View::Layout();
295 299
296 // Move the time_status_label_ closer to percentage_label_. 300 // Move the time_status_label_ closer to percentage_label_.
297 if (percentage_label_ && time_status_label_ && 301 if (percentage_label_ && time_status_label_ &&
298 percentage_label_->visible() && time_status_label_->visible()) { 302 percentage_label_->visible() && time_status_label_->visible()) {
299 time_status_label_->SetX(percentage_label_->bounds().right() + 1); 303 time_status_label_->SetX(percentage_label_->bounds().right() + 1);
300 } 304 }
301 } 305 }
302 306
303 } // namespace internal 307 } // namespace internal
304 } // namespace ash 308 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/power/power_status_view.h ('k') | ash/system/tray/hover_highlight_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698