Commit d86550c0 authored by sadrul@chromium.org's avatar sadrul@chromium.org

athena: Bundle a static background image with athena.

BUG=none
R=oshima@chromium.org

Review URL: https://codereview.chromium.org/443703002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287904 0039d316-1c4b-4281-b951-d872f2087c98
parent c1ee9705
......@@ -125,6 +125,7 @@
'../ui/wm/wm.gyp:wm',
'../url/url.gyp:url_lib',
'athena_lib',
'resources/athena_resources.gyp:athena_resources',
],
'sources': [
'main/athena_launcher.cc',
......
......@@ -12,6 +12,7 @@ include_rules = [
"+components/metrics/proto",
"+components/search_engines",
"+content/public",
"+grit",
"+net",
"+ui/aura",
"+ui/app_list",
......
......@@ -14,6 +14,7 @@
'../athena.gyp:athena_lib',
'../athena.gyp:athena_content_lib',
'../resources/athena_resources.gyp:athena_pak',
'../resources/athena_resources.gyp:athena_resources',
# debug_widow.cc depends on this. Remove this once debug_window
# is removed.
'../../ash/ash_resources.gyp:ash_resources',
......
......@@ -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);
}
<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="0" current_release="1">
<outputs>
<output filename="grit/athena_resources.h" type="rc_header" context="default_100_percent">
<emit emit_type='prepend'></emit>
</output>
<output filename="athena_resources_100_percent.pak" type="data_package" context="default_100_percent" />
<output filename="athena_resources_200_percent.pak" type="data_package" context="default_200_percent" />
</outputs>
<release seq="1">
<structures fallback_to_low_resolution="true">
<!-- KEEP THESE IN ALPHABETICAL ORDER! -->
<structure type="chrome_scaled_image" name="IDR_ATHENA_BACKGROUND" file="background_wallpaper.png" />
</structures>
</release>
</grit>
......@@ -7,6 +7,23 @@
'chromium_code': 1,
},
'targets': [
{
'target_name': 'athena_resources',
'type': 'none',
'variables': {
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/athena/resources',
},
'actions': [
{
'action_name': 'athena_resources',
'variables': {
'grit_grd_file': 'athena_resources.grd',
},
'includes': [ '../../build/grit_action.gypi' ],
},
],
'includes': [ '../../build/grit_target.gypi' ],
},
{
'target_name': 'athena_pak',
'type': 'none',
......@@ -17,6 +34,7 @@
'../../ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings',
'../../webkit/webkit_resources.gyp:webkit_resources',
'../../webkit/webkit_resources.gyp:webkit_strings',
'athena_resources',
],
'actions': [{
'action_name': 'repack_athena_pack',
......@@ -24,6 +42,7 @@
'pak_inputs': [
'<(PRODUCT_DIR)/extensions_shell_and_test.pak',
'<(SHARED_INTERMEDIATE_DIR)/ash/resources/ash_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/athena/resources/athena_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/chromeos/resources/ui_chromeos_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/chromeos/strings/ui_chromeos_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
......
......@@ -54,6 +54,9 @@
"includes": [6100],
"structures": [6150],
},
"athena/resources/athena_resources.grd": {
"structures": [6400],
},
"chrome/app/theme/theme_resources.grd": {
"structures": [6500],
},
......
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