diff options
author | gunsch <gunsch@chromium.org> | 2014-09-11 15:03:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-11 22:25:48 +0000 |
commit | 407189f61ab162096ea98c40b2ecd85875bd6049 (patch) | |
tree | 30b112aec44856c8f10e6e52a820cf55dcb2affd /chromecast/common | |
parent | 149b92db00bc1deab22599e7d3da3fc8be2c0d8b (diff) | |
download | chromium_src-407189f61ab162096ea98c40b2ecd85875bd6049.zip chromium_src-407189f61ab162096ea98c40b2ecd85875bd6049.tar.gz chromium_src-407189f61ab162096ea98c40b2ecd85875bd6049.tar.bz2 |
Chromecast: initial checkin of Android-based cast shell.
R=byungchul@chromium.org,lcwu@chromium.org,yfriedman@chromium.org
BUG=400876
Review URL: https://codereview.chromium.org/490603002
Cr-Commit-Position: refs/heads/master@{#294476}
Diffstat (limited to 'chromecast/common')
-rw-r--r-- | chromecast/common/cast_paths.cc | 11 | ||||
-rw-r--r-- | chromecast/common/cast_paths.h | 5 | ||||
-rw-r--r-- | chromecast/common/global_descriptors.h | 21 |
3 files changed, 36 insertions, 1 deletions
diff --git a/chromecast/common/cast_paths.cc b/chromecast/common/cast_paths.cc index fb3cdf1..d5d471c 100644 --- a/chromecast/common/cast_paths.cc +++ b/chromecast/common/cast_paths.cc @@ -7,6 +7,7 @@ #include "base/base_paths.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/logging.h" #include "base/path_service.h" #include "build/build_config.h" @@ -27,10 +28,18 @@ bool PathProvider(int key, base::FilePath* result) { #endif return true; } +#if defined(OS_ANDROID) + case FILE_CAST_ANDROID_LOG: { + base::FilePath base_dir; + CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &base_dir)); + *result = base_dir.AppendASCII("cast_shell.log"); + return true; + } +#endif // defined(OS_ANDROID) case FILE_CAST_CONFIG: { base::FilePath data_dir; #if defined(OS_ANDROID) - CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &data_dir); + CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &data_dir)); *result = data_dir.Append("cast_shell.conf"); #else CHECK(PathService::Get(DIR_CAST_HOME, &data_dir)); diff --git a/chromecast/common/cast_paths.h b/chromecast/common/cast_paths.h index f228cd1..5ab156c2 100644 --- a/chromecast/common/cast_paths.h +++ b/chromecast/common/cast_paths.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_COMMON_CAST_PATHS_H_ #define CHROMECAST_COMMON_CAST_PATHS_H_ +#include "build/build_config.h" + // This file declares path keys for the chromecast module. These can be used // with the PathService to access various special directories and files. @@ -16,6 +18,9 @@ enum { DIR_CAST_HOME, // Return a modified $HOME which works for both // development use and the actual device. +#if defined(OS_ANDROID) + FILE_CAST_ANDROID_LOG, // Log file location for Android. +#endif // defined(OS_ANDROID) FILE_CAST_CONFIG, // Config/preferences file path. FILE_CAST_PAK, // cast_shell.pak file path. PATH_END diff --git a/chromecast/common/global_descriptors.h b/chromecast/common/global_descriptors.h new file mode 100644 index 0000000..cbbbb2c --- /dev/null +++ b/chromecast/common/global_descriptors.h @@ -0,0 +1,21 @@ +// 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_GLOBAL_DESCRIPTORS_H_ +#define CHROMECAST_COMMON_GLOBAL_DESCRIPTORS_H_ + +#include "content/public/common/content_descriptors.h" + +// This is a list of global descriptor keys to be used with the +// base::GlobalDescriptors object (see base/posix/global_descriptors.h) +enum { + // TODO(gunsch): Remove once there's a real value here. Otherwise, non-Android + // build compile fails due to empty enum. + kDummyValue = kContentIPCDescriptorMax + 1, +#if defined(OS_ANDROID) + kAndroidPakDescriptor, +#endif // defined(OS_ANDROID) +}; + +#endif // CHROMECAST_COMMON_GLOBAL_DESCRIPTORS_H_ |