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

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

Issue 2693573002: Remove unused WebWindowFeatures from popup blocker, reducing WebString use in browser (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | chrome/browser/ui/blocked_content/popup_blocker_tab_helper.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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 PopupBlockerTabHelper::FromWebContents(source); 323 PopupBlockerTabHelper::FromWebContents(source);
324 DCHECK(popup_blocker_helper); 324 DCHECK(popup_blocker_helper);
325 325
326 if ((params.disposition == WindowOpenDisposition::NEW_POPUP || 326 if ((params.disposition == WindowOpenDisposition::NEW_POPUP ||
327 params.disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB || 327 params.disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB ||
328 params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB || 328 params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB ||
329 params.disposition == WindowOpenDisposition::NEW_WINDOW) && 329 params.disposition == WindowOpenDisposition::NEW_WINDOW) &&
330 !params.user_gesture && 330 !params.user_gesture &&
331 !base::CommandLine::ForCurrentProcess()->HasSwitch( 331 !base::CommandLine::ForCurrentProcess()->HasSwitch(
332 switches::kDisablePopupBlocking)) { 332 switches::kDisablePopupBlocking)) {
333 if (popup_blocker_helper->MaybeBlockPopup(nav_params, 333 if (popup_blocker_helper->MaybeBlockPopup(nav_params)) {
334 blink::WebWindowFeatures())) {
335 return nullptr; 334 return nullptr;
336 } 335 }
337 } 336 }
338 337
339 if (disposition == WindowOpenDisposition::CURRENT_TAB) { 338 if (disposition == WindowOpenDisposition::CURRENT_TAB) {
340 // Only prerender for a current-tab navigation to avoid session storage 339 // Only prerender for a current-tab navigation to avoid session storage
341 // namespace issues. 340 // namespace issues.
342 nav_params.target_contents = source; 341 nav_params.target_contents = source;
343 prerender::PrerenderManager* prerender_manager = 342 prerender::PrerenderManager* prerender_manager =
344 prerender::PrerenderManagerFactory::GetForBrowserContext(profile); 343 prerender::PrerenderManagerFactory::GetForBrowserContext(profile);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void NotifyStopped(JNIEnv* env, 477 void NotifyStopped(JNIEnv* env,
479 const JavaParamRef<jclass>& clazz, 478 const JavaParamRef<jclass>& clazz,
480 const JavaParamRef<jobject>& java_web_contents) { 479 const JavaParamRef<jobject>& java_web_contents) {
481 content::WebContents* web_contents = 480 content::WebContents* web_contents =
482 content::WebContents::FromJavaWebContents(java_web_contents); 481 content::WebContents::FromJavaWebContents(java_web_contents);
483 scoped_refptr<MediaStreamCaptureIndicator> indicator = 482 scoped_refptr<MediaStreamCaptureIndicator> indicator =
484 MediaCaptureDevicesDispatcher::GetInstance() 483 MediaCaptureDevicesDispatcher::GetInstance()
485 ->GetMediaStreamCaptureIndicator(); 484 ->GetMediaStreamCaptureIndicator();
486 indicator->NotifyStopped(web_contents); 485 indicator->NotifyStopped(web_contents);
487 } 486 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698