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

Side by Side Diff: ui/app_list/views/progress_bar_view.cc

Issue 392013005: [#1] Delete reduntdant 19 header files in ui/gfx (8 of 19 by this) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted includes Created 6 years, 5 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 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/app_list/views/progress_bar_view.h" 5 #include "ui/app_list/views/progress_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/geometry/insets.h"
11 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
12 #include "ui/gfx/insets.h"
13 #include "ui/views/painter.h" 13 #include "ui/views/painter.h"
14 14
15 namespace app_list { 15 namespace app_list {
16 16
17 namespace { 17 namespace {
18 18
19 // Image assets for the bar part. 19 // Image assets for the bar part.
20 const int kProgressBarImages[] = { 20 const int kProgressBarImages[] = {
21 IDR_APP_LIST_ITEM_PROGRESS_LEFT, 21 IDR_APP_LIST_ITEM_PROGRESS_LEFT,
22 IDR_APP_LIST_ITEM_PROGRESS_CENTER, 22 IDR_APP_LIST_ITEM_PROGRESS_CENTER,
(...skipping 30 matching lines...) Expand all
53 const int bar_width = paint_size.width() - kBarEndWidth; 53 const int bar_width = paint_size.width() - kBarEndWidth;
54 DCHECK_GE(bar_width, 0); 54 DCHECK_GE(bar_width, 0);
55 55
56 // Map normalized value in [0,1] to the pixel width in 56 // Map normalized value in [0,1] to the pixel width in
57 // [kBarEndWidth, view_size.width()]. 57 // [kBarEndWidth, view_size.width()].
58 paint_size.set_width(kBarEndWidth + bar_width * GetNormalizedValue()); 58 paint_size.set_width(kBarEndWidth + bar_width * GetNormalizedValue());
59 bar_painter_->Paint(canvas, paint_size); 59 bar_painter_->Paint(canvas, paint_size);
60 } 60 }
61 61
62 } // namespace app_list 62 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698