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

Unified Diff: ui/aura_shell/desktop_background_view.cc

Issue 7903018: More shell content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
Index: ui/aura_shell/desktop_background_view.cc
===================================================================
--- ui/aura_shell/desktop_background_view.cc (revision 101374)
+++ ui/aura_shell/desktop_background_view.cc (working copy)
@@ -5,17 +5,21 @@
#include "ui/aura_shell/desktop_background_view.h"
#include "grit/ui_resources.h"
+#include "ui/aura/desktop.h"
+#include "ui/aura_shell/sample_window.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
+#include "views/widget/widget.h"
+namespace aura_shell {
+namespace internal {
+
////////////////////////////////////////////////////////////////////////////////
// DesktopBackgroundView, public:
DesktopBackgroundView::DesktopBackgroundView() {
- /*
wallpaper_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_AURA_WALLPAPER);
- */
}
DesktopBackgroundView::~DesktopBackgroundView() {
@@ -25,9 +29,30 @@
// DesktopBackgroundView, views::View overrides:
void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
- //canvas->TileImageInt(wallpaper_, 0, 0, width(), height());
+ canvas->TileImageInt(wallpaper_, 0, 0, width(), height());
}
void DesktopBackgroundView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
LOG(WARNING) << "Here";
}
+
+bool DesktopBackgroundView::OnMousePressed(const views::MouseEvent& event) {
+ SampleWindow::CreateSampleWindow();
+ return true;
+}
+
+views::Widget* CreateDesktopBackground() {
tfarina 2011/09/16 16:28:43 Include ui/aura_shell/shell_factory.h for this?
+ views::Widget* desktop_widget = new views::Widget;
+ views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
+ params.bounds = gfx::Rect(0, 0, 1024, 768);
+ params.parent = aura::Desktop::GetInstance()->window();
+ DesktopBackgroundView* view = new DesktopBackgroundView;
+ params.delegate = view;
+ desktop_widget->Init(params);
+ desktop_widget->SetContentsView(view);
+ desktop_widget->Show();
+ return desktop_widget;
+}
+
+} // namespace internal
+} // namespace aura_shell

Powered by Google App Engine
This is Rietveld 408576698