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

Unified Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.cc

Issue 2394143004: Harmony - Update anchors for the rest of the location bar icons that (Closed)
Patch Set: actually fix Created 4 years, 2 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/location_bar/content_setting_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index f79a2793feced2f8cbb8aadc09885f34f21a0eb9..2a9700fd4c013b5d501a8022400ba261ee6e22bf 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/theme_provider.h"
#include "ui/events/event_utils.h"
#include "ui/gfx/color_palette.h"
@@ -26,7 +27,6 @@ namespace {
const int kStayOpenTimeMS = 3200;
}
-
// static
const int ContentSettingImageView::kAnimationDurationMS =
(IconLabelBubbleView::kOpenTimeMS * 2) + kStayOpenTimeMS;
@@ -209,11 +209,14 @@ bool ContentSettingImageView::OnActivate(const ui::Event& event) {
content::WebContents* web_contents = parent_->GetWebContents();
if (web_contents && !bubble_view_) {
+ views::View* anchor = this;
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial())
+ anchor = parent_;
bubble_view_ = new ContentSettingBubbleContents(
content_setting_image_model_->CreateBubbleModel(
parent_->delegate()->GetContentSettingBubbleModelDelegate(),
web_contents, parent_->profile()),
- web_contents, this, views::BubbleBorder::TOP_RIGHT);
+ web_contents, anchor, views::BubbleBorder::TOP_RIGHT);
views::Widget* bubble_widget =
views::BubbleDialogDelegateView::CreateBubble(bubble_view_);
bubble_widget->AddObserver(this);
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698