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

Unified Diff: chrome/browser/ui/views/chrome_to_mobile_bubble_view.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/chrome_to_mobile_bubble_view.cc
diff --git a/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc b/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
index 6f0924772578e5fd42527459cdd91eb1e3562099..135c2c2265a535baef51cddaa0ac657b168c33c4 100644
--- a/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
+++ b/chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc
@@ -128,13 +128,6 @@ views::View* ChromeToMobileBubbleView::GetInitiallyFocusedView() {
return send_;
}
-gfx::Rect ChromeToMobileBubbleView::GetAnchorRect() {
- // Compensate for some built-in padding in the page action icon image.
- gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
- rect.Inset(0, anchor_view() ? 5 : 0);
- return rect;
-}
-
void ChromeToMobileBubbleView::WindowClosing() {
// We have to reset |bubble_| here, not in our destructor, because we'll be
// destroyed asynchronously and the shown state will be checked before then.
@@ -331,6 +324,9 @@ ChromeToMobileBubbleView::ChromeToMobileBubbleView(views::View* anchor_view,
send_copy_(NULL),
send_(NULL),
cancel_(NULL) {
+ // Compensate for built-in vertical padding in the anchor view's image.
+ set_anchor_insets(gfx::Insets(5, 0, 5, 0));
+
// Generate the MHTML snapshot now to report its size in the bubble.
service_->GenerateSnapshot(browser_, weak_ptr_factory_.GetWeakPtr());
« no previous file with comments | « chrome/browser/ui/views/chrome_to_mobile_bubble_view.h ('k') | chrome/browser/ui/views/content_setting_bubble_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698