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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address most TODOs and sync. Created 9 years, 9 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
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;
sadrul 2011/03/19 09:15:30 Why are these moved from private to public?
msw 2011/03/26 00:09:50 Done.
+
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()))
Ben Goodger (Google) 2011/03/19 15:32:55 braces around this block
msw 2011/03/26 00:09:50 Done.
+ parent_->LinkActivated(link_, event.flags());
+}
+
ContentSettingBubbleContents::ContentSettingBubbleContents(
ContentSettingBubbleModel* content_setting_bubble_model,
Profile* profile,

Powered by Google App Engine
This is Rietveld 408576698