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

Side by Side Diff: chrome/browser/ui/overlay/overlay_window.h

Issue 2905833004: [OverlayWindow] Add platform-independent window and views implementation. (Closed)
Patch Set: Changes per sky@ and mlamouri@'s comments. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_OVERLAY_OVERLAY_WINDOW_H_
6 #define CHROME_BROWSER_UI_OVERLAY_OVERLAY_WINDOW_H_
7
8 #include "base/memory/ptr_util.h"
9 #include "ui/gfx/native_widget_types.h"
10
11 namespace gfx {
12 class Rect;
13 }
14
15 namespace ui {
16 class Layer;
17 }
18
19 // This window will always float above other windows. The intention is to show
20 // content perpetually while the user is still interacting with the other
21 // browser windows.
22 class OverlayWindow {
23 public:
24 OverlayWindow() = default;
25 virtual ~OverlayWindow() = default;
26
27 // Returns a created OverlayWindow. This is defined in the platform-specific
28 // implementation for the class.
29 static std::unique_ptr<OverlayWindow> Create();
30
31 virtual void Init() = 0;
32 virtual bool IsActive() const = 0;
33 virtual void Show() = 0;
34 virtual void Hide() = 0;
35 virtual void Close() = 0;
36 virtual void Activate() = 0;
37 virtual bool IsAlwaysOnTop() const = 0;
38 virtual ui::Layer* GetLayer() = 0;
39 virtual gfx::NativeWindow GetNativeWindow() const = 0;
40 // Retrieves the window's current bounds, including its window.
41 virtual gfx::Rect GetBounds() const = 0;
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(OverlayWindow);
45 };
46
47 #endif // CHROME_BROWSER_UI_OVERLAY_OVERLAY_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698