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

Side by Side Diff: chrome/browser/ui/views/content_setting_bubble_contents.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/content_setting_bubble_contents.h" 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 bool ContentSettingBubbleContents::Favicon::OnMousePressed( 75 bool ContentSettingBubbleContents::Favicon::OnMousePressed(
76 const views::MouseEvent& event) { 76 const views::MouseEvent& event) {
77 return event.IsLeftMouseButton() || event.IsMiddleMouseButton(); 77 return event.IsLeftMouseButton() || event.IsMiddleMouseButton();
78 } 78 }
79 79
80 void ContentSettingBubbleContents::Favicon::OnMouseReleased( 80 void ContentSettingBubbleContents::Favicon::OnMouseReleased(
81 const views::MouseEvent& event) { 81 const views::MouseEvent& event) {
82 if ((event.IsLeftMouseButton() || event.IsMiddleMouseButton()) && 82 if ((event.IsLeftMouseButton() || event.IsMiddleMouseButton()) &&
83 HitTest(event.location())) { 83 HitTestPoint(event.location())) {
84 parent_->LinkClicked(link_, event.flags()); 84 parent_->LinkClicked(link_, event.flags());
85 } 85 }
86 } 86 }
87 87
88 gfx::NativeCursor ContentSettingBubbleContents::Favicon::GetCursor( 88 gfx::NativeCursor ContentSettingBubbleContents::Favicon::GetCursor(
89 const views::MouseEvent& event) { 89 const views::MouseEvent& event) {
90 #if defined(USE_AURA) 90 #if defined(USE_AURA)
91 return ui::kCursorHand; 91 return ui::kCursorHand;
92 #elif defined(OS_WIN) 92 #elif defined(OS_WIN)
93 static HCURSOR g_hand_cursor = LoadCursor(NULL, IDC_HAND); 93 static HCURSOR g_hand_cursor = LoadCursor(NULL, IDC_HAND);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 324 }
325 325
326 void ContentSettingBubbleContents::Observe( 326 void ContentSettingBubbleContents::Observe(
327 int type, 327 int type,
328 const content::NotificationSource& source, 328 const content::NotificationSource& source,
329 const content::NotificationDetails& details) { 329 const content::NotificationDetails& details) {
330 DCHECK(type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED); 330 DCHECK(type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED);
331 DCHECK(source == content::Source<WebContents>(web_contents_)); 331 DCHECK(source == content::Source<WebContents>(web_contents_));
332 web_contents_ = NULL; 332 web_contents_ = NULL;
333 } 333 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_button.cc ('k') | chrome/browser/ui/views/frame/browser_view_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698