Chromium Code Reviews| Index: chrome/browser/ui/views/aura/app_list_window.h |
| diff --git a/chrome/browser/ui/views/aura/app_list_window.h b/chrome/browser/ui/views/aura/app_list_window.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6b69995e9c2abebf9ee8ab9eedffa1fb2c4b92af |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/aura/app_list_window.h |
| @@ -0,0 +1,61 @@ |
| +// Copyright (c) 2011 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_AURA_APP_LIST_WINDOW_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_ |
| +#pragma once |
| + |
| +#include "ui/aura/desktop_observer.h" |
| +#include "views/widget/widget_delegate.h" |
| + |
| +class DOMView; |
| + |
| +namespace views { |
| +class Widget; |
| +} |
| + |
| +class AppListWindow : public views::WidgetDelegate, |
| + public aura::DesktopObserver { |
| + public: |
| + // Show/hide app list window. |
| + static void Show(bool show); |
|
sky
2011/10/27 23:52:34
Show(false) is a bit weird. Either name it SetVisi
|
| + |
| + // Whether app list window is shown or being shown. |
| + static bool IsShowing(); |
| + |
| + private: |
| + AppListWindow(); |
| + virtual ~AppListWindow(); |
| + |
| + // Overridden from views::WidgetDelegate: |
| + virtual void DeleteDelegate() OVERRIDE; |
| + virtual views::View* GetContentsView() OVERRIDE; |
| + virtual void WindowClosing() OVERRIDE; |
| + virtual views::Widget* GetWidget() OVERRIDE; |
| + virtual const views::Widget* GetWidget() const OVERRIDE; |
| + |
| + // aura::DesktopObserver overrides: |
| + virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE; |
| + |
| + // Initializes the window. |
| + void Init(); |
| + |
| + // Shows/hides the window. |
| + void Show(bool show, bool animate); |
| + |
| + bool is_showing() const { |
| + return is_showing_; |
| + } |
| + |
| + // Current visible app list window. |
| + static AppListWindow* instance_; |
| + |
| + views::Widget* widget_; |
| + DOMView* contents_; |
| + bool is_showing_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppListWindow); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_ |