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

Side by Side Diff: ash/system/chromeos/audio/tray_audio.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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/shelf/shelf_view.cc ('k') | ash/system/chromeos/label_tray_view.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/audio/tray_audio.h" 5 #include "ash/system/chromeos/audio/tray_audio.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 // Align info item with checkbox items 493 // Align info item with checkbox items
494 int margin = kTrayPopupPaddingHorizontal + 494 int margin = kTrayPopupPaddingHorizontal +
495 kTrayPopupDetailsLabelExtraLeftMargin; 495 kTrayPopupDetailsLabelExtraLeftMargin;
496 int left_margin = 0; 496 int left_margin = 0;
497 int right_margin = 0; 497 int right_margin = 0;
498 if (base::i18n::IsRTL()) 498 if (base::i18n::IsRTL())
499 right_margin = margin; 499 right_margin = margin;
500 else 500 else
501 left_margin = margin; 501 left_margin = margin;
502 502
503 label->set_border(views::Border::CreateEmptyBorder( 503 label->SetBorder(
504 ash::kTrayPopupPaddingBetweenItems, 504 views::Border::CreateEmptyBorder(ash::kTrayPopupPaddingBetweenItems,
505 left_margin, 505 left_margin,
506 ash::kTrayPopupPaddingBetweenItems, 506 ash::kTrayPopupPaddingBetweenItems,
507 right_margin)); 507 right_margin));
508 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 508 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
509 label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0)); 509 label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0));
510 label->SetFontList(label->font_list().DeriveFontListWithSizeDeltaAndStyle( 510 label->SetFontList(label->font_list().DeriveFontListWithSizeDeltaAndStyle(
511 0, gfx::Font::BOLD)); 511 0, gfx::Font::BOLD));
512 512
513 scroll_content()->AddChildView(label); 513 scroll_content()->AddChildView(label);
514 } 514 }
515 515
516 HoverHighlightView* AddScrollListItem(const base::string16& text, 516 HoverHighlightView* AddScrollListItem(const base::string16& text,
517 gfx::Font::FontStyle style, 517 gfx::Font::FontStyle style,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 if (audio_detail_) 653 if (audio_detail_)
654 audio_detail_->Update(); 654 audio_detail_->Update();
655 if (volume_view_) { 655 if (volume_view_) {
656 volume_view_->SetVolumeLevel(GetVolumeLevel()); 656 volume_view_->SetVolumeLevel(GetVolumeLevel());
657 volume_view_->Update(); 657 volume_view_->Update();
658 } 658 }
659 } 659 }
660 660
661 } // namespace internal 661 } // namespace internal
662 } // namespace ash 662 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/system/chromeos/label_tray_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698