summaryrefslogtreecommitdiffstats
path: root/athena
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-08 01:38:21 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-08 02:02:54 +0000
commit0ec0a2110d68234c42bd8bee25fcc6df2c2168bf (patch)
treeffed8910beba7dcc69ac12bed5bb3fcfa47a50a8 /athena
parentca971bd82791739ac6deb5b29bd3c25b9bd0f438 (diff)
downloadchromium_src-0ec0a2110d68234c42bd8bee25fcc6df2c2168bf.zip
chromium_src-0ec0a2110d68234c42bd8bee25fcc6df2c2168bf.tar.gz
chromium_src-0ec0a2110d68234c42bd8bee25fcc6df2c2168bf.tar.bz2
Creates a dummy view to occupy the logo area of athena home card.
As is discussed in the bug, it is important to occupy certain area for logo mark in the home card, otherwise the area for the search results is restricted. Actual experimental app-list uses start_page webview for this, which embeds the logo from our resource data. I think it's better to create a dummy view with flat background instead of loading the resource image to emphasize this is still work-in-progress. BUG=400153 R=oshima@chromium.org TEST=none Review URL: https://codereview.chromium.org/441123002 Cr-Commit-Position: refs/heads/master@{#288199} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena')
-rw-r--r--athena/home/app_list_view_delegate.cc28
1 files changed, 27 insertions, 1 deletions
diff --git a/athena/home/app_list_view_delegate.cc b/athena/home/app_list_view_delegate.cc
index bd85eca..5180022 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(