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

Side by Side Diff: ui/views/controls/scrollbar/overlay_scroll_bar.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | ui/views/examples/button_sticker_sheet.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/views/controls/scrollbar/overlay_scroll_bar.h" 5 #include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/paint/paint_flags.h" 8 #include "cc/paint/paint_flags.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/compositor/scoped_layer_animation_settings.h" 10 #include "ui/compositor/scoped_layer_animation_settings.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (GetWidget()) 103 if (GetWidget())
104 scroll_bar_->StartHideCountdown(); 104 scroll_bar_->StartHideCountdown();
105 } else { 105 } else {
106 layer()->SetTransform(gfx::Transform()); 106 layer()->SetTransform(gfx::Transform());
107 layer()->SetOpacity(kThumbHoverAlpha); 107 layer()->SetOpacity(kThumbHoverAlpha);
108 } 108 }
109 } 109 }
110 110
111 OverlayScrollBar::OverlayScrollBar(bool horizontal) 111 OverlayScrollBar::OverlayScrollBar(bool horizontal)
112 : BaseScrollBar(horizontal), hide_timer_(false, false) { 112 : BaseScrollBar(horizontal), hide_timer_(false, false) {
113 auto thumb = new Thumb(this); 113 auto* thumb = new Thumb(this);
114 SetThumb(thumb); 114 SetThumb(thumb);
115 thumb->Init(); 115 thumb->Init();
116 set_notify_enter_exit_on_child(true); 116 set_notify_enter_exit_on_child(true);
117 SetPaintToLayer(); 117 SetPaintToLayer();
118 layer()->SetMasksToBounds(true); 118 layer()->SetMasksToBounds(true);
119 layer()->SetFillsBoundsOpaquely(false); 119 layer()->SetFillsBoundsOpaquely(false);
120 } 120 }
121 121
122 OverlayScrollBar::~OverlayScrollBar() {} 122 OverlayScrollBar::~OverlayScrollBar() {}
123 123
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 void OverlayScrollBar::StartHideCountdown() { 172 void OverlayScrollBar::StartHideCountdown() {
173 if (IsMouseHovered()) 173 if (IsMouseHovered())
174 return; 174 return;
175 hide_timer_.Start( 175 hide_timer_.Start(
176 FROM_HERE, base::TimeDelta::FromSeconds(1), 176 FROM_HERE, base::TimeDelta::FromSeconds(1),
177 base::Bind(&OverlayScrollBar::Hide, base::Unretained(this))); 177 base::Bind(&OverlayScrollBar::Hide, base::Unretained(this)));
178 } 178 }
179 179
180 } // namespace views 180 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | ui/views/examples/button_sticker_sheet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698