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

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: Nit again Created 4 years, 11 months 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 "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"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // We should always close, even if the navigation did not occur within this 96 // We should always close, even if the navigation did not occur within this
97 // WebContents. 97 // WebContents.
98 return true; 98 return true;
99 } 99 }
100 100
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
107 AlternateNavInfoBarDelegate::GetIdentifier() const {
108 return ALTERNATE_NAV_INFOBAR_DELEGATE;
109 }
110
106 int AlternateNavInfoBarDelegate::GetIconId() const { 111 int AlternateNavInfoBarDelegate::GetIconId() const {
107 return IDR_INFOBAR_ALT_NAV_URL; 112 return IDR_INFOBAR_ALT_NAV_URL;
108 } 113 }
109 114
110 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { 115 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const {
111 #if defined(OS_MACOSX) 116 #if defined(OS_MACOSX)
112 return gfx::VectorIconId::VECTOR_ICON_NONE; 117 return gfx::VectorIconId::VECTOR_ICON_NONE;
113 #else 118 #else
114 return gfx::VectorIconId::GLOBE; 119 return gfx::VectorIconId::GLOBE;
115 #endif 120 #endif
116 } 121 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h ('k') | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698