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

Unified Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.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/location_bar/content_setting_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index b3424657a5875c731952081688995c2b3e3b2782..0a3fd9598d7eb7bd729aacae242afb486744a467 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -124,9 +124,8 @@ bool ContentSettingImageView::OnMousePressed(const views::MouseEvent& event) {
return true;
}
-void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event,
- bool canceled) {
- if (canceled || !HitTest(event.location()))
+void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) {
+ if (!HitTest(event.location()))
return;
TabContents* tab_contents = parent_->GetTabContentsWrapper()->tab_contents();
@@ -153,6 +152,19 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event,
bubble_contents->set_info_bubble(info_bubble_);
}
+void ContentSettingImageView::InfoBubbleClosing(InfoBubble* info_bubble,
+ bool closed_by_escape) {
+ info_bubble_ = NULL;
+}
+
+bool ContentSettingImageView::CloseOnEscape() {
+ return true;
+}
+
+bool ContentSettingImageView::FadeInOnShow() {
+ return false;
+}
+
void ContentSettingImageView::VisibilityChanged(View* starting_from,
bool is_visible) {
if (!is_visible && info_bubble_)
@@ -218,19 +230,6 @@ void ContentSettingImageView::OnPaintBackground(gfx::Canvas* canvas) {
kBoxCornerRadius, outer_paint);
}
-void ContentSettingImageView::InfoBubbleClosing(InfoBubble* info_bubble,
- bool closed_by_escape) {
- info_bubble_ = NULL;
-}
-
-bool ContentSettingImageView::CloseOnEscape() {
- return true;
-}
-
-bool ContentSettingImageView::FadeInOnShow() {
- return false;
-}
-
void ContentSettingImageView::AnimateToState(double state) {
if (state >= 1.0) {
// Animaton is over, clear the variables.

Powered by Google App Engine
This is Rietveld 408576698