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
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user