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

Unified Diff: chromecast/graphics/cast_window_manager_aura.h

Issue 2643553002: [Chromecast] Reuse the Aura window manager across receiver apps. (Closed)
Patch Set: Created 3 years, 11 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: chromecast/graphics/cast_window_manager_aura.h
diff --git a/chromecast/graphics/cast_window_manager_aura.h b/chromecast/graphics/cast_window_manager_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..03f4d31a21a9a50b5d463e17659c5bd96045c85d
--- /dev/null
+++ b/chromecast/graphics/cast_window_manager_aura.h
@@ -0,0 +1,54 @@
+// 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_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_
+#define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "chromecast/graphics/cast_vsync_settings.h"
+#include "chromecast/graphics/cast_window_manager.h"
+
+namespace aura {
+class Window;
+namespace client {
+class DefaultCaptureClient;
+}
+}
+
+namespace chromecast {
+
+class CastWindowTreeHost;
+
+class CastWindowManagerAura : public CastWindowManager,
+ public CastVSyncSettings::Observer {
+ public:
+ ~CastWindowManagerAura() override;
+
+ // CastWindowManager implementation:
+ void Setup() override;
+ void TearDown() override;
+ void AddWindow(gfx::NativeView window) override;
+ void AddAndShowWindow(gfx::NativeView window) override;
+
+ private:
+ friend class CastWindowManager;
+
+ // This class should only be instantiated by CastWindowManager::Create.
+ explicit CastWindowManagerAura(bool enable_input);
+
+ // CastVSyncSettings::Observer implementation:
+ void OnVSyncIntervalChanged(base::TimeDelta interval) override;
+
+ const bool enable_input_;
+ std::unique_ptr<CastWindowTreeHost> window_tree_host_;
+ std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(CastWindowManagerAura);
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_

Powered by Google App Engine
This is Rietveld 408576698