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

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

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase Created 3 years, 7 months 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
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/tab_web_contents_delegate_android.h" 5 #include "chrome/browser/android/tab_web_contents_delegate_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 WebContents* new_contents, 382 WebContents* new_contents,
383 WindowOpenDisposition disposition, 383 WindowOpenDisposition disposition,
384 const gfx::Rect& initial_rect, 384 const gfx::Rect& initial_rect,
385 bool user_gesture, 385 bool user_gesture,
386 bool* was_blocked) { 386 bool* was_blocked) {
387 // No code for this yet. 387 // No code for this yet.
388 DCHECK_NE(disposition, WindowOpenDisposition::SAVE_TO_DISK); 388 DCHECK_NE(disposition, WindowOpenDisposition::SAVE_TO_DISK);
389 // Can't create a new contents for the current tab - invalid case. 389 // Can't create a new contents for the current tab - invalid case.
390 DCHECK_NE(disposition, WindowOpenDisposition::CURRENT_TAB); 390 DCHECK_NE(disposition, WindowOpenDisposition::CURRENT_TAB);
391 391
392 TabHelpers::AttachTabHelpers(new_contents); 392 TabHelpers::AttachTabHelpers(new_contents, base::nullopt);
393 393
394 JNIEnv* env = AttachCurrentThread(); 394 JNIEnv* env = AttachCurrentThread();
395 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 395 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
396 bool handled = false; 396 bool handled = false;
397 if (!obj.is_null()) { 397 if (!obj.is_null()) {
398 ScopedJavaLocalRef<jobject> jsource; 398 ScopedJavaLocalRef<jobject> jsource;
399 if (source) 399 if (source)
400 jsource = source->GetJavaWebContents(); 400 jsource = source->GetJavaWebContents();
401 ScopedJavaLocalRef<jobject> jnew_contents; 401 ScopedJavaLocalRef<jobject> jnew_contents;
402 if (new_contents) 402 if (new_contents)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 void NotifyStopped(JNIEnv* env, 494 void NotifyStopped(JNIEnv* env,
495 const JavaParamRef<jclass>& clazz, 495 const JavaParamRef<jclass>& clazz,
496 const JavaParamRef<jobject>& java_web_contents) { 496 const JavaParamRef<jobject>& java_web_contents) {
497 content::WebContents* web_contents = 497 content::WebContents* web_contents =
498 content::WebContents::FromJavaWebContents(java_web_contents); 498 content::WebContents::FromJavaWebContents(java_web_contents);
499 scoped_refptr<MediaStreamCaptureIndicator> indicator = 499 scoped_refptr<MediaStreamCaptureIndicator> indicator =
500 MediaCaptureDevicesDispatcher::GetInstance() 500 MediaCaptureDevicesDispatcher::GetInstance()
501 ->GetMediaStreamCaptureIndicator(); 501 ->GetMediaStreamCaptureIndicator();
502 indicator->NotifyStopped(web_contents); 502 indicator->NotifyStopped(web_contents);
503 } 503 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698