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

Side by Side Diff: chrome/browser/media/protected_media_identifier_infobar_delegate_android.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media/protected_media_identifier_infobar_delegate_andro id.h" 5 #include "chrome/browser/media/protected_media_identifier_infobar_delegate_andro id.h"
6 6
7 #include "chrome/browser/android/android_theme_resources.h" 7 #include "chrome/browser/android/android_theme_resources.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 23 matching lines...) Expand all
34 requesting_frame, 34 requesting_frame,
35 content::PermissionType::PROTECTED_MEDIA_IDENTIFIER, 35 content::PermissionType::PROTECTED_MEDIA_IDENTIFIER,
36 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, 36 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER,
37 callback), 37 callback),
38 requesting_frame_(requesting_frame), 38 requesting_frame_(requesting_frame),
39 display_languages_(display_languages) {} 39 display_languages_(display_languages) {}
40 40
41 ProtectedMediaIdentifierInfoBarDelegateAndroid:: 41 ProtectedMediaIdentifierInfoBarDelegateAndroid::
42 ~ProtectedMediaIdentifierInfoBarDelegateAndroid() {} 42 ~ProtectedMediaIdentifierInfoBarDelegateAndroid() {}
43 43
44 infobars::InfoBarDelegate::InfoBarIdentifier
45 ProtectedMediaIdentifierInfoBarDelegateAndroid::GetIdentifier() const {
46 return PROTECTED_MEDIA_IDENTIFIER_INFOBAR_DELEGATE_ANDROID;
47 }
48
44 int ProtectedMediaIdentifierInfoBarDelegateAndroid::GetIconId() const { 49 int ProtectedMediaIdentifierInfoBarDelegateAndroid::GetIconId() const {
45 return IDR_ANDROID_INFOBAR_PROTECTED_MEDIA_IDENTIFIER; 50 return IDR_ANDROID_INFOBAR_PROTECTED_MEDIA_IDENTIFIER;
46 } 51 }
47 52
48 base::string16 ProtectedMediaIdentifierInfoBarDelegateAndroid::GetMessageText() 53 base::string16 ProtectedMediaIdentifierInfoBarDelegateAndroid::GetMessageText()
49 const { 54 const {
50 return l10n_util::GetStringFUTF16( 55 return l10n_util::GetStringFUTF16(
51 IDS_PROTECTED_MEDIA_IDENTIFIER_INFOBAR_QUESTION, 56 IDS_PROTECTED_MEDIA_IDENTIFIER_INFOBAR_QUESTION,
52 url_formatter::FormatUrlForSecurityDisplay(requesting_frame_, 57 url_formatter::FormatUrlForSecurityDisplay(requesting_frame_,
53 display_languages_)); 58 display_languages_));
54 } 59 }
55 60
56 base::string16 ProtectedMediaIdentifierInfoBarDelegateAndroid::GetLinkText() 61 base::string16 ProtectedMediaIdentifierInfoBarDelegateAndroid::GetLinkText()
57 const { 62 const {
58 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 63 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
59 } 64 }
60 65
61 GURL ProtectedMediaIdentifierInfoBarDelegateAndroid::GetLinkURL() const { 66 GURL ProtectedMediaIdentifierInfoBarDelegateAndroid::GetLinkURL() const {
62 return GURL(chrome::kEnhancedPlaybackNotificationLearnMoreURL); 67 return GURL(chrome::kEnhancedPlaybackNotificationLearnMoreURL);
63 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698