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

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

Powered by Google App Engine
This is Rietveld 408576698