Commit 3f0f0534 authored by nyquist's avatar nyquist Committed by Commit bot

Move blimp switches to core

Currently the command line switches for blimp are in the app directory,
but the code that will be using it will need to live in
//blimp/client/core. This means that the switches should be made
available to that code.

It is not moved to the public directory because for now it should not
be necessary for embedders to use them, and we should aim for the
configurations there to be made available as real runtime APIs instead.

BUG=611097

Review-Url: https://codereview.chromium.org/2154363002
Cr-Commit-Position: refs/heads/master@{#406100}
parent e91be6b0
......@@ -19,7 +19,7 @@ source_set("session") {
public_deps = [
":feature",
":switches",
"//blimp/client/core:switches",
"//components/safe_json",
"//ui/events",
]
......@@ -46,7 +46,7 @@ source_set("client") {
public_deps = [
":session",
":switches",
"//blimp/client/core:switches",
"//components/safe_json",
"//components/url_formatter",
"//skia",
......@@ -72,13 +72,6 @@ source_set("client") {
]
}
source_set("switches") {
sources = [
"app/blimp_client_switches.cc",
"app/blimp_client_switches.h",
]
}
source_set("blimp_client_unit_tests") {
testonly = true
......@@ -87,9 +80,9 @@ source_set("blimp_client_unit_tests") {
deps = [
":client",
":session",
":switches",
"//base",
"//base/test:test_support",
"//blimp/client/core:switches",
"//blimp/common",
"//testing/gmock",
"//testing/gtest",
......@@ -433,7 +426,6 @@ if (is_android) {
"app/android/java/src/org/chromium/blimp/auth/TokenSource.java",
"app/android/java/src/org/chromium/blimp/auth/TokenSourceImpl.java",
"app/android/java/src/org/chromium/blimp/BlimpApplication.java",
"app/android/java/src/org/chromium/blimp/BlimpClientSwitches.java",
"app/android/java/src/org/chromium/blimp/BlimpLibraryLoader.java",
"app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java",
"app/android/java/src/org/chromium/blimp/BlimpView.java",
......
......@@ -19,6 +19,7 @@ import org.chromium.base.library_loader.ProcessInitException;
import org.chromium.blimp.auth.RetryingTokenSource;
import org.chromium.blimp.auth.TokenSource;
import org.chromium.blimp.auth.TokenSourceImpl;
import org.chromium.blimp.core.BlimpClientSwitches;
import org.chromium.blimp.input.WebInputBox;
import org.chromium.blimp.preferences.PreferencesUtil;
import org.chromium.blimp.session.BlimpClientSession;
......
......@@ -112,6 +112,18 @@ source_set("unit_tests") {
]
}
source_set("switches") {
visibility = [
"//blimp/client/*",
"//blimp/engine:browser_tests",
]
sources = [
"blimp_client_switches.cc",
"blimp_client_switches.h",
]
}
if (is_android) {
# This target is here to let //chrome depend on
# //blimp/client/public:public_java and automatically get the correct
......@@ -136,6 +148,7 @@ if (is_android) {
java_files = [
"android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java",
"android/java/src/org/chromium/blimp/core/BlimpClientSwitches.java",
"android/java/src/org/chromium/blimp/core/BlimpContentsFactory.java",
"android/java/src/org/chromium/blimp/core/BlimpContentsImpl.java",
"android/java/src/org/chromium/blimp/core/BlimpContentsObserverProxy.java",
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.blimp;
package org.chromium.blimp.core;
/**
* Contains all of the command line switches that are specific to the blimp/
......@@ -13,7 +13,7 @@ public final class BlimpClientSwitches {
// Specifies the engine's IP address. Must be used in conjunction with
// --engine-port and --engine-transport.
// This is the same command line flag as kEngineIP in
// blimp/client/app/blimp_client_switches.cc
// blimp/client/core/blimp_client_switches.cc
public static final String ENGINE_IP = "engine-ip";
// Prevent instantiation.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "blimp/client/app/blimp_client_switches.h"
#include "blimp/client/core/blimp_client_switches.h"
namespace blimp {
namespace switches {
......@@ -12,7 +12,7 @@ const char kEngineCertPath[] = "engine-cert-path";
// Specifies the engine's IP address. Must be used in conjunction with
// --engine-port and --engine-transport.
// This is the same command line flag as ENGINE_IP in
// blimp/client/app/android/java/src/org/chromium/blimp/BlimpClientSwitches.java
// android/java/src/org/chromium/blimp/core/BlimpClientSwitches.java
const char kEngineIP[] = "engine-ip";
const char kEnginePort[] = "engine-port";
......
......@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Defines all the command-line switches used by //blimp.
// Defines all the command-line switches used by //blimp/client/core.
#ifndef BLIMP_CLIENT_APP_BLIMP_CLIENT_SWITCHES_H_
#define BLIMP_CLIENT_APP_BLIMP_CLIENT_SWITCHES_H_
#ifndef BLIMP_CLIENT_CORE_BLIMP_CLIENT_SWITCHES_H_
#define BLIMP_CLIENT_CORE_BLIMP_CLIENT_SWITCHES_H_
namespace blimp {
namespace switches {
......@@ -36,4 +36,4 @@ extern const char kDownloadWholeDocument[];
} // namespace switches
} // namespace blimp
#endif // BLIMP_CLIENT_APP_BLIMP_CLIENT_SWITCHES_H_
#endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_SWITCHES_H_
......@@ -17,7 +17,7 @@
#include "base/task_runner_util.h"
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "blimp/client/app/blimp_client_switches.h"
#include "blimp/client/core/blimp_client_switches.h"
#include "blimp/common/get_client_token.h"
#include "blimp/common/protocol_version.h"
#include "components/safe_json/safe_json_parser.h"
......
......@@ -16,7 +16,7 @@
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
#include "blimp/client/app/blimp_client_switches.h"
#include "blimp/client/core/blimp_client_switches.h"
#include "blimp/common/get_client_token.h"
#include "blimp/common/protocol_version.h"
#include "blimp/common/switches.h"
......
......@@ -13,7 +13,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "blimp/client/app/blimp_client_switches.h"
#include "blimp/client/core/blimp_client_switches.h"
#include "blimp/client/feature/ime_feature.h"
#include "blimp/client/feature/navigation_feature.h"
#include "blimp/client/feature/render_widget_feature.h"
......
......@@ -666,8 +666,8 @@ source_set("browser_tests") {
"//base",
"//blimp/client:feature",
"//blimp/client:session",
"//blimp/client:switches",
"//blimp/client:test_support",
"//blimp/client/core:switches",
"//blimp/common",
"//blimp/engine:app",
"//blimp/engine:app_config",
......
include_rules = [
"+base",
"-blimp/client",
"+cc",
"-chrome",
"+components/crash",
......
include_rules = [
"+blimp/client",
]
......@@ -13,7 +13,7 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "blimp/client/app/blimp_client_switches.h"
#include "blimp/client/core/blimp_client_switches.h"
#include "blimp/client/session/assignment_source.h"
#include "blimp/common/switches.h"
#include "blimp/engine/app/blimp_browser_main_parts.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment