| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_PROGRESS_BAR_H_ | 5 #ifndef VIEWS_CONTROLS_PROGRESS_BAR_H_ |
| 6 #define VIEWS_CONTROLS_PROGRESS_BAR_H_ | 6 #define VIEWS_CONTROLS_PROGRESS_BAR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "views/view.h" | 11 #include "views/view.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Sets the tooltip text. Default behavior for a progress bar is to show | 49 // Sets the tooltip text. Default behavior for a progress bar is to show |
| 50 // no tooltip on mouse hover. Calling this lets you set a custom tooltip. | 50 // no tooltip on mouse hover. Calling this lets you set a custom tooltip. |
| 51 // To revert to default behavior, call this with an empty string. | 51 // To revert to default behavior, call this with an empty string. |
| 52 virtual void SetTooltipText(const std::wstring& tooltip_text); | 52 virtual void SetTooltipText(const std::wstring& tooltip_text); |
| 53 | 53 |
| 54 // Gets the tooltip text if has been specified with SetTooltipText(). | 54 // Gets the tooltip text if has been specified with SetTooltipText(). |
| 55 virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip) | 55 virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip) |
| 56 OVERRIDE; | 56 OVERRIDE; |
| 57 | 57 |
| 58 // Sets the enabled state. | 58 // Sets the enabled state. |
| 59 virtual void SetEnabled(bool enabled) OVERRIDE; | 59 virtual void OnEnabledChanged() OVERRIDE; |
| 60 | 60 |
| 61 // Accessibility accessors, overridden from View. | 61 // Accessibility accessors, overridden from View. |
| 62 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 62 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 63 | 63 |
| 64 // Maximum value of progress. | 64 // Maximum value of progress. |
| 65 static const int kMaxProgress; | 65 static const int kMaxProgress; |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 // Progress in range [0, kMaxProgress]. | 68 // Progress in range [0, kMaxProgress]. |
| 69 int progress_; | 69 int progress_; |
| 70 | 70 |
| 71 // Tooltip text. | 71 // Tooltip text. |
| 72 string16 tooltip_text_; | 72 string16 tooltip_text_; |
| 73 | 73 |
| 74 // The view class name. | 74 // The view class name. |
| 75 static const char kViewClassName[]; | 75 static const char kViewClassName[]; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(ProgressBar); | 77 DISALLOW_COPY_AND_ASSIGN(ProgressBar); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace views | 80 } // namespace views |
| 81 | 81 |
| 82 #endif // VIEWS_CONTROLS_PROGRESS_BAR_H_ | 82 #endif // VIEWS_CONTROLS_PROGRESS_BAR_H_ |
| OLD | NEW |