| 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.h" | 8 #include "chrome/browser/autocomplete/shortcuts_backend.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.h" | 10 #include "chrome/browser/history/history_service.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( | 85 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( |
| 86 content::OpenURLParams(match_.destination_url, content::Referrer(), | 86 content::OpenURLParams(match_.destination_url, content::Referrer(), |
| 87 disposition, ui::PAGE_TRANSITION_TYPED, | 87 disposition, ui::PAGE_TRANSITION_TYPED, |
| 88 false)); | 88 false)); |
| 89 | 89 |
| 90 // We should always close, even if the navigation did not occur within this | 90 // We should always close, even if the navigation did not occur within this |
| 91 // WebContents. | 91 // WebContents. |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 infobars::InfoBarDelegate::Type |
| 96 AlternateNavInfoBarDelegate::GetInfoBarType() const { |
| 97 return PAGE_ACTION_TYPE; |
| 98 } |
| 99 |
| 95 int AlternateNavInfoBarDelegate::GetIconID() const { | 100 int AlternateNavInfoBarDelegate::GetIconID() const { |
| 96 return IDR_INFOBAR_ALT_NAV_URL; | 101 return IDR_INFOBAR_ALT_NAV_URL; |
| 97 } | 102 } |
| 98 | |
| 99 infobars::InfoBarDelegate::Type AlternateNavInfoBarDelegate::GetInfoBarType() | |
| 100 const { | |
| 101 return PAGE_ACTION_TYPE; | |
| 102 } | |
| OLD | NEW |