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

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: set tile-page-scrollbar color Created 9 years 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
« no previous file with comments | « chrome/browser/resources/aura/app_list/app_list.js ('k') | chrome/browser/ui/views/aura/app_list_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..23caa66d428592a55e22c98824bfa5bd9758fdfb 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_delegate.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,12 @@ class Widget;
}
class AppListWindow : public views::WidgetDelegate,
- public TabFirstRenderWatcher::Delegate {
+ public TabContentsDelegate,
+ public TabFirstRenderWatcher::Delegate,
+ public AppListUIDelegate {
public:
- explicit AppListWindow(
+ AppListWindow(
+ const gfx::Rect& bounds,
const aura_shell::ShellDelegate::SetWidgetCallback& callback);
private:
@@ -28,17 +33,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;
+ // AppListUIDelegate 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 +68,12 @@ class AppListWindow : public views::WidgetDelegate,
// Callback to set app list widget when it's ready.
aura_shell::ShellDelegate::SetWidgetCallback callback_;
+ // True if webui is rendered.
+ bool content_rendered_;
+
+ // True if apps info is loaded by webui.
+ bool apps_loaded_;
+
DISALLOW_COPY_AND_ASSIGN(AppListWindow);
};
« no previous file with comments | « chrome/browser/resources/aura/app_list/app_list.js ('k') | chrome/browser/ui/views/aura/app_list_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698