diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 23:51:38 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 23:51:38 +0000 |
commit | c2dacc9ec41232903ba700c6aef5ef98bfcb8af8 (patch) | |
tree | 4aa4d7100862c64bdd92d70e6323001beb19edb7 /chrome/views/base_button.cc | |
parent | d66e710ec668e34271def44d7f0416260657171c (diff) | |
download | chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.zip chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.tar.gz chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.tar.bz2 |
Rename ChromeViews namespace to views
http://crbug.com/2188
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/base_button.cc')
-rw-r--r-- | chrome/views/base_button.cc | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/chrome/views/base_button.cc b/chrome/views/base_button.cc index 325fc4d..7fc4772 100644 --- a/chrome/views/base_button.cc +++ b/chrome/views/base_button.cc @@ -11,7 +11,7 @@ #include "chrome/common/os_exchange_data.h" #include "chrome/common/throb_animation.h" -namespace ChromeViews { +namespace views { // How long the hover animation takes if uninterrupted. static const int kHoverFadeDurationMs = 150; @@ -41,7 +41,7 @@ BaseButton::~BaseButton() { // //////////////////////////////////////////////////////////////////////////////// -bool BaseButton::IsTriggerableEvent(const ChromeViews::MouseEvent& e) { +bool BaseButton::IsTriggerableEvent(const MouseEvent& e) { return e.IsLeftMouseButton(); } @@ -142,7 +142,7 @@ void BaseButton::SetTooltipText(const std::wstring& tooltip) { // //////////////////////////////////////////////////////////////////////////////// -bool BaseButton::OnMousePressed(const ChromeViews::MouseEvent& e) { +bool BaseButton::OnMousePressed(const MouseEvent& e) { if (state_ != BS_DISABLED) { if (IsTriggerableEvent(e) && HitTest(e.location())) { SetState(BS_PUSHED); @@ -153,7 +153,7 @@ bool BaseButton::OnMousePressed(const ChromeViews::MouseEvent& e) { return true; } -bool BaseButton::OnMouseDragged(const ChromeViews::MouseEvent& e) { +bool BaseButton::OnMouseDragged(const MouseEvent& e) { if (state_ != BS_DISABLED) { if (!HitTest(e.location())) SetState(BS_NORMAL); @@ -165,8 +165,7 @@ bool BaseButton::OnMouseDragged(const ChromeViews::MouseEvent& e) { return true; } -void BaseButton::OnMouseReleased(const ChromeViews::MouseEvent& e, - bool canceled) { +void BaseButton::OnMouseReleased(const MouseEvent& e, bool canceled) { if (InDrag()) { // Starting a drag results in a MouseReleased, we need to ignore it. return; @@ -187,16 +186,12 @@ void BaseButton::OnMouseReleased(const ChromeViews::MouseEvent& e, } } -void BaseButton::OnMouseEntered(const ChromeViews::MouseEvent& e) { - using namespace ChromeViews; - if (state_ != BS_DISABLED) { +void BaseButton::OnMouseEntered(const MouseEvent& e) { + if (state_ != BS_DISABLED) SetState(BS_HOT); - } } -void BaseButton::OnMouseMoved(const ChromeViews::MouseEvent& e) { - using namespace ChromeViews; - +void BaseButton::OnMouseMoved(const MouseEvent& e) { if (state_ != BS_DISABLED) { if (HitTest(e.location())) { SetState(BS_HOT); @@ -206,12 +201,10 @@ void BaseButton::OnMouseMoved(const ChromeViews::MouseEvent& e) { } } -void BaseButton::OnMouseExited(const ChromeViews::MouseEvent& e) { - using namespace ChromeViews; +void BaseButton::OnMouseExited(const MouseEvent& e) { // Starting a drag results in a MouseExited, we need to ignore it. - if (state_ != BS_DISABLED && !InDrag()) { + if (state_ != BS_DISABLED && !InDrag()) SetState(BS_NORMAL); - } } void BaseButton::NotifyClick(int mouse_event_flags) { @@ -303,5 +296,5 @@ void BaseButton::Paint(ChromeCanvas* canvas, bool for_drag) { Paint(canvas); } -} // namespace ChromeViews +} // namespace views |