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

Side by Side Diff: chrome/browser/android/chrome_web_contents_delegate_android.cc

Issue 67573003: Android: moves chrome/ to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 TabAndroid::InitTabHelpers(new_contents); 301 TabAndroid::InitTabHelpers(new_contents);
302 302
303 JNIEnv* env = AttachCurrentThread(); 303 JNIEnv* env = AttachCurrentThread();
304 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 304 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
305 bool handled = false; 305 bool handled = false;
306 if (!obj.is_null()) { 306 if (!obj.is_null()) {
307 handled = Java_ChromeWebContentsDelegateAndroid_addNewContents( 307 handled = Java_ChromeWebContentsDelegateAndroid_addNewContents(
308 env, 308 env,
309 obj.obj(), 309 obj.obj(),
310 reinterpret_cast<jint>(source), 310 reinterpret_cast<intptr_t>(source),
311 reinterpret_cast<jint>(new_contents), 311 reinterpret_cast<intptr_t>(new_contents),
312 static_cast<jint>(disposition), 312 static_cast<jint>(disposition),
313 NULL, 313 NULL,
314 user_gesture); 314 user_gesture);
315 } 315 }
316 316
317 if (!handled) 317 if (!handled)
318 delete new_contents; 318 delete new_contents;
319 } 319 }
320 320
321 void 321 void
322 ChromeWebContentsDelegateAndroid::RequestProtectedMediaIdentifierPermission( 322 ChromeWebContentsDelegateAndroid::RequestProtectedMediaIdentifierPermission(
323 const WebContents* web_contents, 323 const WebContents* web_contents,
324 const GURL& frame_url, 324 const GURL& frame_url,
325 const base::Callback<void(bool)>& callback) { 325 const base::Callback<void(bool)>& callback) {
326 Profile* profile = 326 Profile* profile =
327 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 327 Profile::FromBrowserContext(web_contents->GetBrowserContext());
328 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile)-> 328 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile)->
329 RequestProtectedMediaIdentifierPermission( 329 RequestProtectedMediaIdentifierPermission(
330 web_contents->GetRenderProcessHost()->GetID(), 330 web_contents->GetRenderProcessHost()->GetID(),
331 web_contents->GetRenderViewHost()->GetRoutingID(), 331 web_contents->GetRenderViewHost()->GetRoutingID(),
332 frame_url, 332 frame_url,
333 callback); 333 callback);
334 } 334 }
335 335
336 } // namespace android 336 } // namespace android
337 } // namespace chrome 337 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/bookmarks/bookmarks_bridge.cc ('k') | chrome/browser/android/content_view_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698