| 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 "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 8 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
| 9 #include "chrome/browser/history/history_service_factory.h" | 9 #include "chrome/browser/history/history_service_factory.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // We should always close, even if the navigation did not occur within this | 95 // We should always close, even if the navigation did not occur within this |
| 96 // WebContents. | 96 // WebContents. |
| 97 return true; | 97 return true; |
| 98 } | 98 } |
| 99 | 99 |
| 100 infobars::InfoBarDelegate::Type | 100 infobars::InfoBarDelegate::Type |
| 101 AlternateNavInfoBarDelegate::GetInfoBarType() const { | 101 AlternateNavInfoBarDelegate::GetInfoBarType() const { |
| 102 return PAGE_ACTION_TYPE; | 102 return PAGE_ACTION_TYPE; |
| 103 } | 103 } |
| 104 | 104 |
| 105 std::string AlternateNavInfoBarDelegate::GetIdentifier() const { |
| 106 return "AlternateNavInfoBarDelegate"; |
| 107 } |
| 108 |
| 105 int AlternateNavInfoBarDelegate::GetIconId() const { | 109 int AlternateNavInfoBarDelegate::GetIconId() const { |
| 106 return IDR_INFOBAR_ALT_NAV_URL; | 110 return IDR_INFOBAR_ALT_NAV_URL; |
| 107 } | 111 } |
| 108 | 112 |
| 109 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { | 113 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { |
| 110 #if defined(OS_MACOSX) | 114 #if defined(OS_MACOSX) |
| 111 return gfx::VectorIconId::VECTOR_ICON_NONE; | 115 return gfx::VectorIconId::VECTOR_ICON_NONE; |
| 112 #else | 116 #else |
| 113 return gfx::VectorIconId::GLOBE; | 117 return gfx::VectorIconId::GLOBE; |
| 114 #endif | 118 #endif |
| 115 } | 119 } |
| OLD | NEW |