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

Side by Side Diff: components/infobars/core/infobar_delegate.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, 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/infobars/core/infobar_delegate.h" 5 #include "components/infobars/core/infobar_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/infobars/core/infobar.h" 9 #include "components/infobars/core/infobar.h"
10 #include "components/infobars/core/infobar_manager.h" 10 #include "components/infobars/core/infobar_manager.h"
(...skipping 29 matching lines...) Expand all
40 gfx::VectorIconId InfoBarDelegate::GetVectorIconId() const { 40 gfx::VectorIconId InfoBarDelegate::GetVectorIconId() const {
41 return gfx::VectorIconId::VECTOR_ICON_NONE; 41 return gfx::VectorIconId::VECTOR_ICON_NONE;
42 } 42 }
43 43
44 gfx::Image InfoBarDelegate::GetIcon() const { 44 gfx::Image InfoBarDelegate::GetIcon() const {
45 #if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID) 45 #if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID)
46 if (ui::MaterialDesignController::IsModeMaterial()) { 46 if (ui::MaterialDesignController::IsModeMaterial()) {
47 gfx::VectorIconId vector_id = GetVectorIconId(); 47 gfx::VectorIconId vector_id = GetVectorIconId();
48 if (vector_id != gfx::VectorIconId::VECTOR_ICON_NONE) { 48 if (vector_id != gfx::VectorIconId::VECTOR_ICON_NONE) {
49 return gfx::Image(gfx::CreateVectorIcon( 49 return gfx::Image(gfx::CreateVectorIcon(
50 vector_id, 16, 50 vector_id, 18,
51 GetInfoBarType() == WARNING_TYPE ? gfx::kAmber : gfx::kGoogleBlue)); 51 GetInfoBarType() == WARNING_TYPE ? SkColorSetRGB(0xFF, 0x67, 0)
52 : gfx::kGoogleBlue));
52 } 53 }
53 } 54 }
54 #endif 55 #endif
55 56
56 int icon_id = GetIconId(); 57 int icon_id = GetIconId();
57 return icon_id == kNoIconID ? gfx::Image() : 58 return icon_id == kNoIconID ? gfx::Image() :
58 ResourceBundle::GetSharedInstance().GetNativeImageNamed(icon_id); 59 ResourceBundle::GetSharedInstance().GetNativeImageNamed(icon_id);
59 } 60 }
60 61
61 bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { 62 bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 translate::TranslateInfoBarDelegate* 128 translate::TranslateInfoBarDelegate*
128 InfoBarDelegate::AsTranslateInfoBarDelegate() { 129 InfoBarDelegate::AsTranslateInfoBarDelegate() {
129 return nullptr; 130 return nullptr;
130 } 131 }
131 132
132 InfoBarDelegate::InfoBarDelegate() : nav_entry_id_(0) { 133 InfoBarDelegate::InfoBarDelegate() : nav_entry_id_(0) {
133 } 134 }
134 135
135 } // namespace infobars 136 } // namespace infobars
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698