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

Side by Side Diff: chrome/browser/chromeos/ui/idle_app_name_notification_view.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: . Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" 5 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 label->SetText(text); 192 label->SetText(text);
193 label->SetHorizontalAlignment(gfx::ALIGN_CENTER); 193 label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
194 label->SetFontList(font); 194 label->SetFontList(font);
195 label->SetEnabledColor(text_color); 195 label->SetEnabledColor(text_color);
196 label->SetDisabledColor(text_color); 196 label->SetDisabledColor(text_color);
197 label->SetAutoColorReadabilityEnabled(false); 197 label->SetAutoColorReadabilityEnabled(false);
198 AddChildView(label); 198 AddChildView(label);
199 } 199 }
200 200
201 // A timer which calls us to remove the message from the screen. 201 // A timer which calls us to remove the message from the screen.
202 base::OneShotTimer<IdleAppNameNotificationDelegateView> hide_timer_; 202 base::OneShotTimer hide_timer_;
203 203
204 // The owner of this message which needs to get notified when the message 204 // The owner of this message which needs to get notified when the message
205 // closes. 205 // closes.
206 IdleAppNameNotificationView* owner_; 206 IdleAppNameNotificationView* owner_;
207 207
208 // The spoken text. 208 // The spoken text.
209 base::string16 spoken_text_; 209 base::string16 spoken_text_;
210 210
211 // True if the widget got already closed. 211 // True if the widget got already closed.
212 bool widget_closed_; 212 bool widget_closed_;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 view_ = new IdleAppNameNotificationDelegateView( 265 view_ = new IdleAppNameNotificationDelegateView(
266 this, 266 this,
267 app_name, 267 app_name,
268 error, 268 error,
269 message_visibility_time_in_ms + animation_time_ms); 269 message_visibility_time_in_ms + animation_time_ms);
270 CreateAndShowWidgetWithContent(view_, view_, animation_time_ms); 270 CreateAndShowWidgetWithContent(view_, view_, animation_time_ms);
271 } 271 }
272 272
273 } // namespace chromeos 273 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698