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

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/profiles/avatar_menu_bubble_view.h" 5 #include "chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 delegate_->OnFocusStateChanged(false); 194 delegate_->OnFocusStateChanged(false);
195 } 195 }
196 196
197 197
198 // ProfileImageView ----------------------------------------------------------- 198 // ProfileImageView -----------------------------------------------------------
199 199
200 // A custom image view that ignores mouse events so that the parent can receive 200 // A custom image view that ignores mouse events so that the parent can receive
201 // them instead. 201 // them instead.
202 class ProfileImageView : public views::ImageView { 202 class ProfileImageView : public views::ImageView {
203 public: 203 public:
204 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; 204 virtual bool HitTestRect(const gfx::RectF& rect) const OVERRIDE;
205 }; 205 };
206 206
207 bool ProfileImageView::HitTestRect(const gfx::Rect& rect) const { 207 bool ProfileImageView::HitTestRect(const gfx::RectF& rect) const {
208 return false; 208 return false;
209 } 209 }
210 210
211 } // namespace 211 } // namespace
212 212
213 // ProfileItemView ------------------------------------------------------------ 213 // ProfileItemView ------------------------------------------------------------
214 214
215 // Control that shows information about a single profile. 215 // Control that shows information about a single profile.
216 class ProfileItemView : public views::CustomButton, 216 class ProfileItemView : public views::CustomButton,
217 public HighlightDelegate { 217 public HighlightDelegate {
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 Layout(); 799 Layout();
800 if (GetBubbleFrameView()) 800 if (GetBubbleFrameView())
801 SizeToContents(); 801 SizeToContents();
802 } 802 }
803 803
804 void AvatarMenuBubbleView::SetBackgroundColors() { 804 void AvatarMenuBubbleView::SetBackgroundColors() {
805 for (size_t i = 0; i < item_views_.size(); ++i) { 805 for (size_t i = 0; i < item_views_.size(); ++i) {
806 item_views_[i]->OnHighlightStateChanged(); 806 item_views_[i]->OnHighlightStateChanged();
807 } 807 }
808 } 808 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698