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

Side by Side Diff: chrome/browser/ui/views/panels/panel_stack_view.h

Issue 11669018: Support dragging panels to stack and snap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_VIEWS_PANELS_PANEL_STACK_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/panels/native_panel_stack.h"
11 #include "ui/views/widget/widget_delegate.h"
12 #include "ui/views/widget/widget_observer.h"
13
14 class StackedPanelCollection;
15
16 // A native window that acts as the owner of all panels in the stack, in order
17 // to make all panels appear as a single window on the taskbar or launcher.
18 class PanelStackView : public NativePanelStack,
19 public views::WidgetObserver,
20 public views::WidgetDelegateView {
21 public:
22 explicit PanelStackView(StackedPanelCollection* stacked_collection);
23 ~PanelStackView();
24
25 protected:
26 // Overridden from NativePanelStack:
27 virtual void Close() OVERRIDE;
28 virtual void OnPanelAddedOrRemoved(Panel* panel) OVERRIDE;
29 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
30
31 private:
32 // Overridden from views::WidgetDelegate:
33 virtual string16 GetWindowTitle() const OVERRIDE;
34 virtual gfx::ImageSkia GetWindowAppIcon() OVERRIDE;
35 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
36 virtual views::Widget* GetWidget() OVERRIDE;
37 virtual const views::Widget* GetWidget() const OVERRIDE;
38 virtual void DeleteDelegate() OVERRIDE;
39
40 // Overridden from views::WidgetObserver:
41 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
42
43 void EnsureInitialized();
44
45 // Updates the owner of the underlying window such that multiple panels
46 // stacked together could appear as a single window on the taskbar or
47 // launcher.
48 void UpdateWindowOwnerForTaskbarIconAppearance(Panel* panel);
49
50 scoped_ptr<StackedPanelCollection> stacked_collection_;
51
52 bool delay_initialized_;
53
54 views::Widget* window_;
55
56 DISALLOW_COPY_AND_ASSIGN(PanelStackView);
57 };
58
59 #endif // CHROME_BROWSER_UI_VIEWS_PANELS_PANEL_STACK_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698