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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/RemoteDebuggingController.java

Issue 10832112: Simplify devtools code on android and enable devtools for android content_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Pavel's comments Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/content_shell.gypi ('k') | content/public/browser/android/devtools_auth.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.content.browser;
6
7 import org.chromium.base.JNINamespace;
8
9 // Controls DevTools remote debugging server state.
10 @JNINamespace("content")
11 public class RemoteDebuggingController {
12
13 private static RemoteDebuggingController sInstance;
14
15 private boolean mUserPreferenceEnabled;
16
17 public static RemoteDebuggingController getInstance() {
18 if (sInstance == null) {
19 sInstance = new RemoteDebuggingController();
20 }
21 return sInstance;
22 }
23
24 public void updateUserPreferenceState(boolean enabled) {
25 if (mUserPreferenceEnabled != enabled) {
26 mUserPreferenceEnabled = enabled;
27 updateRemoteDebuggingState();
28 }
29 }
30
31 void updateRemoteDebuggingState() {
32 if (mUserPreferenceEnabled != nativeIsRemoteDebuggingEnabled()) {
33 if (mUserPreferenceEnabled) {
34 nativeStartRemoteDebugging();
35 } else {
36 nativeStopRemoteDebugging();
37 }
38 }
39 }
40
41 private RemoteDebuggingController() {
42 mUserPreferenceEnabled = nativeIsRemoteDebuggingEnabled();
43 }
44
45 private static native void nativeStartRemoteDebugging();
46 private static native void nativeStopRemoteDebugging();
47 private static native boolean nativeIsRemoteDebuggingEnabled();
48 }
OLDNEW
« no previous file with comments | « content/content_shell.gypi ('k') | content/public/browser/android/devtools_auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698