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

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

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('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 23 matching lines...) Expand all
34 #include "components/infobars/core/infobar.h" 34 #include "components/infobars/core/infobar.h"
35 #include "content/public/browser/navigation_entry.h" 35 #include "content/public/browser/navigation_entry.h"
36 #include "content/public/browser/notification_details.h" 36 #include "content/public/browser/notification_details.h"
37 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
38 #include "content/public/browser/notification_source.h" 38 #include "content/public/browser/notification_source.h"
39 #include "content/public/browser/render_process_host.h" 39 #include "content/public/browser/render_process_host.h"
40 #include "content/public/browser/render_view_host.h" 40 #include "content/public/browser/render_view_host.h"
41 #include "content/public/browser/web_contents.h" 41 #include "content/public/browser/web_contents.h"
42 #include "content/public/common/file_chooser_params.h" 42 #include "content/public/common/file_chooser_params.h"
43 #include "jni/TabWebContentsDelegateAndroid_jni.h" 43 #include "jni/TabWebContentsDelegateAndroid_jni.h"
44 #include "ppapi/features/features.h"
44 #include "third_party/WebKit/public/web/WebWindowFeatures.h" 45 #include "third_party/WebKit/public/web/WebWindowFeatures.h"
45 #include "ui/gfx/geometry/rect.h" 46 #include "ui/gfx/geometry/rect.h"
46 #include "ui/gfx/geometry/rect_f.h" 47 #include "ui/gfx/geometry/rect_f.h"
47 48
48 #if defined(ENABLE_PLUGINS) 49 #if BUILDFLAG(ENABLE_PLUGINS)
49 #include "chrome/browser/pepper_broker_infobar_delegate.h" 50 #include "chrome/browser/pepper_broker_infobar_delegate.h"
50 #endif 51 #endif
51 52
52 using base::android::AttachCurrentThread; 53 using base::android::AttachCurrentThread;
53 using base::android::JavaParamRef; 54 using base::android::JavaParamRef;
54 using base::android::ScopedJavaLocalRef; 55 using base::android::ScopedJavaLocalRef;
55 using content::BluetoothChooser; 56 using content::BluetoothChooser;
56 using content::FileChooserParams; 57 using content::FileChooserParams;
57 using content::WebContents; 58 using content::WebContents;
58 59
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 content::WebContents* web_contents, 280 content::WebContents* web_contents,
280 const base::Callback<void(bool)>& callback) { 281 const base::Callback<void(bool)>& callback) {
281 MediaThrottleInfoBarDelegate::Create(web_contents, callback); 282 MediaThrottleInfoBarDelegate::Create(web_contents, callback);
282 } 283 }
283 284
284 bool TabWebContentsDelegateAndroid::RequestPpapiBrokerPermission( 285 bool TabWebContentsDelegateAndroid::RequestPpapiBrokerPermission(
285 WebContents* web_contents, 286 WebContents* web_contents,
286 const GURL& url, 287 const GURL& url,
287 const base::FilePath& plugin_path, 288 const base::FilePath& plugin_path,
288 const base::Callback<void(bool)>& callback) { 289 const base::Callback<void(bool)>& callback) {
289 #if defined(ENABLE_PLUGINS) 290 #if BUILDFLAG(ENABLE_PLUGINS)
290 PepperBrokerInfoBarDelegate::Create( 291 PepperBrokerInfoBarDelegate::Create(
291 web_contents, url, plugin_path, callback); 292 web_contents, url, plugin_path, callback);
292 return true; 293 return true;
293 #else 294 #else
294 return false; 295 return false;
295 #endif 296 #endif
296 } 297 }
297 298
298 WebContents* TabWebContentsDelegateAndroid::OpenURLFromTab( 299 WebContents* TabWebContentsDelegateAndroid::OpenURLFromTab(
299 WebContents* source, 300 WebContents* source,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 void NotifyStopped(JNIEnv* env, 478 void NotifyStopped(JNIEnv* env,
478 const JavaParamRef<jclass>& clazz, 479 const JavaParamRef<jclass>& clazz,
479 const JavaParamRef<jobject>& java_web_contents) { 480 const JavaParamRef<jobject>& java_web_contents) {
480 content::WebContents* web_contents = 481 content::WebContents* web_contents =
481 content::WebContents::FromJavaWebContents(java_web_contents); 482 content::WebContents::FromJavaWebContents(java_web_contents);
482 scoped_refptr<MediaStreamCaptureIndicator> indicator = 483 scoped_refptr<MediaStreamCaptureIndicator> indicator =
483 MediaCaptureDevicesDispatcher::GetInstance() 484 MediaCaptureDevicesDispatcher::GetInstance()
484 ->GetMediaStreamCaptureIndicator(); 485 ->GetMediaStreamCaptureIndicator();
485 indicator->NotifyStopped(web_contents); 486 indicator->NotifyStopped(web_contents);
486 } 487 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698