diff options
author | kmackay <kmackay@chromium.org> | 2016-03-07 10:32:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-07 18:34:14 +0000 |
commit | 0bd0dc5e008601776cf212e69792acca400e95c1 (patch) | |
tree | 24d2cb517f965d9c1cfacf1c6b8b73e8195ebf91 /chromecast | |
parent | b8922b4284b443d82da4a36d7b6e73b40250a625 (diff) | |
download | chromium_src-0bd0dc5e008601776cf212e69792acca400e95c1.zip chromium_src-0bd0dc5e008601776cf212e69792acca400e95c1.tar.gz chromium_src-0bd0dc5e008601776cf212e69792acca400e95c1.tar.bz2 |
[Chromecast] Stubs for creating a Cast utility process
BUG= internal b/27383427
Review URL: https://codereview.chromium.org/1734343005
Cr-Commit-Position: refs/heads/master@{#379591}
Diffstat (limited to 'chromecast')
-rw-r--r-- | chromecast/app/BUILD.gn | 1 | ||||
-rw-r--r-- | chromecast/app/cast_main_delegate.cc | 6 | ||||
-rw-r--r-- | chromecast/app/cast_main_delegate.h | 3 | ||||
-rw-r--r-- | chromecast/chromecast.gyp | 2 | ||||
-rw-r--r-- | chromecast/utility/BUILD.gn | 20 | ||||
-rw-r--r-- | chromecast/utility/DEPS | 4 | ||||
-rw-r--r-- | chromecast/utility/cast_content_utility_client.h | 28 | ||||
-rw-r--r-- | chromecast/utility/cast_content_utility_client_simple.cc | 16 |
8 files changed, 80 insertions, 0 deletions
diff --git a/chromecast/app/BUILD.gn b/chromecast/app/BUILD.gn index 4d5b8b3..77cd668 100644 --- a/chromecast/app/BUILD.gn +++ b/chromecast/app/BUILD.gn @@ -18,6 +18,7 @@ source_set("app") { "//chromecast/browser", "//chromecast/common", "//chromecast/renderer", + "//chromecast/utility", "//components/crash/content/app:lib", "//content/public/app:both", "//content/public/browser", diff --git a/chromecast/app/cast_main_delegate.cc b/chromecast/app/cast_main_delegate.cc index b2f9884..7460175 100644 --- a/chromecast/app/cast_main_delegate.cc +++ b/chromecast/app/cast_main_delegate.cc @@ -23,6 +23,7 @@ #include "chromecast/common/cast_resource_delegate.h" #include "chromecast/common/global_descriptors.h" #include "chromecast/renderer/cast_content_renderer_client.h" +#include "chromecast/utility/cast_content_utility_client.h" #include "components/crash/content/app/crash_reporter_client.h" #include "content/public/browser/browser_main_runner.h" #include "content/public/common/content_switches.h" @@ -234,5 +235,10 @@ CastMainDelegate::CreateContentRendererClient() { return renderer_client_.get(); } +content::ContentUtilityClient* CastMainDelegate::CreateContentUtilityClient() { + utility_client_ = CastContentUtilityClient::Create(); + return utility_client_.get(); +} + } // namespace shell } // namespace chromecast diff --git a/chromecast/app/cast_main_delegate.h b/chromecast/app/cast_main_delegate.h index 010f28f..19cdfa3 100644 --- a/chromecast/app/cast_main_delegate.h +++ b/chromecast/app/cast_main_delegate.h @@ -23,6 +23,7 @@ namespace shell { class CastContentBrowserClient; class CastContentRendererClient; +class CastContentUtilityClient; class CastMainDelegate : public content::ContentMainDelegate { public: @@ -41,12 +42,14 @@ class CastMainDelegate : public content::ContentMainDelegate { #endif // !defined(OS_ANDROID) content::ContentBrowserClient* CreateContentBrowserClient() override; content::ContentRendererClient* CreateContentRendererClient() override; + content::ContentUtilityClient* CreateContentUtilityClient() override; private: void InitializeResourceBundle(); scoped_ptr<CastContentBrowserClient> browser_client_; scoped_ptr<CastContentRendererClient> renderer_client_; + scoped_ptr<CastContentUtilityClient> utility_client_; scoped_ptr<CastResourceDelegate> resource_delegate_; CastContentClient content_client_; diff --git a/chromecast/chromecast.gyp b/chromecast/chromecast.gyp index 4fb27ce..daab117 100644 --- a/chromecast/chromecast.gyp +++ b/chromecast/chromecast.gyp @@ -422,6 +422,7 @@ 'renderer/media/capabilities_message_filter.h', 'service/cast_service.cc', 'service/cast_service.h', + 'utility/cast_content_utility_client.h', ], 'conditions': [ ['chromecast_branding!="public"', { @@ -435,6 +436,7 @@ 'browser/pref_service_helper_simple.cc', 'common/platform_client_auth_simple.cc', 'renderer/cast_content_renderer_client_simple.cc', + 'utility/cast_content_utility_client_simple.cc', ], }], # ExternalMetrics not necessary on Android and (as of this writing) uses diff --git a/chromecast/utility/BUILD.gn b/chromecast/utility/BUILD.gn new file mode 100644 index 0000000..04152df --- /dev/null +++ b/chromecast/utility/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright 2016 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. + +import("//chromecast/chromecast.gni") + +source_set("utility") { + sources = [ + "cast_content_utility_client.h", + ] + + deps = [ + "//base", + "//content/public/utility", + ] + + if (chromecast_branding == "public") { + sources += [ "cast_content_utility_client_simple.cc" ] + } +} diff --git a/chromecast/utility/DEPS b/chromecast/utility/DEPS new file mode 100644 index 0000000..2c2d79f --- /dev/null +++ b/chromecast/utility/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+chromecast/utility", + "+content/public/utility", +] diff --git a/chromecast/utility/cast_content_utility_client.h b/chromecast/utility/cast_content_utility_client.h new file mode 100644 index 0000000..bd5e0fd --- /dev/null +++ b/chromecast/utility/cast_content_utility_client.h @@ -0,0 +1,28 @@ +// Copyright 2016 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_UTILITY_CAST_CONTENT_UTILITY_CLIENT_H_ +#define CHROMECAST_UTILITY_CAST_CONTENT_UTILITY_CLIENT_H_ + +#include "base/macros.h" +#include "base/memory/scoped_ptr.h" +#include "content/public/utility/content_utility_client.h" + +namespace chromecast { +namespace shell { + +class CastContentUtilityClient : public content::ContentUtilityClient { + public: + static scoped_ptr<CastContentUtilityClient> Create(); + + CastContentUtilityClient() {} + + private: + DISALLOW_COPY_AND_ASSIGN(CastContentUtilityClient); +}; + +} // namespace shell +} // namespace chromecast + +#endif // CHROMECAST_UTILITY_CAST_CONTENT_UTILITY_CLIENT_H_ diff --git a/chromecast/utility/cast_content_utility_client_simple.cc b/chromecast/utility/cast_content_utility_client_simple.cc new file mode 100644 index 0000000..01a5dfc8 --- /dev/null +++ b/chromecast/utility/cast_content_utility_client_simple.cc @@ -0,0 +1,16 @@ +// Copyright 2016 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/utility/cast_content_utility_client.h" + +namespace chromecast { +namespace shell { + +// static +scoped_ptr<CastContentUtilityClient> CastContentUtilityClient::Create() { + return scoped_ptr<CastContentUtilityClient>(); +} + +} // namespace shell +} // namespace chromecast |