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

Unified Diff: athena/home/app_list_view_delegate.cc

Issue 441123002: Creates a dummy view to occupy the logo area of athena home card. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/app_list_view_delegate.cc
diff --git a/athena/home/app_list_view_delegate.cc b/athena/home/app_list_view_delegate.cc
index bd85ecaaead5cb48ea36e5881e2457751d4e2fa8..51800223b06a703b7689632c6cc9a2f1bf377fd7 100644
--- a/athena/home/app_list_view_delegate.cc
+++ b/athena/home/app_list_view_delegate.cc
@@ -19,9 +19,35 @@
#include "ui/app_list/search_result.h"
#include "ui/app_list/speech_ui_model.h"
#include "ui/gfx/image/image_skia.h"
+#include "ui/views/background.h"
+#include "ui/views/view.h"
namespace athena {
+namespace {
+
+// A view to draw the logo area of app-list centered view.
+// TODO(mukai): replace this by the actual start page webview.
+class DummyLogoView : public views::View {
+ public:
+ explicit DummyLogoView(const gfx::Size& size)
+ : size_(size) {
+ set_background(views::Background::CreateSolidBackground(
+ SK_ColorLTGRAY));
+ }
+
+ private:
+ virtual gfx::Size GetPreferredSize() const OVERRIDE {
+ return size_;
+ }
+
+ const gfx::Size size_;
+
+ DISALLOW_COPY_AND_ASSIGN(DummyLogoView);
+};
+
+}
+
AppListViewDelegate::AppListViewDelegate(AppModelBuilder* model_builder)
: model_(new app_list::AppListModel),
speech_ui_(new app_list::SpeechUIModel(
@@ -155,7 +181,7 @@ void AppListViewDelegate::ShowForProfileByPath(
views::View* AppListViewDelegate::CreateStartPageWebView(
const gfx::Size& size) {
- return NULL;
+ return new DummyLogoView(size);
}
views::View* AppListViewDelegate::CreateCustomPageWebView(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698