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

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: 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 (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 "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 WebsiteSettingsInfoBarDelegate::~WebsiteSettingsInfoBarDelegate() { 28 WebsiteSettingsInfoBarDelegate::~WebsiteSettingsInfoBarDelegate() {
29 } 29 }
30 30
31 infobars::InfoBarDelegate::Type 31 infobars::InfoBarDelegate::Type
32 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const { 32 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const {
33 return PAGE_ACTION_TYPE; 33 return PAGE_ACTION_TYPE;
34 } 34 }
35 35
36 std::string WebsiteSettingsInfoBarDelegate::GetIdentifier() const {
37 return "WebsiteSettingsInfoBarDelegate";
38 }
39
36 int WebsiteSettingsInfoBarDelegate::GetIconId() const { 40 int WebsiteSettingsInfoBarDelegate::GetIconId() const {
37 return IDR_INFOBAR_ALT_NAV_URL; 41 return IDR_INFOBAR_ALT_NAV_URL;
38 } 42 }
39 43
40 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const { 44 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const {
41 #if defined(OS_MACOSX) 45 #if defined(OS_MACOSX)
42 return gfx::VectorIconId::VECTOR_ICON_NONE; 46 return gfx::VectorIconId::VECTOR_ICON_NONE;
43 #else 47 #else
44 return gfx::VectorIconId::GLOBE; 48 return gfx::VectorIconId::GLOBE;
45 #endif 49 #endif
(...skipping 12 matching lines...) Expand all
58 DCHECK_EQ(BUTTON_OK, button); 62 DCHECK_EQ(BUTTON_OK, button);
59 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON); 63 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON);
60 } 64 }
61 65
62 bool WebsiteSettingsInfoBarDelegate::Accept() { 66 bool WebsiteSettingsInfoBarDelegate::Accept() {
63 content::WebContents* web_contents = 67 content::WebContents* web_contents =
64 InfoBarService::WebContentsFromInfoBar(infobar()); 68 InfoBarService::WebContentsFromInfoBar(infobar());
65 web_contents->GetController().Reload(true); 69 web_contents->GetController().Reload(true);
66 return true; 70 return true;
67 } 71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698