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

Side by Side Diff: chrome/browser/ui/views/avatar_menu_bubble_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/avatar_menu_bubble_view.h" 5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 delegate_->OnFocusStateChanged(false); 177 delegate_->OnFocusStateChanged(false);
178 } 178 }
179 179
180 180
181 // ProfileImageView ----------------------------------------------------------- 181 // ProfileImageView -----------------------------------------------------------
182 182
183 // A custom image view that ignores mouse events so that the parent can receive 183 // A custom image view that ignores mouse events so that the parent can receive
184 // them instead. 184 // them instead.
185 class ProfileImageView : public views::ImageView { 185 class ProfileImageView : public views::ImageView {
186 public: 186 public:
187 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 187 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
188 }; 188 };
189 189
190 bool ProfileImageView::HitTest(const gfx::Point& l) const { 190 bool ProfileImageView::HitTestRect(const gfx::Rect& rect) const {
191 return false; 191 return false;
192 } 192 }
193 193
194 194
195 // ProfileItemView ------------------------------------------------------------ 195 // ProfileItemView ------------------------------------------------------------
196 196
197 // Control that shows information about a single profile. 197 // Control that shows information about a single profile.
198 class ProfileItemView : public views::CustomButton, 198 class ProfileItemView : public views::CustomButton,
199 public HighlightDelegate { 199 public HighlightDelegate {
200 public: 200 public:
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 551 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
552 add_profile_link_->SetBackgroundColor(color()); 552 add_profile_link_->SetBackgroundColor(color());
553 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); 553 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6));
554 AddChildView(add_profile_link_); 554 AddChildView(add_profile_link_);
555 555
556 // If the bubble has already been shown then resize and reposition the bubble. 556 // If the bubble has already been shown then resize and reposition the bubble.
557 Layout(); 557 Layout();
558 if (GetBubbleFrameView()) 558 if (GetBubbleFrameView())
559 SizeToContents(); 559 SizeToContents();
560 } 560 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc ('k') | chrome/browser/ui/views/avatar_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698