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

Unified Diff: chromecast/graphics/cast_window_manager_aura.h

Issue 2643553002: [Chromecast] Reuse the Aura window manager across receiver apps. (Closed)
Patch Set: applied reviewer feedback 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..ed52122a4119d37ec6a96709dc348c7e0dee862d
--- /dev/null
+++ b/chromecast/graphics/cast_window_manager_aura.h
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
halliwell 2017/01/18 21:11:22 2017
Joshua LeVasseur 2017/01/19 00:56:33 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
halliwell 2017/01/18 21:11:22 blank line
Joshua LeVasseur 2017/01/19 00:56:33 Done.
+#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 client
+} // namespace aura
+
+namespace chromecast {
+
+class CastWindowTreeHost;
+
+class CastWindowManagerAura : public CastWindowManager,
+ private 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