| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/android/cast_window_manager.h" | 5 #include "chromecast/browser/android/cast_window_manager.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.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" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/prefs/pref_service.h" | |
| 15 #include "chromecast/base/pref_names.h" | 14 #include "chromecast/base/pref_names.h" |
| 16 #include "chromecast/browser/android/cast_window_android.h" | 15 #include "chromecast/browser/android/cast_window_android.h" |
| 17 #include "chromecast/browser/cast_browser_context.h" | 16 #include "chromecast/browser/cast_browser_context.h" |
| 18 #include "chromecast/browser/cast_browser_main_parts.h" | 17 #include "chromecast/browser/cast_browser_main_parts.h" |
| 19 #include "chromecast/browser/cast_browser_process.h" | 18 #include "chromecast/browser/cast_browser_process.h" |
| 20 #include "chromecast/browser/cast_content_browser_client.h" | 19 #include "chromecast/browser/cast_content_browser_client.h" |
| 20 #include "components/prefs/pref_service.h" |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 23 #include "ipc/ipc_channel.h" | 23 #include "ipc/ipc_channel.h" |
| 24 #include "jni/CastWindowManager_jni.h" | 24 #include "jni/CastWindowManager_jni.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 base::LazyInstance<base::android::ScopedJavaGlobalRef<jobject> > | 29 base::LazyInstance<base::android::ScopedJavaGlobalRef<jobject> > |
| 30 g_window_manager = LAZY_INSTANCE_INITIALIZER; | 30 g_window_manager = LAZY_INSTANCE_INITIALIZER; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void EnableDevTools(JNIEnv* env, | 84 void EnableDevTools(JNIEnv* env, |
| 85 const JavaParamRef<jclass>& clazz, | 85 const JavaParamRef<jclass>& clazz, |
| 86 jboolean enable) { | 86 jboolean enable) { |
| 87 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 87 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 88 CastBrowserProcess::GetInstance()->pref_service()->SetBoolean( | 88 CastBrowserProcess::GetInstance()->pref_service()->SetBoolean( |
| 89 prefs::kEnableRemoteDebugging, enable); | 89 prefs::kEnableRemoteDebugging, enable); |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace shell | 92 } // namespace shell |
| 93 } // namespace chromecast | 93 } // namespace chromecast |
| OLD | NEW |