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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 2815303004: Update the Windows iOS promotion to have the same width as the bubble that appears before it. (Closed)
Patch Set: Comments Created 3 years, 8 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/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/metrics/user_metrics.h" 10 #include "base/metrics/user_metrics.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 base::RecordAction( 397 base::RecordAction(
398 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); 398 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble"));
399 } 399 }
400 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); 400 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index());
401 } 401 }
402 } 402 }
403 403
404 #if defined(OS_WIN) 404 #if defined(OS_WIN)
405 void BookmarkBubbleView::ShowIOSPromotion() { 405 void BookmarkBubbleView::ShowIOSPromotion() {
406 DCHECK(!is_showing_ios_promotion_); 406 DCHECK(!is_showing_ios_promotion_);
407 gfx::Rect bubble_bounds = GetBubbleBounds();
407 RemoveChildView(bookmark_details_view_.get()); 408 RemoveChildView(bookmark_details_view_.get());
408 is_showing_ios_promotion_ = true; 409 is_showing_ios_promotion_ = true;
409 ios_promo_view_ = new DesktopIOSPromotionBubbleView( 410 ios_promo_view_ = new DesktopIOSPromotionBubbleView(
410 profile_, desktop_ios_promotion::PromotionEntryPoint::BOOKMARKS_BUBBLE); 411 profile_, desktop_ios_promotion::PromotionEntryPoint::BOOKMARKS_BUBBLE);
411 AddChildView(ios_promo_view_); 412 AddChildView(ios_promo_view_);
412 GetWidget()->UpdateWindowIcon(); 413 GetWidget()->UpdateWindowIcon();
413 GetWidget()->UpdateWindowTitle(); 414 GetWidget()->UpdateWindowTitle();
414 SizeToContents(); 415 // Resize the bubble so it has the same width as the parent bubble.
416 ios_promo_view_->UpdateBubbleHeight(bubble_bounds);
415 } 417 }
416 #endif 418 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698