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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/website_settings/website_settings_infobar_delegate.h " 5 #include "chrome/browser/ui/website_settings/website_settings_infobar_delegate.h "
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 WebsiteSettingsInfoBarDelegate::~WebsiteSettingsInfoBarDelegate() { 29 WebsiteSettingsInfoBarDelegate::~WebsiteSettingsInfoBarDelegate() {
30 } 30 }
31 31
32 infobars::InfoBarDelegate::Type 32 infobars::InfoBarDelegate::Type
33 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const { 33 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const {
34 return PAGE_ACTION_TYPE; 34 return PAGE_ACTION_TYPE;
35 } 35 }
36 36
37 infobars::InfoBarDelegate::InfoBarIdentifier
38 WebsiteSettingsInfoBarDelegate::GetIdentifier() const {
39 return WEBSITE_SETTINGS_INFOBAR_DELEGATE;
40 }
41
37 int WebsiteSettingsInfoBarDelegate::GetIconId() const { 42 int WebsiteSettingsInfoBarDelegate::GetIconId() const {
38 return IDR_INFOBAR_ALT_NAV_URL; 43 return IDR_INFOBAR_ALT_NAV_URL;
39 } 44 }
40 45
41 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const { 46 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const {
42 #if defined(OS_MACOSX) 47 #if defined(OS_MACOSX)
43 return gfx::VectorIconId::VECTOR_ICON_NONE; 48 return gfx::VectorIconId::VECTOR_ICON_NONE;
44 #else 49 #else
45 return gfx::VectorIconId::GLOBE; 50 return gfx::VectorIconId::GLOBE;
46 #endif 51 #endif
(...skipping 12 matching lines...) Expand all
59 DCHECK_EQ(BUTTON_OK, button); 64 DCHECK_EQ(BUTTON_OK, button);
60 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON); 65 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON);
61 } 66 }
62 67
63 bool WebsiteSettingsInfoBarDelegate::Accept() { 68 bool WebsiteSettingsInfoBarDelegate::Accept() {
64 content::WebContents* web_contents = 69 content::WebContents* web_contents =
65 InfoBarService::WebContentsFromInfoBar(infobar()); 70 InfoBarService::WebContentsFromInfoBar(infobar());
66 web_contents->GetController().Reload(true); 71 web_contents->GetController().Reload(true);
67 return true; 72 return true;
68 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698