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

Side by Side Diff: chrome/browser/ui/collected_cookies_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/collected_cookies_infobar_delegate.h" 5 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.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 CollectedCookiesInfoBarDelegate::~CollectedCookiesInfoBarDelegate() { 28 CollectedCookiesInfoBarDelegate::~CollectedCookiesInfoBarDelegate() {
29 } 29 }
30 30
31 infobars::InfoBarDelegate::Type 31 infobars::InfoBarDelegate::Type
32 CollectedCookiesInfoBarDelegate::GetInfoBarType() const { 32 CollectedCookiesInfoBarDelegate::GetInfoBarType() const {
33 return PAGE_ACTION_TYPE; 33 return PAGE_ACTION_TYPE;
34 } 34 }
35 35
36 infobars::InfoBarDelegate::InfoBarIdentifier
37 CollectedCookiesInfoBarDelegate::GetIdentifier() const {
38 return COLLECTED_COOKIES_INFOBAR_DELEGATE;
39 }
40
36 int CollectedCookiesInfoBarDelegate::GetIconId() const { 41 int CollectedCookiesInfoBarDelegate::GetIconId() const {
37 return IDR_INFOBAR_COOKIE; 42 return IDR_INFOBAR_COOKIE;
38 } 43 }
39 44
40 gfx::VectorIconId CollectedCookiesInfoBarDelegate::GetVectorIconId() const { 45 gfx::VectorIconId CollectedCookiesInfoBarDelegate::GetVectorIconId() const {
41 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
42 return gfx::VectorIconId::VECTOR_ICON_NONE; 47 return gfx::VectorIconId::VECTOR_ICON_NONE;
43 #else 48 #else
44 return gfx::VectorIconId::COOKIE; 49 return gfx::VectorIconId::COOKIE;
45 #endif 50 #endif
(...skipping 12 matching lines...) Expand all
58 DCHECK_EQ(BUTTON_OK, button); 63 DCHECK_EQ(BUTTON_OK, button);
59 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_INFOBAR_BUTTON); 64 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_INFOBAR_BUTTON);
60 } 65 }
61 66
62 bool CollectedCookiesInfoBarDelegate::Accept() { 67 bool CollectedCookiesInfoBarDelegate::Accept() {
63 content::WebContents* web_contents = 68 content::WebContents* web_contents =
64 InfoBarService::WebContentsFromInfoBar(infobar()); 69 InfoBarService::WebContentsFromInfoBar(infobar());
65 web_contents->GetController().Reload(true); 70 web_contents->GetController().Reload(true);
66 return true; 71 return true;
67 } 72 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/collected_cookies_infobar_delegate.h ('k') | chrome/browser/ui/extensions/extension_install_ui_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698