| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 DCHECK(popup_blocker_helper); | 257 DCHECK(popup_blocker_helper); |
| 258 | 258 |
| 259 if ((params.disposition == NEW_POPUP || | 259 if ((params.disposition == NEW_POPUP || |
| 260 params.disposition == NEW_FOREGROUND_TAB || | 260 params.disposition == NEW_FOREGROUND_TAB || |
| 261 params.disposition == NEW_BACKGROUND_TAB || | 261 params.disposition == NEW_BACKGROUND_TAB || |
| 262 params.disposition == NEW_WINDOW) && | 262 params.disposition == NEW_WINDOW) && |
| 263 !params.user_gesture && | 263 !params.user_gesture && |
| 264 !CommandLine::ForCurrentProcess()->HasSwitch( | 264 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 265 switches::kDisablePopupBlocking)) { | 265 switches::kDisablePopupBlocking)) { |
| 266 if (popup_blocker_helper->MaybeBlockPopup(nav_params, | 266 if (popup_blocker_helper->MaybeBlockPopup(nav_params, |
| 267 WebKit::WebWindowFeatures())) { | 267 blink::WebWindowFeatures())) { |
| 268 return NULL; | 268 return NULL; |
| 269 } | 269 } |
| 270 } | 270 } |
| 271 | 271 |
| 272 return WebContentsDelegateAndroid::OpenURLFromTab(source, params); | 272 return WebContentsDelegateAndroid::OpenURLFromTab(source, params); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void ChromeWebContentsDelegateAndroid::AddNewContents( | 275 void ChromeWebContentsDelegateAndroid::AddNewContents( |
| 276 WebContents* source, | 276 WebContents* source, |
| 277 WebContents* new_contents, | 277 WebContents* new_contents, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile)-> | 314 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile)-> |
| 315 RequestProtectedMediaIdentifierPermission( | 315 RequestProtectedMediaIdentifierPermission( |
| 316 web_contents->GetRenderProcessHost()->GetID(), | 316 web_contents->GetRenderProcessHost()->GetID(), |
| 317 web_contents->GetRenderViewHost()->GetRoutingID(), | 317 web_contents->GetRenderViewHost()->GetRoutingID(), |
| 318 frame_url, | 318 frame_url, |
| 319 callback); | 319 callback); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace android | 322 } // namespace android |
| 323 } // namespace chrome | 323 } // namespace chrome |
| OLD | NEW |