Commit 0ec0a211 authored by mukai@chromium.org's avatar mukai@chromium.org

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
parent ca971bd8
...@@ -19,9 +19,35 @@ ...@@ -19,9 +19,35 @@
#include "ui/app_list/search_result.h" #include "ui/app_list/search_result.h"
#include "ui/app_list/speech_ui_model.h" #include "ui/app_list/speech_ui_model.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
#include "ui/views/background.h"
#include "ui/views/view.h"
namespace athena { 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) AppListViewDelegate::AppListViewDelegate(AppModelBuilder* model_builder)
: model_(new app_list::AppListModel), : model_(new app_list::AppListModel),
speech_ui_(new app_list::SpeechUIModel( speech_ui_(new app_list::SpeechUIModel(
...@@ -155,7 +181,7 @@ void AppListViewDelegate::ShowForProfileByPath( ...@@ -155,7 +181,7 @@ void AppListViewDelegate::ShowForProfileByPath(
views::View* AppListViewDelegate::CreateStartPageWebView( views::View* AppListViewDelegate::CreateStartPageWebView(
const gfx::Size& size) { const gfx::Size& size) {
return NULL; return new DummyLogoView(size);
} }
views::View* AppListViewDelegate::CreateCustomPageWebView( views::View* AppListViewDelegate::CreateCustomPageWebView(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment