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

Unified Diff: chromecast/browser/cast_content_window_linux.h

Issue 2570623003: [Chromecast] Turn CastContentWindow into an abstract interface. (Closed)
Patch Set: Remove duplicate dependency 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/browser/cast_content_window_linux.h
diff --git a/chromecast/browser/cast_content_window.h b/chromecast/browser/cast_content_window_linux.h
similarity index 59%
copy from chromecast/browser/cast_content_window.h
copy to chromecast/browser/cast_content_window_linux.h
index aeeeab94f021cb51ab83195e41442e277ebb16e0..5276aade5b73467d86a09c94ad6f0a3e60a156db 100644
--- a/chromecast/browser/cast_content_window.h
+++ b/chromecast/browser/cast_content_window_linux.h
@@ -1,15 +1,17 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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_BROWSER_CAST_CONTENT_WINDOW_H_
-#define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_
+#ifndef CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_
+#define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_
#include <memory>
#include "base/macros.h"
+#include "chromecast/browser/cast_content_window.h"
#include "chromecast/graphics/cast_vsync_settings.h"
#include "content/public/browser/web_contents_observer.h"
+#include "ui/events/keycodes/keyboard_codes.h"
namespace aura {
class WindowTreeHost;
@@ -23,30 +25,27 @@ class WebContents;
namespace chromecast {
namespace shell {
-class CastContentWindow : public content::WebContentsObserver,
- public CastVSyncSettings::Observer {
+class CastContentWindowLinux : public CastContentWindow,
+ public content::WebContentsObserver,
+ public CastVSyncSettings::Observer {
Wez 2017/01/11 20:47:55 IIUC you only ever create this class via Create(),
derekjchow1 2017/01/11 21:54:34 Made constructor private, using CastContentWindow
public:
- CastContentWindow();
+ CastContentWindowLinux();
// Removes the window from the screen.
- ~CastContentWindow() override;
-
- // Sets the window's background to be transparent (call before
- // CreateWindowTree).
- void SetTransparent() { transparent_ = true; }
-
- // Create a full-screen window for |web_contents|.
- void CreateWindowTree(content::WebContents* web_contents);
+ ~CastContentWindowLinux() override;
+ // CastContentWindow implementation.
+ void SetTransparent() override;
+ void ShowWebContents(content::WebContents* web_contents) override;
std::unique_ptr<content::WebContents> CreateWebContents(
- content::BrowserContext* browser_context);
+ content::BrowserContext* browser_context) override;
// content::WebContentsObserver implementation:
void DidFirstVisuallyNonEmptyPaint() override;
- void MediaStartedPlaying(const MediaPlayerInfo& media_info,
- const MediaPlayerId& id) override;
void MediaStoppedPlaying(const MediaPlayerInfo& media_info,
const MediaPlayerId& id) override;
Wez 2017/01/11 20:47:54 nit: Why did you move this? It reads more naturall
derekjchow1 2017/01/11 21:54:34 Done.
+ void MediaStartedPlaying(const MediaPlayerInfo& media_info,
+ const MediaPlayerId& id) override;
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
// CastVSyncSettings::Observer implementation:
@@ -58,10 +57,10 @@ class CastContentWindow : public content::WebContentsObserver,
#endif
bool transparent_;
- DISALLOW_COPY_AND_ASSIGN(CastContentWindow);
+ DISALLOW_COPY_AND_ASSIGN(CastContentWindowLinux);
};
} // namespace shell
} // namespace chromecast
-#endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_
+#endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698