OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_UI_SETTING_LEVEL_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_SETTING_LEVEL_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_UI_SETTING_LEVEL_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UI_SETTING_LEVEL_BUBBLE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
11 | 11 |
(...skipping 20 matching lines...) Expand all Loading... |
32 // Change the icon that we're currently displaying. | 32 // Change the icon that we're currently displaying. |
33 void SetIcon(SkBitmap* icon); | 33 void SetIcon(SkBitmap* icon); |
34 | 34 |
35 // Set the progress bar to the specified level and redraw it. | 35 // Set the progress bar to the specified level and redraw it. |
36 void SetLevel(double level); | 36 void SetLevel(double level); |
37 | 37 |
38 // Draw the progress bar in an enabled or disabled state. | 38 // Draw the progress bar in an enabled or disabled state. |
39 void SetEnabled(bool enabled); | 39 void SetEnabled(bool enabled); |
40 | 40 |
41 // views::View implementation: | 41 // views::View implementation: |
42 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 42 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
43 virtual void Layout() OVERRIDE; | 43 virtual void Layout() OVERRIDE; |
44 virtual gfx::Size GetPreferredSize() OVERRIDE; | 44 virtual gfx::Size GetPreferredSize() OVERRIDE; |
45 | 45 |
46 private: | 46 private: |
47 FRIEND_TEST_ALL_PREFIXES(SettingLevelBubbleTest, CreateAndUpdate); | 47 FRIEND_TEST_ALL_PREFIXES(SettingLevelBubbleTest, CreateAndUpdate); |
48 | 48 |
49 views::ProgressBar* progress_bar_; | 49 views::ProgressBar* progress_bar_; |
50 SkBitmap* icon_; // not owned | 50 SkBitmap* icon_; // not owned |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(SettingLevelBubbleView); | 52 DISALLOW_COPY_AND_ASSIGN(SettingLevelBubbleView); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace chromeos | 55 } // namespace chromeos |
56 | 56 |
57 #endif // CHROME_BROWSER_CHROMEOS_UI_SETTING_LEVEL_BUBBLE_VIEW_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_UI_SETTING_LEVEL_BUBBLE_VIEW_H_ |
OLD | NEW |