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

Side by Side Diff: chrome/browser/chromeos/login/oobe_progress_bar.cc

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/login/oobe_progress_bar.h" 5 #include "chrome/browser/chromeos/login/oobe_progress_bar.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 dot_filled_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_DOT_FILLED); 46 dot_filled_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_DOT_FILLED);
47 line_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_LINE); 47 line_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_LINE);
48 line_left_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_LINE_LEFT); 48 line_left_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_LINE_LEFT);
49 line_right_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_LINE_RIGHT); 49 line_right_ = rb.GetBitmapNamed(IDR_OOBE_PROGRESS_LINE_RIGHT);
50 50
51 initialized = true; 51 initialized = true;
52 } 52 }
53 } 53 }
54 54
55 void OobeProgressBar::Paint(gfx::Canvas* canvas) { 55 void OobeProgressBar::Paint(gfx::Canvas* canvas) {
56 gfx::Rect bounds = GetLocalBounds(); 56 gfx::Rect bounds = GetContentsBounds();
57 57
58 int x = bounds.x(); 58 int x = bounds.x();
59 int y = bounds.y(); 59 int y = bounds.y();
60 60
61 double step_width = static_cast<double>(bounds.width()) / steps_.size(); 61 double step_width = static_cast<double>(bounds.width()) / steps_.size();
62 62
63 for (size_t i = 0; i < steps_.size(); ++i) { 63 for (size_t i = 0; i < steps_.size(); ++i) {
64 SkBitmap* dot; 64 SkBitmap* dot;
65 SkColor color; 65 SkColor color;
66 SkBitmap* line_before = line_; 66 SkBitmap* line_before = line_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (steps_[i] == step) { 132 if (steps_[i] == step) {
133 progress_ = i; 133 progress_ = i;
134 SchedulePaint(); 134 SchedulePaint();
135 return; 135 return;
136 } 136 }
137 } 137 }
138 NOTREACHED(); 138 NOTREACHED();
139 } 139 }
140 140
141 } // namespace chromeos 141 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698