Chromium Code Reviews| Index: chrome/browser/ui/views/app_list/app_list_dialog_contents_view.h |
| diff --git a/chrome/browser/ui/views/app_list/app_list_dialog_contents_view.h b/chrome/browser/ui/views/app_list/app_list_dialog_contents_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6f88d65f6087850f39aa0d8cc1a5da7be9c9ec48 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/app_list/app_list_dialog_contents_view.h |
| @@ -0,0 +1,63 @@ |
| +// Copyright 2014 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_APP_LIST_APP_LIST_DIALOG_CONTENTS_VIEW_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_CONTENTS_VIEW_H_ |
| + |
| +#include "ui/views/controls/button/button.h" |
| +#include "ui/views/widget/widget_delegate.h" |
| + |
| +class AppListControllerDelegate; |
| + |
| +namespace views { |
| +class LabelButton; |
| +class Widget; |
| +} |
| + |
| +// The contents view for an App List Dialog, which covers the entire app list |
| +// and adds a close button. |
| +class AppListDialogContentsView : public views::WidgetDelegateView, |
| + public views::ButtonListener { |
| + public: |
| + AppListDialogContentsView( |
| + AppListControllerDelegate* app_list_controller_delegate, |
| + views::View* dialog_body_); |
|
tapted
2014/06/16 06:11:55
dialog_body_ -> dialog_body
sashab
2014/06/16 07:01:20
Done.
|
| + virtual ~AppListDialogContentsView(); |
| + |
| + // Create a |dialog| window Widget with the specified |parent|. The dialog |
| + // will be resized to fill the body of the app list. |
| + static views::Widget* CreateDialogWidget(gfx::NativeWindow parent, |
| + const gfx::Rect& bounds, |
| + AppListDialogContentsView* dialog); |
| + |
| + // 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 ui::AXRole GetAccessibleWindowRole() const OVERRIDE; |
| + virtual void WindowClosing() OVERRIDE; |
| + |
| + private: |
| + AppListControllerDelegate* app_list_controller_delegate_; |
|
tapted
2014/06/16 06:11:55
This should have an ownership comment. E.g.
// We
sashab
2014/06/16 07:01:20
Thanks. Done.
|
| + |
| + views::View* dialog_body_; |
| + views::LabelButton* close_button_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppListDialogContentsView); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_CONTENTS_VIEW_H_ |