| 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/app/vector_icons/vector_icons.h" |
| 9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 10 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
| 10 #include "chrome/browser/history/history_service_factory.h" | 11 #include "chrome/browser/history/history_service_factory.h" |
| 11 #include "chrome/browser/infobars/infobar_service.h" | 12 #include "chrome/browser/infobars/infobar_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
| 14 #include "components/history/core/browser/history_service.h" | 15 #include "components/history/core/browser/history_service.h" |
| 15 #include "components/infobars/core/infobar.h" | 16 #include "components/infobars/core/infobar.h" |
| 16 #include "components/omnibox/browser/shortcuts_backend.h" | 17 #include "components/omnibox/browser/shortcuts_backend.h" |
| 17 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 19 #include "ui/gfx/vector_icons_public.h" | |
| 20 | 20 |
| 21 AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { | 21 AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { |
| 22 } | 22 } |
| 23 | 23 |
| 24 // static | 24 // static |
| 25 void AlternateNavInfoBarDelegate::Create( | 25 void AlternateNavInfoBarDelegate::Create( |
| 26 content::WebContents* web_contents, | 26 content::WebContents* web_contents, |
| 27 const base::string16& text, | 27 const base::string16& text, |
| 28 const AutocompleteMatch& match, | 28 const AutocompleteMatch& match, |
| 29 const GURL& search_url) { | 29 const GURL& search_url) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 infobars::InfoBarDelegate::Type | 101 infobars::InfoBarDelegate::Type |
| 102 AlternateNavInfoBarDelegate::GetInfoBarType() const { | 102 AlternateNavInfoBarDelegate::GetInfoBarType() const { |
| 103 return PAGE_ACTION_TYPE; | 103 return PAGE_ACTION_TYPE; |
| 104 } | 104 } |
| 105 | 105 |
| 106 infobars::InfoBarDelegate::InfoBarIdentifier | 106 infobars::InfoBarDelegate::InfoBarIdentifier |
| 107 AlternateNavInfoBarDelegate::GetIdentifier() const { | 107 AlternateNavInfoBarDelegate::GetIdentifier() const { |
| 108 return ALTERNATE_NAV_INFOBAR_DELEGATE; | 108 return ALTERNATE_NAV_INFOBAR_DELEGATE; |
| 109 } | 109 } |
| 110 | 110 |
| 111 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { | 111 const gfx::VectorIcon& AlternateNavInfoBarDelegate::GetVectorIcon() const { |
| 112 return gfx::VectorIconId::GLOBE; | 112 return kGlobeIcon; |
| 113 } | 113 } |
| OLD | NEW |