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

Unified Diff: athena/home/app_list_view_delegate.cc

Issue 515723003: Shows the static logo image in athena home card. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « athena/home/DEPS ('k') | athena/home/athena_start_page_view.cc » ('j') | 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 c86736461bcb12e71ea82af654ea3c1c03bd3695..d4a7f531d6ec4b329fe150bb845f65890fb5eb36 100644
--- a/athena/home/app_list_view_delegate.cc
+++ b/athena/home/app_list_view_delegate.cc
@@ -19,36 +19,13 @@
#include "ui/app_list/search_provider.h"
#include "ui/app_list/search_result.h"
#include "ui/app_list/speech_ui_model.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
-#include "ui/views/background.h"
-#include "ui/views/view.h"
+#include "ui/resources/grit/ui_resources.h"
+#include "ui/views/controls/image_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(
@@ -182,7 +159,14 @@ void AppListViewDelegate::ShowForProfileByPath(
views::View* AppListViewDelegate::CreateStartPageWebView(
const gfx::Size& size) {
- return new DummyLogoView(size);
+ // A static image of the logo. This needs to support dynamic Doodles
+ // eventually.
+ views::ImageView* logo_image = new views::ImageView();
+ logo_image->SetImage(ui::ResourceBundle::GetSharedInstance().
+ GetImageSkiaNamed(IDR_LOCAL_NTP_IMAGES_LOGO_PNG));
+ logo_image->SetHorizontalAlignment(views::ImageView::CENTER);
+ logo_image->SetVerticalAlignment(views::ImageView::CENTER);
+ return logo_image;
}
std::vector<views::View*> AppListViewDelegate::CreateCustomPageWebViews(
« no previous file with comments | « athena/home/DEPS ('k') | athena/home/athena_start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698