Skip to content

Commit

Permalink
[Chromecast] Lowers CastService out of chromecast/browser/.
Browse files Browse the repository at this point in the history
This creates a chromecast/service/ directory with no dependencies on content/.

R=slan@chromium.org,halliwell@chromium.org
BUG=internal b/23761158

Review URL: https://codereview.chromium.org/1319273003

Cr-Commit-Position: refs/heads/master@{#347739}
  • Loading branch information
gunsch authored and Commit bot committed Sep 8, 2015
1 parent 781629a commit 68c183a
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 18 deletions.
3 changes: 1 addition & 2 deletions chromecast/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ source_set("browser") {
"metrics/cast_stability_metrics_provider.h",
"pref_service_helper.cc",
"pref_service_helper.h",
"service/cast_service.cc",
"service/cast_service.h",
"service/cast_service_simple.cc",
"service/cast_service_simple.h",
"url_request_context_factory.cc",
Expand Down Expand Up @@ -76,6 +74,7 @@ source_set("browser") {
"//chromecast/graphics",
"//chromecast/media",
"//chromecast/net",
"//chromecast/service",
"//components/crash/app",
"//components/crash/browser",
"//components/devtools_http_handler:devtools_http_handler",
Expand Down
2 changes: 1 addition & 1 deletion chromecast/browser/android/cast_window_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class WebContents;
} // namespace content

namespace chromecast {
class CastContentWindow;
namespace shell {
class CastContentWindow;

class CastWindowAndroid : public content::WebContentsDelegate,
public content::WebContentsObserver {
Expand Down
2 changes: 1 addition & 1 deletion chromecast/browser/cast_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
#include "chromecast/browser/metrics/cast_metrics_prefs.h"
#include "chromecast/browser/metrics/cast_metrics_service_client.h"
#include "chromecast/browser/pref_service_helper.h"
#include "chromecast/browser/service/cast_service.h"
#include "chromecast/browser/url_request_context_factory.h"
#include "chromecast/common/platform_client_auth.h"
#include "chromecast/media/base/key_systems_common.h"
#include "chromecast/media/base/media_message_loop.h"
#include "chromecast/net/connectivity_checker.h"
#include "chromecast/public/cast_media_shlib.h"
#include "chromecast/public/cast_sys_info.h"
#include "chromecast/service/cast_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/common/content_switches.h"
Expand Down
2 changes: 1 addition & 1 deletion chromecast/browser/cast_browser_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
#include "chromecast/browser/devtools/remote_debugging_server.h"
#include "chromecast/browser/metrics/cast_metrics_service_client.h"
#include "chromecast/browser/service/cast_service.h"
#include "chromecast/net/connectivity_checker.h"
#include "chromecast/service/cast_service.h"

#if defined(OS_ANDROID)
#include "components/crash/browser/crash_dump_manager_android.h"
Expand Down
2 changes: 2 additions & 0 deletions chromecast/browser/cast_content_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif

namespace chromecast {
namespace shell {

#if defined(USE_AURA)
class CastFillLayout : public aura::LayoutManager {
Expand Down Expand Up @@ -133,4 +134,5 @@ void CastContentWindow::RenderViewCreated(
: SK_ColorBLACK);
}

} // namespace shell
} // namespace chromecast
2 changes: 2 additions & 0 deletions chromecast/browser/cast_content_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Size;
}

namespace chromecast {
namespace shell {

class CastContentWindow : public content::WebContentsObserver {
public:
Expand Down Expand Up @@ -58,6 +59,7 @@ class CastContentWindow : public content::WebContentsObserver {
DISALLOW_COPY_AND_ASSIGN(CastContentWindow);
};

} // namespace shell
} // namespace chromecast

#endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_
4 changes: 0 additions & 4 deletions chromecast/browser/service/DEPS

This file was deleted.

2 changes: 2 additions & 0 deletions chromecast/browser/service/cast_service_simple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "net/url_request/url_request_context_getter.h"

namespace chromecast {
namespace shell {

namespace {

Expand Down Expand Up @@ -68,4 +69,5 @@ void CastServiceSimple::StopInternal() {
window_.reset();
}

} // namespace shell
} // namespace chromecast
4 changes: 3 additions & 1 deletion chromecast/browser/service/cast_service_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
#define CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_

#include "base/memory/scoped_ptr.h"
#include "chromecast/browser/service/cast_service.h"
#include "chromecast/service/cast_service.h"
#include "url/gurl.h"

namespace content {
class WebContents;
}

namespace chromecast {
namespace shell {
class CastContentWindow;

class CastServiceSimple : public CastService {
Expand All @@ -37,6 +38,7 @@ class CastServiceSimple : public CastService {
DISALLOW_COPY_AND_ASSIGN(CastServiceSimple);
};

} // namespace shell
} // namespace chromecast

#endif // CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_
3 changes: 1 addition & 2 deletions chromecast/browser/test/chromecast_browser_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ class WebContents;
}

namespace chromecast {
class CastContentWindow;

namespace shell {
class CastContentWindow;

// This test allows for running an entire browser-process lifecycle per unit
// test, using Chromecast's cast_shell. This starts up the shell, runs a test
Expand Down
4 changes: 2 additions & 2 deletions chromecast/chromecast.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@
'browser/metrics/cast_stability_metrics_provider.h',
'browser/pref_service_helper.cc',
'browser/pref_service_helper.h',
'browser/service/cast_service.cc',
'browser/service/cast_service.h',
'browser/service/cast_service_simple.cc',
'browser/service/cast_service_simple.h',
'browser/url_request_context_factory.cc',
Expand All @@ -399,6 +397,8 @@
'renderer/key_systems_cast.h',
'renderer/media/capabilities_message_filter.cc',
'renderer/media/capabilities_message_filter.h',
'service/cast_service.cc',
'service/cast_service.h',
],
'conditions': [
['chromecast_branding!="public"', {
Expand Down
14 changes: 14 additions & 0 deletions chromecast/service/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2015 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.

source_set("service") {
sources = [
"cast_service.cc",
"cast_service.h",
]

deps = [
"//base",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 "chromecast/browser/service/cast_service.h"
#include "chromecast/service/cast_service.h"

#include "base/logging.h"
#include "base/run_loop.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_H_
#define CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_H_
#ifndef CHROMECAST_SERVICE_CAST_SERVICE_H_
#define CHROMECAST_SERVICE_CAST_SERVICE_H_

#include "base/callback.h"
#include "base/macros.h"
Expand Down Expand Up @@ -74,4 +74,4 @@ class CastService {

} // namespace chromecast

#endif // CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_H_
#endif // CHROMECAST_SERVICE_CAST_SERVICE_H_

0 comments on commit 68c183a

Please sign in to comment.