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

Unified Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 1377553002: Update default browser infobar for MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change to normal type Created 5 years, 3 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 | components/infobars/core/infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/default_browser_prompt.cc
diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc
index ce1585d507f7a7cfaeca528111b8e59d441d55c4..c091cf85b68226d5d81b41c9a034bcdc66ed07c1 100644
--- a/chrome/browser/ui/startup/default_browser_prompt.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -32,7 +32,7 @@
#include "content/public/browser/web_contents.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
-
+#include "ui/gfx/vector_icons_public.h"
namespace {
@@ -115,7 +115,9 @@ class DefaultBrowserInfoBarDelegate : public ConfirmInfoBarDelegate {
void AllowExpiry() { should_expire_ = true; }
// ConfirmInfoBarDelegate:
+ Type GetInfoBarType() const override;
int GetIconId() const override;
+ gfx::VectorIconId GetVectorIconId() const override;
bool ShouldExpire(const NavigationDetails& details) const override;
base::string16 GetMessageText() const override;
base::string16 GetButtonLabel(InfoBarButton button) const override;
@@ -165,10 +167,23 @@ DefaultBrowserInfoBarDelegate::~DefaultBrowserInfoBarDelegate() {
UMA_HISTOGRAM_BOOLEAN("DefaultBrowserWarning.Ignored", true);
}
+infobars::InfoBarDelegate::Type DefaultBrowserInfoBarDelegate::GetInfoBarType()
+ const {
+ return PAGE_ACTION_TYPE;
+}
+
int DefaultBrowserInfoBarDelegate::GetIconId() const {
return IDR_PRODUCT_LOGO_32;
}
+gfx::VectorIconId DefaultBrowserInfoBarDelegate::GetVectorIconId() const {
+#if defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_IOS)
+ return gfx::VectorIconId::VECTOR_ICON_NONE;
+#else
+ return gfx::VectorIconId::CHROME_PRODUCT;
+#endif
+}
+
bool DefaultBrowserInfoBarDelegate::ShouldExpire(
const NavigationDetails& details) const {
return should_expire_ && ConfirmInfoBarDelegate::ShouldExpire(details);
« no previous file with comments | « no previous file | components/infobars/core/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698