| Index: chrome/browser/ui/views/content_setting_bubble_contents.cc
|
| diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
|
| index 8c2a381501d36cf4c08358b5119c242a91144b4c..f96ccb0c11add420fa15e34bb9e69a7317a8c784 100644
|
| --- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
|
| +++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
|
| @@ -49,17 +49,17 @@ class ContentSettingBubbleContents::Favicon : public views::ImageView {
|
| views::Link* link);
|
| virtual ~Favicon();
|
|
|
| + // views::View overrides:
|
| + virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type,
|
| + const gfx::Point& p) OVERRIDE;
|
| + virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
|
| + virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
|
| +
|
| private:
|
| #if defined(OS_WIN)
|
| static HCURSOR g_hand_cursor;
|
| #endif
|
|
|
| - // views::View overrides:
|
| - virtual bool OnMousePressed(const views::MouseEvent& event);
|
| - virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
|
| - virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type,
|
| - const gfx::Point& p);
|
| -
|
| ContentSettingBubbleContents* parent_;
|
| views::Link* link_;
|
| };
|
| @@ -80,20 +80,6 @@ ContentSettingBubbleContents::Favicon::Favicon(
|
| ContentSettingBubbleContents::Favicon::~Favicon() {
|
| }
|
|
|
| -bool ContentSettingBubbleContents::Favicon::OnMousePressed(
|
| - const views::MouseEvent& event) {
|
| - return event.IsLeftMouseButton() || event.IsMiddleMouseButton();
|
| -}
|
| -
|
| -void ContentSettingBubbleContents::Favicon::OnMouseReleased(
|
| - const views::MouseEvent& event,
|
| - bool canceled) {
|
| - if (!canceled &&
|
| - (event.IsLeftMouseButton() || event.IsMiddleMouseButton()) &&
|
| - HitTest(event.location()))
|
| - parent_->LinkActivated(link_, event.flags());
|
| -}
|
| -
|
| gfx::NativeCursor ContentSettingBubbleContents::Favicon::GetCursorForPoint(
|
| ui::EventType event_type,
|
| const gfx::Point& p) {
|
| @@ -106,6 +92,18 @@ gfx::NativeCursor ContentSettingBubbleContents::Favicon::GetCursorForPoint(
|
| #endif
|
| }
|
|
|
| +bool ContentSettingBubbleContents::Favicon::OnMousePressed(
|
| + const views::MouseEvent& event) {
|
| + return event.IsLeftMouseButton() || event.IsMiddleMouseButton();
|
| +}
|
| +
|
| +void ContentSettingBubbleContents::Favicon::OnMouseReleased(
|
| + const views::MouseEvent& event) {
|
| + if ((event.IsLeftMouseButton() || event.IsMiddleMouseButton()) &&
|
| + HitTest(event.location()))
|
| + parent_->LinkActivated(link_, event.flags());
|
| +}
|
| +
|
| ContentSettingBubbleContents::ContentSettingBubbleContents(
|
| ContentSettingBubbleModel* content_setting_bubble_model,
|
| Profile* profile,
|
|
|