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

Side by Side Diff: views/controls/throbber.cc

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "views/controls/throbber.h" 5 #include "views/controls/throbber.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "grit/app_resources.h" 8 #include "grit/app_resources.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Delay after work stops before stopping, in milliseconds. 97 // Delay after work stops before stopping, in milliseconds.
98 static const int kStopDelay = 50; 98 static const int kStopDelay = 50;
99 99
100 100
101 SmoothedThrobber::SmoothedThrobber(int frame_time_ms) 101 SmoothedThrobber::SmoothedThrobber(int frame_time_ms)
102 : Throbber(frame_time_ms, /* paint_while_stopped= */ false), 102 : Throbber(frame_time_ms, /* paint_while_stopped= */ false),
103 start_delay_ms_(kStartDelay), 103 start_delay_ms_(kStartDelay),
104 stop_delay_ms_(kStopDelay) { 104 stop_delay_ms_(kStopDelay) {
105 } 105 }
106 106
107 SmoothedThrobber::~SmoothedThrobber() {}
108
107 void SmoothedThrobber::Start() { 109 void SmoothedThrobber::Start() {
108 stop_timer_.Stop(); 110 stop_timer_.Stop();
109 111
110 if (!running_ && !start_timer_.IsRunning()) { 112 if (!running_ && !start_timer_.IsRunning()) {
111 start_timer_.Start(TimeDelta::FromMilliseconds(start_delay_ms_), this, 113 start_timer_.Start(TimeDelta::FromMilliseconds(start_delay_ms_), this,
112 &SmoothedThrobber::StartDelayOver); 114 &SmoothedThrobber::StartDelayOver);
113 } 115 }
114 } 116 }
115 117
116 void SmoothedThrobber::StartDelayOver() { 118 void SmoothedThrobber::StartDelayOver() {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 169 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
168 checkmark_ = rb.GetBitmapNamed(IDR_INPUT_GOOD); 170 checkmark_ = rb.GetBitmapNamed(IDR_INPUT_GOOD);
169 initialized = true; 171 initialized = true;
170 } 172 }
171 } 173 }
172 174
173 // static 175 // static
174 SkBitmap* CheckmarkThrobber::checkmark_ = NULL; 176 SkBitmap* CheckmarkThrobber::checkmark_ = NULL;
175 177
176 } // namespace views 178 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698