diff options
author | gunsch@chromium.org <gunsch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-15 05:49:27 +0000 |
---|---|---|
committer | gunsch@chromium.org <gunsch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-15 05:50:38 +0000 |
commit | dba26a7c39247f4744151434fc985e3d73885326 (patch) | |
tree | 39797126b6db33d2baa7b00b10ede339bb1049a2 /chromecast/common | |
parent | ae58dcec09dbc814f48f65b40b64a2d68edce764 (diff) | |
download | chromium_src-dba26a7c39247f4744151434fc985e3d73885326.zip chromium_src-dba26a7c39247f4744151434fc985e3d73885326.tar.gz chromium_src-dba26a7c39247f4744151434fc985e3d73885326.tar.bz2 |
Adds remote devtools support to cast_shell.
This is based largely on ShellDevtoolsDelegate, but is enabled/disabled
conditionally based on a preference value that can be controlled by the
cast receiver.
R=damienv@chromium.org,lcwu@chromium.org,byungchul@chromium.org
BUG=400919
Review URL: https://codereview.chromium.org/454063004
Cr-Commit-Position: refs/heads/master@{#289812}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289812 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromecast/common')
-rw-r--r-- | chromecast/common/chromecast_config.cc | 2 | ||||
-rw-r--r-- | chromecast/common/pref_names.cc | 13 | ||||
-rw-r--r-- | chromecast/common/pref_names.h | 14 |
3 files changed, 29 insertions, 0 deletions
diff --git a/chromecast/common/chromecast_config.cc b/chromecast/common/chromecast_config.cc index f016a68..dfb3866 100644 --- a/chromecast/common/chromecast_config.cc +++ b/chromecast/common/chromecast_config.cc @@ -16,6 +16,7 @@ #include "base/prefs/pref_store.h" #include "base/strings/string_number_conversions.h" #include "chromecast/common/cast_paths.h" +#include "chromecast/common/pref_names.h" namespace chromecast { @@ -71,6 +72,7 @@ ChromecastConfig::~ChromecastConfig() { bool ChromecastConfig::Load(PrefRegistrySimple* registry) { DCHECK(thread_checker_.CalledOnValidThread()); VLOG(1) << "Loading config from " << config_path_.value(); + registry->RegisterIntegerPref(prefs::kRemoteDebuggingPort, 0); RegisterPlatformPrefs(registry); diff --git a/chromecast/common/pref_names.cc b/chromecast/common/pref_names.cc new file mode 100644 index 0000000..0fed7c8 --- /dev/null +++ b/chromecast/common/pref_names.cc @@ -0,0 +1,13 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chromecast/common/pref_names.h" + +namespace prefs { + +// Port on which to host the remote debugging server. A value of 0 indicates +// that remote debugging is disabled. +const char kRemoteDebuggingPort[] = "remote_debugging_port"; + +} // namespace prefs diff --git a/chromecast/common/pref_names.h b/chromecast/common/pref_names.h new file mode 100644 index 0000000..669f19d --- /dev/null +++ b/chromecast/common/pref_names.h @@ -0,0 +1,14 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROMECAST_COMMON_PREF_NAMES_H_ +#define CHROMECAST_COMMON_PREF_NAMES_H_ + +namespace prefs { + +extern const char kRemoteDebuggingPort[]; + +} // namespace prefs + +#endif // CHROMECAST_COMMON_PREF_NAMES_H_ |