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

Unified Diff: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm

Issue 1906253002: Display origin url on the chooser permission dialog title on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display origin url on the chooser permission dialog title on Mac Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm b/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
index 5187204fdc4987a5546b7adaca027376497bfcb8..9b03a48cc77c8f8bd8fff6ff32b442d0d41f882e 100644
--- a/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
+++ b/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
@@ -27,13 +27,14 @@
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/native_web_keyboard_event.h"
-#include "skia/ext/skia_utils_mac.h"
+#import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#include "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/cocoa/window_size_constants.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace {
@@ -453,9 +454,15 @@ std::unique_ptr<BubbleUi> ChooserBubbleController::BuildBubbleUi() {
[titleView setBezeled:NO];
[titleView setEditable:NO];
[titleView setSelectable:NO];
- [titleView setStringValue:l10n_util::GetNSString(IDS_CHOOSER_BUBBLE_PROMPT)];
+ [titleView setStringValue:l10n_util::GetNSStringF(
+ IDS_CHOOSER_BUBBLE_PROMPT,
+ base::ASCIIToUTF16(
+ chooserBubbleController_->GetOrigin()
+ .Serialize()))];
[titleView setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
- [titleView sizeToFit];
+ // The height is arbitrary as it will be adjusted later.
+ [titleView setFrameSize:NSMakeSize(kChooserBubbleWidth - 2 * kMarginX, 0.0f)];
+ [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:titleView];
return titleView;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698