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

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

Issue 1762373002: Corrects ContentSettingBubbleContents to show bubble with arrow when animation is paused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds ContentSettingBubbleContents::Show (show arrow on pause) Created 4 years, 10 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 0c1e0292c55aa0bb3a5fdbb88e1a1179baa6ea38..a11de08d69dc3fc9fa1cefdd35e832d5a0078d44 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -25,6 +25,7 @@
#include "grit/components_strings.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font_list.h"
@@ -177,6 +178,16 @@ void ContentSettingBubbleContents::UpdateMenuLabel(
NOTREACHED();
}
+views::Widget* ContentSettingBubbleContents::Show(bool show_arrow) {
+ views::Widget* widget = views::BubbleDelegateView::CreateBubble(this);
+ // In the USER_GESTURE case, the icon will be in an active state so the
+ // bubble doesn't need an arrow.
+ if (ui::MaterialDesignController::IsModeMaterial() && !show_arrow)
+ SetArrowPaintType(views::BubbleBorder::PAINT_TRANSPARENT);
+ widget->Show();
+ return widget;
+}
+
void ContentSettingBubbleContents::Init() {
using views::GridLayout;

Powered by Google App Engine
This is Rietveld 408576698