OLD | NEW |
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/media/media_stream_infobar_delegate_android.h" | 5 #include "chrome/browser/media/media_stream_infobar_delegate_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "chrome/browser/infobars/infobar_service.h" | 13 #include "chrome/browser/infobars/infobar_service.h" |
14 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
15 #include "chrome/grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
| 16 #include "chrome/grit/theme_resources.h" |
16 #include "components/content_settings/core/common/content_settings_types.h" | 17 #include "components/content_settings/core/common/content_settings_types.h" |
17 #include "components/google/core/browser/google_util.h" | 18 #include "components/google/core/browser/google_util.h" |
18 #include "components/infobars/core/infobar.h" | 19 #include "components/infobars/core/infobar.h" |
| 20 #include "components/strings/grit/components_strings.h" |
19 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
20 #include "content/public/common/origin_util.h" | 22 #include "content/public/common/origin_util.h" |
21 #include "grit/components_strings.h" | |
22 #include "grit/theme_resources.h" | |
23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const int kGroupedInfobarAudioPosition = 0; | 28 const int kGroupedInfobarAudioPosition = 0; |
29 const int kGroupedInfobarVideoPosition = 1; | 29 const int kGroupedInfobarVideoPosition = 1; |
30 | 30 |
31 // Get a list of content types being requested. Note that the order of the | 31 // Get a list of content types being requested. Note that the order of the |
32 // resulting array corresponds to the kGroupedInfobarAudio/VideoPermission | 32 // resulting array corresponds to the kGroupedInfobarAudio/VideoPermission |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 DCHECK_EQ(1, GetPermissionCount()); | 108 DCHECK_EQ(1, GetPermissionCount()); |
109 controller_->PermissionGranted(); | 109 controller_->PermissionGranted(); |
110 } | 110 } |
111 return true; | 111 return true; |
112 } | 112 } |
113 | 113 |
114 bool MediaStreamInfoBarDelegateAndroid::Cancel() { | 114 bool MediaStreamInfoBarDelegateAndroid::Cancel() { |
115 controller_->PermissionDenied(); | 115 controller_->PermissionDenied(); |
116 return true; | 116 return true; |
117 } | 117 } |
OLD | NEW |