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

Unified Diff: chrome/browser/ui/views/aura/app_list_window.h

Issue 8747021: [Aura] Polish app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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
index 53f4f523001b0dd4d57beea21b03d746561f4267..f92c9b020c443dae14eba440535bc2774d9c9141 100644
--- a/chrome/browser/ui/views/aura/app_list_window.h
+++ b/chrome/browser/ui/views/aura/app_list_window.h
@@ -8,6 +8,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/tab_first_render_watcher.h"
+#include "chrome/browser/ui/webui/aura/app_list_ui.h"
+#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "ui/aura_shell/shell_delegate.h"
#include "ui/views/widget/widget_delegate.h"
@@ -18,9 +20,11 @@ class Widget;
}
class AppListWindow : public views::WidgetDelegate,
- public TabFirstRenderWatcher::Delegate {
+ public TabContentsDelegate,
+ public TabFirstRenderWatcher::Delegate,
+ public AppListUI::Delegate {
public:
- explicit AppListWindow(
+ AppListWindow(const gfx::Rect& bounds,
sky 2011/11/30 21:50:21 nit: wrap this to next line so that this param and
xiyuan 2011/11/30 22:26:34 Done.
const aura_shell::ShellDelegate::SetWidgetCallback& callback);
private:
@@ -28,17 +32,31 @@ class AppListWindow : public views::WidgetDelegate,
// views::WidgetDelegate overrides:
virtual void DeleteDelegate() OVERRIDE;
- virtual views::View* GetContentsView() OVERRIDE;
+ virtual views::View* GetInitiallyFocusedView() OVERRIDE;
virtual views::Widget* GetWidget() OVERRIDE;
virtual const views::Widget* GetWidget() const OVERRIDE;
+ // TabContentsDelegate implementation:
+ virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
+ virtual void HandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event) OVERRIDE;
+ virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE;
+ virtual bool TakeFocus(bool reverse) OVERRIDE;
+
// TabFirstRenderWatcher::Delegate implementation:
virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE;
virtual void OnTabMainFrameLoaded() OVERRIDE;
virtual void OnTabMainFrameFirstRender() OVERRIDE;
+ // AppListUI::Delegate implementation:
+ virtual void Close() OVERRIDE;
+ virtual void OnAppsLoaded() OVERRIDE;
+
// Initializes the window.
- void Init();
+ void Init(const gfx::Rect& bounds);
+
+ // Check and fire set widget callback if we are ready.
+ void SetWidgetIfReady();
views::Widget* widget_;
DOMView* contents_;
@@ -49,6 +67,9 @@ class AppListWindow : public views::WidgetDelegate,
// Callback to set app list widget when it's ready.
aura_shell::ShellDelegate::SetWidgetCallback callback_;
+ bool content_rendered_;
sky 2011/11/30 21:50:21 nit: add description
xiyuan 2011/11/30 22:26:34 Done.
+ bool apps_loaded_;
+
DISALLOW_COPY_AND_ASSIGN(AppListWindow);
};

Powered by Google App Engine
This is Rietveld 408576698