Chromium Code Reviews| Index: chrome/browser/ui/panels/native_panel_stack.h |
| diff --git a/chrome/browser/ui/panels/native_panel_stack.h b/chrome/browser/ui/panels/native_panel_stack.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9cb0c30ec1a4b85f30ba5ae36058d527782a1f42 |
| --- /dev/null |
| +++ b/chrome/browser/ui/panels/native_panel_stack.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2012 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_PANELS_NATIVE_PANEL_STACK_H_ |
| +#define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_H_ |
| + |
| +#include "ui/gfx/native_widget_types.h" |
| + |
| +class StackedPanelCollection; |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +// An interface that encapsulates the platform-specific behaviors that are |
| +// needed to support multiple panels that are stacked together. A native |
| +// window might be created to enclose all the panels in the stack. The lifetime |
| +// of the class that implements this interface is managed by itself. |
| +class NativePanelStack { |
| + friend class StackedPanelCollection; |
| + |
| + public: |
| + // The StackedPanelCollection instance is passed and owned by the |
| + // NativePanelStack instance that is being created. |
| + static NativePanelStack* Create(StackedPanelCollection* stack); |
| + virtual ~NativePanelStack() {} |
| + |
| + protected: |
| + virtual void Close() = 0; |
|
Dmitry Titov
2013/01/10 00:16:24
Could you add a comment about who and when calls t
jianli
2013/01/10 02:05:37
Done.
|
| + virtual void OnPanelAddedOrRemoved() = 0; |
|
Dmitry Titov
2013/01/10 00:16:24
This feels like it should get a Panel* argument, t
jianli
2013/01/10 02:05:37
Done.
|
| + virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| + virtual void SetBounds(const gfx::Rect& bounds) = 0; |
|
Dmitry Titov
2013/01/10 00:16:24
SetBounds - also a comment would be useful about w
jianli
2013/01/10 02:05:37
Done.
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_H_ |