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

Unified Diff: views/controls/progress_bar.h

Issue 8429014: views: Move the overridden methods of ProgressBar to private section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/controls/progress_bar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/progress_bar.h
diff --git a/views/controls/progress_bar.h b/views/controls/progress_bar.h
index 65247b0d375db7192280c4dcb8befa493c16b2ff..aaaee03d847fde19105302b633026b2b9fff63e1 100644
--- a/views/controls/progress_bar.h
+++ b/views/controls/progress_bar.h
@@ -6,26 +6,13 @@
#define VIEWS_CONTROLS_PROGRESS_BAR_H_
#pragma once
-#include <string>
-
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "views/view.h"
-namespace gfx {
-class Canvas;
-class Point;
-class Size;
-}
-
namespace views {
-/////////////////////////////////////////////////////////////////////////////
-//
-// ProgressBar class
-//
-// A progress bar is a control that indicates progress visually.
-//
-/////////////////////////////////////////////////////////////////////////////
-
+// Progress bar is a control that indicates progress visually.
class VIEWS_EXPORT ProgressBar : public View {
public:
// The value range defaults to [0.0, 1.0].
@@ -34,32 +21,32 @@ class VIEWS_EXPORT ProgressBar : public View {
double current_value() const { return current_value_; }
- // View implementation.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual std::string GetClassName() const OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool GetTooltipText(const gfx::Point& p,
- string16* tooltip) const OVERRIDE;
-
// Sets the inclusive range of values to be displayed. Values outside of the
// range will be capped when displayed.
- virtual void SetDisplayRange(double min_display_value,
- double max_display_value);
+ void SetDisplayRange(double min_display_value, double max_display_value);
// Sets the current value. Values outside of the range [min_display_value_,
// max_display_value_] will be stored unmodified and capped for display.
- virtual void SetValue(double value);
+ void SetValue(double value);
// Sets the tooltip text. Default behavior for a progress bar is to show no
// tooltip on mouse hover. Calling this lets you set a custom tooltip. To
// revert to default behavior, call this with an empty string.
void SetTooltipText(const string16& tooltip_text);
+ // Overridden from View:
+ virtual bool GetTooltipText(const gfx::Point& p,
+ string16* tooltip) const OVERRIDE;
+ virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
private:
static const char kViewClassName[];
+ // Overridden from View:
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual std::string GetClassName() const OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+
// Inclusive range used when displaying values.
double min_display_value_;
double max_display_value_;
« no previous file with comments | « no previous file | views/controls/progress_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698