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

Side by Side Diff: chromecast/browser/android/cast_window_manager.cc

Issue 793663007: Set RemoteDebuggingServer port based on "remote-debugging-port" flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698