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

Side by Side Diff: ash/system/tray/tray_item_view.cc

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (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/tray/system_tray_bubble.cc ('k') | ash/system/tray_update.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/tray/tray_item_view.h" 5 #include "ash/system/tray/tray_item_view.h"
6 6
7 #include "ash/shelf/shelf_types.h" 7 #include "ash/shelf/shelf_types.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 #include "ui/base/animation/slide_animation.h" 10 #include "ui/base/animation/slide_animation.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 image_view_ = new views::ImageView; 44 image_view_ = new views::ImageView;
45 AddChildView(image_view_); 45 AddChildView(image_view_);
46 } 46 }
47 47
48 void TrayItemView::SetVisible(bool set_visible) { 48 void TrayItemView::SetVisible(bool set_visible) {
49 if (!GetWidget()) { 49 if (!GetWidget()) {
50 views::View::SetVisible(set_visible); 50 views::View::SetVisible(set_visible);
51 return; 51 return;
52 } 52 }
53 53
54 if (!animation_.get()) { 54 if (!animation_) {
55 animation_.reset(new ui::SlideAnimation(this)); 55 animation_.reset(new ui::SlideAnimation(this));
56 animation_->SetSlideDuration(GetAnimationDurationMS()); 56 animation_->SetSlideDuration(GetAnimationDurationMS());
57 animation_->SetTweenType(ui::Tween::LINEAR); 57 animation_->SetTweenType(ui::Tween::LINEAR);
58 animation_->Reset(visible() ? 1.0 : 0.0); 58 animation_->Reset(visible() ? 1.0 : 0.0);
59 } 59 }
60 60
61 if (!set_visible) { 61 if (!set_visible) {
62 animation_->Hide(); 62 animation_->Hide();
63 AnimationProgressed(animation_.get()); 63 AnimationProgressed(animation_.get());
64 } else { 64 } else {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (animation->GetCurrentValue() < 0.1) 112 if (animation->GetCurrentValue() < 0.1)
113 views::View::SetVisible(false); 113 views::View::SetVisible(false);
114 } 114 }
115 115
116 void TrayItemView::AnimationCanceled(const ui::Animation* animation) { 116 void TrayItemView::AnimationCanceled(const ui::Animation* animation) {
117 AnimationEnded(animation); 117 AnimationEnded(animation);
118 } 118 }
119 119
120 } // namespace internal 120 } // namespace internal
121 } // namespace ash 121 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_bubble.cc ('k') | ash/system/tray_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698