Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2124)

Unified Diff: ash/common/cast_config_delegate.h

Issue 2525563003: mash: Change CastConfigDelegate to a mojoified CastConfigClient. (Closed)
Patch Set: move dep to chromeos section Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/cast_config_controller.cc ('k') | ash/common/cast_config_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/cast_config_delegate.h
diff --git a/ash/common/cast_config_delegate.h b/ash/common/cast_config_delegate.h
deleted file mode 100644
index 63a580b5720bf18c452067f0644f8cc5cb0446d0..0000000000000000000000000000000000000000
--- a/ash/common/cast_config_delegate.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// 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.
-
-#ifndef ASH_COMMON_CAST_CONFIG_DELEGATE_H_
-#define ASH_COMMON_CAST_CONFIG_DELEGATE_H_
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/macros.h"
-#include "base/strings/string16.h"
-#include "url/gurl.h"
-
-namespace ash {
-
-// This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|,
-// to access the cast extension.
-class CastConfigDelegate {
- public:
- struct ASH_EXPORT Sink {
- Sink();
- ~Sink();
-
- std::string id;
- base::string16 name;
- base::string16 domain;
- };
-
- struct ASH_EXPORT Route {
- enum class ContentSource { UNKNOWN, TAB, DESKTOP };
-
- Route();
- ~Route();
-
- std::string id;
- base::string16 title;
-
- // Is the activity originating from this computer?
- bool is_local_source = false;
-
- // What is source of the content? For example, we could be DIAL casting a
- // tab or mirroring the entire desktop.
- ContentSource content_source = ContentSource::UNKNOWN;
- };
-
- struct ASH_EXPORT SinkAndRoute {
- SinkAndRoute();
- ~SinkAndRoute();
-
- Sink sink;
- Route route;
- };
-
- using SinksAndRoutes = std::vector<SinkAndRoute>;
-
- class ASH_EXPORT Observer {
- public:
- // Invoked whenever there is new sink or route information available.
- virtual void OnDevicesUpdated(const SinksAndRoutes& devices) = 0;
-
- protected:
- virtual ~Observer() {}
-
- private:
- DISALLOW_ASSIGN(Observer);
- };
-
- virtual ~CastConfigDelegate() {}
-
- // Request fresh data from the backend. When the data is available, all
- // registered observers will get called.
- virtual void RequestDeviceRefresh() = 0;
-
- // Initiate a casting session to |sink|.
- virtual void CastToSink(const Sink& sink) = 0;
-
- // A user-initiated request to stop the given cast session.
- virtual void StopCasting(const Route& route) = 0;
-
- // Add or remove an observer.
- virtual void AddObserver(Observer* observer) = 0;
- virtual void RemoveObserver(Observer* observer) = 0;
-
- private:
- DISALLOW_ASSIGN(CastConfigDelegate);
-};
-
-} // namespace ash
-
-#endif // ASH_COMMON_CAST_CONFIG_DELEGATE_H_
« no previous file with comments | « ash/common/cast_config_controller.cc ('k') | ash/common/cast_config_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698