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

Side by Side Diff: views/controls/progress_bar.h

Issue 6976048: views: Add OnEnabledChanged() method to View class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DisableOnHover test? Created 9 years, 6 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
« no previous file with comments | « views/controls/native_control_win.cc ('k') | views/controls/progress_bar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « views/controls/native_control_win.cc ('k') | views/controls/progress_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698