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

Side by Side Diff: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years 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
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698