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" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 reinterpret_cast<CastWindowAndroid*>(nativeCastWindow); | 71 reinterpret_cast<CastWindowAndroid*>(nativeCastWindow); |
72 DCHECK(window); | 72 DCHECK(window); |
73 if (gracefully) | 73 if (gracefully) |
74 window->Close(); | 74 window->Close(); |
75 else | 75 else |
76 window->Destroy(); | 76 window->Destroy(); |
77 } | 77 } |
78 | 78 |
79 void EnableDevTools(JNIEnv* env, jclass clazz, jboolean enable) { | 79 void EnableDevTools(JNIEnv* env, jclass clazz, jboolean enable) { |
80 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 80 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
81 // The specific port value doesn't matter since Android uses Unix domain | |
82 // sockets, only whether or not it is zero. | |
83 CastBrowserProcess::GetInstance()->pref_service()-> | 81 CastBrowserProcess::GetInstance()->pref_service()-> |
84 SetInteger(prefs::kRemoteDebuggingPort, enable ? 1 : 0); | 82 SetBoolean(prefs::kEnableRemoteDebugging, enable); |
85 } | 83 } |
86 | 84 |
87 } // namespace shell | 85 } // namespace shell |
88 } // namespace chromecast | 86 } // namespace chromecast |
OLD | NEW |