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

Unified Diff: chrome/browser/ui/views/overlay/overlay_window_views.h

Issue 2905833004: [OverlayWindow] Add platform-independent window and views implementation. (Closed)
Patch Set: Remove BaseWindow subclassing per conversation with sky@. Created 3 years, 6 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: chrome/browser/ui/views/overlay/overlay_window_views.h
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.h b/chrome/browser/ui/views/overlay/overlay_window_views.h
new file mode 100644
index 0000000000000000000000000000000000000000..c41a0747c37f9052541319bd4cb2c695c6e2bc1b
--- /dev/null
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.h
@@ -0,0 +1,34 @@
+// 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_VIEWS_OVERLAY_OVERLAY_WINDOW_VIEWS_H_
+#define CHROME_BROWSER_UI_VIEWS_OVERLAY_OVERLAY_WINDOW_VIEWS_H_
+
+#include "chrome/browser/ui/overlay/overlay_window.h"
+#include "ui/views/widget/widget.h"
+
+// The Views implementation of OverlayWindow.
+class OverlayWindowViews : public OverlayWindow {
+ public:
+ OverlayWindowViews();
+ ~OverlayWindowViews() override;
+
+ void Init() override;
+ bool IsActive() const override;
+ void Show() override;
+ void Hide() override;
+ void Close() override;
+ void Activate() override;
+ bool IsAlwaysOnTop() const override;
+ ui::Layer* GetLayer() override;
+ gfx::NativeWindow GetNativeWindow() const override;
+ gfx::Rect GetBounds() const override;
+
+ private:
+ std::unique_ptr<views::Widget> widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(OverlayWindowViews);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_OVERLAY_OVERLAY_WINDOW_VIEWS_H_

Powered by Google App Engine
This is Rietveld 408576698