Commit 83c3f766 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

views: anchor SessionCrashedBubbleView

This utility function makes the bubble stay anchored when fullscreening the
window. Most other chrome bubbles inherit from one of the extension or
location decoration bubble classes and therefore already have this behavior,
but SessionCrashedBubbleView is unusual.

Bug: 825904
Change-Id: Ibc482f9f3f29de9e049b26770463f7e1d2a19c96
Reviewed-on: https://chromium-review.googlesource.com/981234
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546151}
parent a783ac29
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "chrome/browser/platform_util.h" #include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/cocoa/browser_dialogs_views_mac.h" #include "chrome/browser/ui/cocoa/browser_dialogs_views_mac.h"
#include "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h"
#endif #endif
using views::GridLayout; using views::GridLayout;
...@@ -189,6 +190,10 @@ void SessionCrashedBubbleView::ShowForReal( ...@@ -189,6 +190,10 @@ void SessionCrashedBubbleView::ShowForReal(
GetBubbleAnchorView(browser), GetBubbleAnchorRect(browser), browser, GetBubbleAnchorView(browser), GetBubbleAnchorRect(browser), browser,
offer_uma_optin); offer_uma_optin);
views::BubbleDialogDelegateView::CreateBubble(crash_bubble)->Show(); views::BubbleDialogDelegateView::CreateBubble(crash_bubble)->Show();
#if defined(OS_MACOSX)
if (views_mode_controller::IsViewsBrowserCocoa())
KeepBubbleAnchored(crash_bubble);
#endif
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_SHOWN); RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_SHOWN);
if (uma_opted_in_already) if (uma_opted_in_already)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment