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

Unified Diff: athena/main/placeholder.cc

Issue 443703002: athena: Bundle a static background image with athena. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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/main/athena_main.gyp ('k') | athena/resources/athena_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/placeholder.cc
diff --git a/athena/main/placeholder.cc b/athena/main/placeholder.cc
index c3c907e3f53ac3dc19459ae2f3e9736817fb3ff4..ba93ce87142ef6894382832d705b090c2400e060 100644
--- a/athena/main/placeholder.cc
+++ b/athena/main/placeholder.cc
@@ -7,11 +7,9 @@
#include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h"
#include "athena/screen/public/screen_manager.h"
-#include "base/memory/scoped_ptr.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/gfx/canvas.h"
+#include "grit/athena_resources.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
-#include "ui/views/painter.h"
void CreateTestPages(content::BrowserContext* browser_context) {
const char* kTestURLs[] = {
@@ -26,11 +24,7 @@ void CreateTestPages(content::BrowserContext* browser_context) {
}
void SetupBackgroundImage() {
- gfx::Size size(200, 200);
- gfx::Canvas canvas(size, 1.0f, true);
- scoped_ptr<views::Painter> painter(
- views::Painter::CreateVerticalGradient(SK_ColorBLUE, SK_ColorCYAN));
- painter->Paint(&canvas, size);
- athena::ScreenManager::Get()->SetBackgroundImage(
- gfx::ImageSkia(canvas.ExtractImageRep()));
+ const gfx::ImageSkia wallpaper = *ui::ResourceBundle::GetSharedInstance()
+ .GetImageSkiaNamed(IDR_ATHENA_BACKGROUND);
+ athena::ScreenManager::Get()->SetBackgroundImage(wallpaper);
}
« no previous file with comments | « athena/main/athena_main.gyp ('k') | athena/resources/athena_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698