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

Side by Side Diff: chrome/browser/media/midi_permission_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: 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 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/midi_permission_infobar_delegate_android.h" 5 #include "chrome/browser/media/midi_permission_infobar_delegate_android.h"
6 6
7 #include "chrome/browser/infobars/infobar_service.h" 7 #include "chrome/browser/infobars/infobar_service.h"
8 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.h"
9 #include "components/infobars/core/infobar.h" 9 #include "components/infobars/core/infobar.h"
10 #include "components/url_formatter/elide_url.h" 10 #include "components/url_formatter/elide_url.h"
(...skipping 18 matching lines...) Expand all
29 const PermissionSetCallback& callback) 29 const PermissionSetCallback& callback)
30 : PermissionInfobarDelegate(requesting_frame, 30 : PermissionInfobarDelegate(requesting_frame,
31 content::PermissionType::MIDI_SYSEX, 31 content::PermissionType::MIDI_SYSEX,
32 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 32 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
33 callback), 33 callback),
34 requesting_frame_(requesting_frame), 34 requesting_frame_(requesting_frame),
35 display_languages_(display_languages) {} 35 display_languages_(display_languages) {}
36 36
37 MidiPermissionInfoBarDelegateAndroid::~MidiPermissionInfoBarDelegateAndroid() {} 37 MidiPermissionInfoBarDelegateAndroid::~MidiPermissionInfoBarDelegateAndroid() {}
38 38
39 std::string MidiPermissionInfoBarDelegateAndroid::GetIdentifier() const {
40 return "MidiPermissionInfoBarDelegateAndroid";
41 }
42
39 int MidiPermissionInfoBarDelegateAndroid::GetIconId() const { 43 int MidiPermissionInfoBarDelegateAndroid::GetIconId() const {
40 return IDR_INFOBAR_MIDI; 44 return IDR_INFOBAR_MIDI;
41 } 45 }
42 46
43 base::string16 MidiPermissionInfoBarDelegateAndroid::GetMessageText() const { 47 base::string16 MidiPermissionInfoBarDelegateAndroid::GetMessageText() const {
44 return l10n_util::GetStringFUTF16( 48 return l10n_util::GetStringFUTF16(
45 IDS_MIDI_SYSEX_INFOBAR_QUESTION, 49 IDS_MIDI_SYSEX_INFOBAR_QUESTION,
46 url_formatter::FormatUrlForSecurityDisplay(requesting_frame_.GetOrigin(), 50 url_formatter::FormatUrlForSecurityDisplay(requesting_frame_.GetOrigin(),
47 display_languages_)); 51 display_languages_));
48 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698