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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 10830366: Avoid overriding Bubble's GetAnchorRect() where possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a redundant DCHECK. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/content_setting_bubble_contents.cc
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index b9652fa902eb4d2e04e1c2e2420a4b42787ddca9..9977ced1e5c7747e9ebabef47deb86d5ed4bd535 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -108,6 +108,9 @@ ContentSettingBubbleContents::ContentSettingBubbleContents(
custom_link_(NULL),
manage_link_(NULL),
close_button_(NULL) {
+ // Compensate for built-in vertical padding in the anchor view's image.
+ set_anchor_insets(gfx::Insets(5, 0, 5, 0));
+
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<WebContents>(web_contents));
}
@@ -125,12 +128,6 @@ gfx::Size ContentSettingBubbleContents::GetPreferredSize() {
return preferred_size;
}
-gfx::Rect ContentSettingBubbleContents::GetAnchorRect() {
- gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
- rect.Inset(0, anchor_view() ? 5 : 0);
- return rect;
-}
-
void ContentSettingBubbleContents::Init() {
using views::GridLayout;
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.h ('k') | chrome/browser/ui/views/first_run_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698