OLD | NEW |
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_permission_context.h" | 5 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ProtectedMediaIdentifierPermissionContext:: | 50 ProtectedMediaIdentifierPermissionContext:: |
51 ~ProtectedMediaIdentifierPermissionContext() { | 51 ~ProtectedMediaIdentifierPermissionContext() { |
52 } | 52 } |
53 | 53 |
54 #if defined(OS_CHROMEOS) | 54 #if defined(OS_CHROMEOS) |
55 void ProtectedMediaIdentifierPermissionContext::DecidePermission( | 55 void ProtectedMediaIdentifierPermissionContext::DecidePermission( |
56 content::WebContents* web_contents, | 56 content::WebContents* web_contents, |
57 const PermissionRequestID& id, | 57 const PermissionRequestID& id, |
58 const GURL& requesting_origin, | 58 const GURL& requesting_origin, |
59 const GURL& embedding_origin, | 59 const GURL& embedding_origin, |
| 60 bool user_gesture, |
60 const BrowserPermissionCallback& callback) { | 61 const BrowserPermissionCallback& callback) { |
61 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 62 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
62 | 63 |
63 // Since the dialog is modal, we only support one prompt per |web_contents|. | 64 // Since the dialog is modal, we only support one prompt per |web_contents|. |
64 // Reject the new one if there is already one pending. See | 65 // Reject the new one if there is already one pending. See |
65 // http://crbug.com/447005 | 66 // http://crbug.com/447005 |
66 if (pending_requests_.count(web_contents)) { | 67 if (pending_requests_.count(web_contents)) { |
67 callback.Run(CONTENT_SETTING_ASK); | 68 callback.Run(CONTENT_SETTING_ASK); |
68 return; | 69 return; |
69 } | 70 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 content_setting = CONTENT_SETTING_BLOCK; | 223 content_setting = CONTENT_SETTING_BLOCK; |
223 persist = true; | 224 persist = true; |
224 break; | 225 break; |
225 } | 226 } |
226 | 227 |
227 NotifyPermissionSet( | 228 NotifyPermissionSet( |
228 id, requesting_origin, embedding_origin, callback, | 229 id, requesting_origin, embedding_origin, callback, |
229 persist, content_setting); | 230 persist, content_setting); |
230 } | 231 } |
231 #endif | 232 #endif |
OLD | NEW |