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

Side by Side Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h" 5 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 AnimationEnded(animation); 174 AnimationEnded(animation);
175 } 175 }
176 176
177 bool ContentSettingImageView::OnMousePressed(const views::MouseEvent& event) { 177 bool ContentSettingImageView::OnMousePressed(const views::MouseEvent& event) {
178 // We want to show the bubble on mouse release; that is the standard behavior 178 // We want to show the bubble on mouse release; that is the standard behavior
179 // for buttons. 179 // for buttons.
180 return true; 180 return true;
181 } 181 }
182 182
183 void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) { 183 void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) {
184 if (!HitTest(event.location())) 184 if (!HitTestPoint(event.location()))
185 return; 185 return;
186 186
187 OnClick(); 187 OnClick();
188 } 188 }
189 189
190 void ContentSettingImageView::OnClick() { 190 void ContentSettingImageView::OnClick() {
191 TabContents* tab_contents = parent_->GetTabContents(); 191 TabContents* tab_contents = parent_->GetTabContents();
192 if (!tab_contents) 192 if (!tab_contents)
193 return; 193 return;
194 194
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return kBorderColor; 294 return kBorderColor;
295 } 295 }
296 296
297 SkColor ContentSettingImageView::GradientTopColor() const { 297 SkColor ContentSettingImageView::GradientTopColor() const {
298 return kTopBoxColor; 298 return kTopBoxColor;
299 } 299 }
300 300
301 SkColor ContentSettingImageView::GradientBottomColor() const { 301 SkColor ContentSettingImageView::GradientBottomColor() const {
302 return kBottomBoxColor; 302 return kBottomBoxColor;
303 } 303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698