Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / chrome / browser / ui / gtk / panels / panel_stack_window_gtk.h
blob5cfe341dd426152e14cd9dce5df5172fbc06b436
1 // Copyright (c) 2013 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.
5 #ifndef CHROME_BROWSER_UI_GTK_PANELS_PANEL_STACK_WINDOW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_PANELS_PANEL_STACK_WINDOW_GTK_H_
8 #include <gtk/gtk.h>
10 #include <list>
11 #include <map>
13 #include "chrome/browser/ui/panels/native_panel_stack_window.h"
14 #include "ui/base/gtk/gtk_signal.h"
15 #include "ui/base/x/active_window_watcher_x_observer.h"
17 class PanelStackWindowGtk : public NativePanelStackWindow,
18 public ui::ActiveWindowWatcherXObserver {
19 public:
20 explicit PanelStackWindowGtk(NativePanelStackWindowDelegate* delegate);
21 virtual ~PanelStackWindowGtk();
23 protected:
24 // Overridden from NativePanelStackWindow:
25 virtual void Close() OVERRIDE;
26 virtual void AddPanel(Panel* panel) OVERRIDE;
27 virtual void RemovePanel(Panel* panel) OVERRIDE;
28 virtual void MergeWith(NativePanelStackWindow* another) OVERRIDE;
29 virtual bool IsEmpty() const OVERRIDE;
30 virtual bool HasPanel(Panel* panel) const OVERRIDE;
31 virtual void MovePanelsBy(const gfx::Vector2d& delta) OVERRIDE;
32 virtual void BeginBatchUpdatePanelBounds(bool animate) OVERRIDE;
33 virtual void AddPanelBoundsForBatchUpdate(Panel* panel,
34 const gfx::Rect& bounds) OVERRIDE;
35 virtual void EndBatchUpdatePanelBounds() OVERRIDE;
36 virtual bool IsAnimatingPanelBounds() const OVERRIDE;
37 virtual void Minimize() OVERRIDE;
38 virtual bool IsMinimized() const OVERRIDE;
39 virtual void DrawSystemAttention(bool draw_attention) OVERRIDE;
40 virtual void OnPanelActivated(Panel* panel) OVERRIDE;
42 private:
43 typedef std::list<Panel*> Panels;
45 // Overridden from ActiveWindowWatcherXObserver.
46 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE;
48 CHROMEGTK_CALLBACK_1(PanelStackWindowGtk, gboolean, OnWindowDeleteEvent,
49 GdkEvent*);
50 CHROMEGTK_CALLBACK_1(PanelStackWindowGtk, gboolean, OnWindowState,
51 GdkEventWindowState*);
53 void EnsureWindowCreated();
54 void SetStackWindowBounds();
56 // The map value is new bounds of the panel.
57 typedef std::map<Panel*, gfx::Rect> BoundsUpdates;
59 NativePanelStackWindowDelegate* delegate_;
61 // The background window that provides the aggregated taskbar presence for all
62 // the panels in the stack.
63 GtkWindow* window_;
65 Panels panels_;
67 bool is_minimized_;
69 // For batch bounds update.
70 bool bounds_updates_started_;
71 BoundsUpdates bounds_updates_;
73 DISALLOW_COPY_AND_ASSIGN(PanelStackWindowGtk);
76 #endif // CHROME_BROWSER_UI_GTK_PANELS_PANEL_STACK_WINDOW_GTK_H_