Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / app_list / app_list_dialog_container.h
index 0ac6aed..089c3d0 100644 (file)
@@ -5,50 +5,26 @@
 #ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_CONTAINER_H_
 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_CONTAINER_H_
 
-#include "ui/views/controls/button/button.h"
-#include "ui/views/window/dialog_delegate.h"
+#include "base/callback_forward.h"
+#include "ui/gfx/geometry/size.h"
 
 namespace views {
-class LabelButton;
-class Widget;
+class DialogDelegateView;
+class View;
 }
 
-// The contents view for an App List Dialog, which covers the entire app list
-// and adds a close button.
-class AppListDialogContainer : public views::DialogDelegateView,
-                               public views::ButtonListener {
- public:
-  // Creates a new AppListDialogContainer. Takes ownership of |dialog_body|.
-  AppListDialogContainer(views::View* dialog_body,
-                         const base::Closure& close_callback);
-  virtual ~AppListDialogContainer();
-
-  // Overridden from views::View:
-  virtual void Layout() OVERRIDE;
-
-  // Overridden from views::WidgetDelegate:
-  virtual views::View* GetInitiallyFocusedView() OVERRIDE;
-  virtual views::View* GetContentsView() OVERRIDE;
-  virtual views::ClientView* CreateClientView(views::Widget* widget) OVERRIDE;
-  virtual views::NonClientFrameView* CreateNonClientFrameView(
-      views::Widget* widget) OVERRIDE;
-
-  // Overridden from views::ButtonListener:
-  virtual void ButtonPressed(views::Button* sender,
-                             const ui::Event& event) OVERRIDE;
-
- protected:
-  // Overridden from views::WidgetDelegate:
-  virtual ui::ModalType GetModalType() const OVERRIDE;
-  virtual void WindowClosing() OVERRIDE;
-
- private:
-  views::View* dialog_body_;  // Owned by this class via the views hierarchy.
-  const base::Closure close_callback_;
-
-  views::LabelButton* close_button_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListDialogContainer);
-};
+// Creates a new dialog containing |view| that can be displayed inside the app
+// list, covering the entire app list and adding a close button. Takes ownership
+// of |view|.
+views::DialogDelegateView* CreateAppListContainerForView(
+    views::View* view,
+    const base::Closure& close_callback);
+
+// Creates a new native dialog of the given |size| containing |view| with a
+// close button and draggable titlebar. Takes ownership of |view|.
+views::DialogDelegateView* CreateDialogContainerForView(
+    views::View* view,
+    const gfx::Size& size,
+    const base::Closure& close_callback);
 
 #endif  // CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_CONTAINER_H_