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

Unified Diff: ash/system/cast/tray_cast.h

Issue 1118613003: Add UI for cast system tray integration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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
Index: ash/system/cast/tray_cast.h
diff --git a/ash/system/cast/tray_cast.h b/ash/system/cast/tray_cast.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a2e0d521ee8c991d40365b14954bd964a90779d
--- /dev/null
+++ b/ash/system/cast/tray_cast.h
@@ -0,0 +1,62 @@
+// 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_SYSTEM_CAST_TRAY_CAST_H_
+#define ASH_SYSTEM_CAST_TRAY_CAST_H_
+
+#include "ash/shell_observer.h"
+#include "ash/system/cast/cast_observer.h"
+#include "ash/system/tray/system_tray_item.h"
+
+namespace ash {
+namespace tray {
+class CastTrayView;
+class CastSelectDefaultView;
+class CastDetailedView;
+class CastDuplexView;
+}
+
+class CastConfigDelegate;
+
+class TrayCast : public SystemTrayItem,
+ public CastObserver,
+ public ShellObserver {
+ public:
+ explicit TrayCast(SystemTray* system_tray);
+ ~TrayCast() override;
+
+ // Overridden from CastObserver.
achuithb 2015/04/30 00:03:33 Make this private
jdufault 2015/04/30 21:51:04 Done.
+ void OnCastRefresh() override;
+
+ private:
+ bool HasCastExtension();
+
+ // Overridden from SystemTrayItem.
+ views::View* CreateTrayView(user::LoginStatus status) override;
+ views::View* CreateDefaultView(user::LoginStatus status) override;
+ views::View* CreateDetailedView(user::LoginStatus status) override;
+ void DestroyTrayView() override;
+ void DestroyDefaultView() override;
+ void DestroyDetailedView() override;
+ void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
+
+ // Overridden from ShellObserver.
+ void OnCastingSessionStartedOrStopped(bool started) override;
+
+ void UpdatePrimaryView();
+
+ bool is_casting_;
+
+ // Not owned.
+ tray::CastTrayView* tray_;
+ tray::CastDuplexView* default_;
+ tray::CastDetailedView* detailed_;
+ CastConfigDelegate* cast_config_delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(TrayCast);
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_CAST_TRAY_CAST_H_
« no previous file with comments | « ash/ash.gyp ('k') | ash/system/cast/tray_cast.cc » ('j') | ash/system/cast/tray_cast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698