summaryrefslogtreecommitdiffstats
path: root/chrome/views/base_button.cc
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 12:27:03 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 12:27:03 +0000
commit1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf (patch)
treeb78be07dbada3ac0f6d2435558e4a6aaba198ffc /chrome/views/base_button.cc
parentea15e98a9353494df754a11fb49f0e4b8c0d4789 (diff)
downloadchromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.zip
chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.gz
chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.bz2
Large patch set (159 files total) to cleanup the includes.
- Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/base_button.cc')
-rw-r--r--chrome/views/base_button.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/views/base_button.cc b/chrome/views/base_button.cc
index 6fc440a..81b97ab 100644
--- a/chrome/views/base_button.cc
+++ b/chrome/views/base_button.cc
@@ -27,9 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <atlbase.h>
-#include <atlapp.h>
-
#include "chrome/views/base_button.h"
#include "base/base_drag_source.h"
@@ -37,6 +34,7 @@
#include "chrome/common/drag_drop_types.h"
#include "chrome/common/gfx/chrome_canvas.h"
#include "chrome/common/os_exchange_data.h"
+#include "chrome/common/throb_animation.h"
namespace ChromeViews {
@@ -171,7 +169,7 @@ void BaseButton::SetTooltipText(const std::wstring& tooltip) {
bool BaseButton::OnMousePressed(const ChromeViews::MouseEvent& e) {
if (state_ != BS_DISABLED) {
- if (IsTriggerableEvent(e) && HitTest(e.GetLocation())) {
+ if (IsTriggerableEvent(e) && HitTest(WTL::CPoint(e.GetX(), e.GetY()))) {
SetState(BS_PUSHED);
}
if (IsFocusable())
@@ -182,7 +180,7 @@ bool BaseButton::OnMousePressed(const ChromeViews::MouseEvent& e) {
bool BaseButton::OnMouseDragged(const ChromeViews::MouseEvent& e) {
if (state_ != BS_DISABLED) {
- if (!HitTest(e.GetLocation()))
+ if (!HitTest(WTL::CPoint(e.GetX(), e.GetY())))
SetState(BS_NORMAL);
else if (IsTriggerableEvent(e))
SetState(BS_PUSHED);
@@ -200,7 +198,7 @@ void BaseButton::OnMouseReleased(const ChromeViews::MouseEvent& e,
}
if (state_ != BS_DISABLED) {
- if (canceled || !HitTest(e.GetLocation())) {
+ if (canceled || !HitTest(WTL::CPoint(e.GetX(), e.GetY()))) {
SetState(BS_NORMAL);
} else {
SetState(BS_HOT);
@@ -225,7 +223,7 @@ void BaseButton::OnMouseMoved(const ChromeViews::MouseEvent& e) {
using namespace ChromeViews;
if (state_ != BS_DISABLED) {
- if (HitTest(e.GetLocation())) {
+ if (HitTest(WTL::CPoint(e.GetX(), e.GetY()))) {
SetState(BS_HOT);
} else {
SetState(BS_NORMAL);