Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" | 5 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
| 10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
| 11 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 14 #include "chrome/grit/theme_resources.h" | |
| 15 #include "components/history/core/browser/history_service.h" | 14 #include "components/history/core/browser/history_service.h" |
| 16 #include "components/infobars/core/infobar.h" | 15 #include "components/infobars/core/infobar.h" |
| 17 #include "components/omnibox/browser/shortcuts_backend.h" | 16 #include "components/omnibox/browser/shortcuts_backend.h" |
| 18 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/gfx/vector_icons_public.h" | 19 #include "ui/gfx/vector_icons_public.h" |
| 21 | 20 |
| 22 AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { | 21 AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { |
| 23 } | 22 } |
| 24 | 23 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 infobars::InfoBarDelegate::Type | 101 infobars::InfoBarDelegate::Type |
| 103 AlternateNavInfoBarDelegate::GetInfoBarType() const { | 102 AlternateNavInfoBarDelegate::GetInfoBarType() const { |
| 104 return PAGE_ACTION_TYPE; | 103 return PAGE_ACTION_TYPE; |
| 105 } | 104 } |
| 106 | 105 |
| 107 infobars::InfoBarDelegate::InfoBarIdentifier | 106 infobars::InfoBarDelegate::InfoBarIdentifier |
| 108 AlternateNavInfoBarDelegate::GetIdentifier() const { | 107 AlternateNavInfoBarDelegate::GetIdentifier() const { |
| 109 return ALTERNATE_NAV_INFOBAR_DELEGATE; | 108 return ALTERNATE_NAV_INFOBAR_DELEGATE; |
| 110 } | 109 } |
| 111 | 110 |
| 112 int AlternateNavInfoBarDelegate::GetIconId() const { | |
| 113 return IDR_INFOBAR_ALT_NAV_URL; | |
| 114 } | |
| 115 | |
| 116 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { | 111 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { |
| 117 #if defined(OS_MACOSX) | 112 #if defined(OS_MACOSX) |
|
Peter Kasting
2016/09/29 04:20:01
Shouldn't we rip out this #if?
Evan Stade
2016/09/29 16:29:44
yes!
| |
| 118 return gfx::VectorIconId::VECTOR_ICON_NONE; | 113 return gfx::VectorIconId::VECTOR_ICON_NONE; |
| 119 #else | 114 #else |
| 120 return gfx::VectorIconId::GLOBE; | 115 return gfx::VectorIconId::GLOBE; |
| 121 #endif | 116 #endif |
| 122 } | 117 } |
| OLD | NEW |