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/android/chrome_web_contents_delegate_android.h" | 5 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "chrome/browser/android/tab_android.h" | 9 #include "chrome/browser/android/tab_android.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 reinterpret_cast<intptr_t>(new_contents), | 318 reinterpret_cast<intptr_t>(new_contents), |
319 static_cast<jint>(disposition), | 319 static_cast<jint>(disposition), |
320 NULL, | 320 NULL, |
321 user_gesture); | 321 user_gesture); |
322 } | 322 } |
323 | 323 |
324 if (!handled) | 324 if (!handled) |
325 delete new_contents; | 325 delete new_contents; |
326 } | 326 } |
327 | 327 |
328 void | |
329 ChromeWebContentsDelegateAndroid::RequestProtectedMediaIdentifierPermission( | |
330 const WebContents* web_contents, | |
331 const GURL& frame_url, | |
332 const base::Callback<void(bool)>& callback) { | |
333 Profile* profile = | |
334 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | |
335 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile)-> | |
336 RequestProtectedMediaIdentifierPermission( | |
337 web_contents->GetRenderProcessHost()->GetID(), | |
338 web_contents->GetRenderViewHost()->GetRoutingID(), | |
339 frame_url, | |
340 callback); | |
341 } | |
342 | |
343 } // namespace android | 328 } // namespace android |
344 } // namespace chrome | 329 } // namespace chrome |
OLD | NEW |