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

Unified Diff: athena/screen/background_controller.cc

Issue 302473005: athena: Add a minimal executable for just the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | athena/ui/DEPS » ('j') | athena/ui/athena_ui_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/screen/background_controller.cc
diff --git a/athena/screen/background_controller.cc b/athena/screen/background_controller.cc
index 53cf3e249112ca1da3a27ced2569aab0dec865b9..dd7f6cc4470e44df6ed45140de78213c5b0a12f2 100644
--- a/athena/screen/background_controller.cc
+++ b/athena/screen/background_controller.cc
@@ -25,16 +25,20 @@ class BackgroundView : public views::View {
// views::View
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->DrawImageInt(image_,
- 0,
- 0,
- image_.width(),
- image_.height(),
- 0,
- 0,
- width(),
- height(),
- true);
+ if (!image_.isNull()) {
oshima 2014/05/27 18:32:14 can you set the background using SetupBackgroundIm
sadrul 2014/05/29 03:03:56 Done.
+ canvas->DrawImageInt(image_,
+ 0,
+ 0,
+ image_.width(),
+ image_.height(),
+ 0,
+ 0,
+ width(),
+ height(),
+ true);
+ } else {
+ canvas->DrawColor(SK_ColorRED);
+ }
}
private:
« no previous file with comments | « no previous file | athena/ui/DEPS » ('j') | athena/ui/athena_ui_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698