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

Unified Diff: chrome/browser/ui/overlay/overlay_window.h

Issue 2905833004: [OverlayWindow] Add platform-independent window and views implementation. (Closed)
Patch Set: Rebase. Created 3 years, 5 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/overlay/overlay_window_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/overlay/overlay_window.h
diff --git a/chrome/browser/ui/overlay/overlay_window.h b/chrome/browser/ui/overlay/overlay_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..de20aefd6d62c4131a28736d0dc45f9d473cad6c
--- /dev/null
+++ b/chrome/browser/ui/overlay/overlay_window.h
@@ -0,0 +1,47 @@
+// Copyright 2017 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 CHROME_BROWSER_UI_OVERLAY_OVERLAY_WINDOW_H_
+#define CHROME_BROWSER_UI_OVERLAY_OVERLAY_WINDOW_H_
+
+#include "base/memory/ptr_util.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace ui {
+class Layer;
+}
+
+// This window will always float above other windows. The intention is to show
+// content perpetually while the user is still interacting with the other
+// browser windows.
+class OverlayWindow {
+ public:
+ OverlayWindow() = default;
+ virtual ~OverlayWindow() = default;
+
+ // Returns a created OverlayWindow. This is defined in the platform-specific
+ // implementation for the class.
+ static std::unique_ptr<OverlayWindow> Create();
+
+ virtual void Init() = 0;
+ virtual bool IsActive() const = 0;
+ virtual void Show() = 0;
+ virtual void Hide() = 0;
+ virtual void Close() = 0;
+ virtual void Activate() = 0;
+ virtual bool IsAlwaysOnTop() const = 0;
+ virtual ui::Layer* GetLayer() = 0;
+ virtual gfx::NativeWindow GetNativeWindow() const = 0;
+ // Retrieves the window's current bounds, including its window.
+ virtual gfx::Rect GetBounds() const = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OverlayWindow);
+};
+
+#endif // CHROME_BROWSER_UI_OVERLAY_OVERLAY_WINDOW_H_
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/overlay/overlay_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698