| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura_shell/desktop_background_view.h" | 5 #include "ui/aura_shell/desktop_background_view.h" |
| 6 | 6 |
| 7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
| 8 #include "ui/aura/desktop.h" | 8 #include "ui/aura/desktop.h" |
| 9 #include "ui/aura_shell/aura_shell_export.h" | 9 #include "ui/aura_shell/aura_shell_export.h" |
| 10 #include "ui/aura_shell/sample_window.h" | 10 #include "ui/aura_shell/sample_window.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 AURA_SHELL_EXPORT views::Widget* CreateDesktopBackground() { | 44 AURA_SHELL_EXPORT views::Widget* CreateDesktopBackground() { |
| 45 views::Widget* desktop_widget = new views::Widget; | 45 views::Widget* desktop_widget = new views::Widget; |
| 46 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); | 46 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); |
| 47 params.bounds = gfx::Rect(0, 0, 1024, 768); | 47 params.bounds = gfx::Rect(0, 0, 1024, 768); |
| 48 params.parent = aura::Desktop::GetInstance()->window(); | 48 params.parent = aura::Desktop::GetInstance()->window(); |
| 49 DesktopBackgroundView* view = new DesktopBackgroundView; | 49 DesktopBackgroundView* view = new DesktopBackgroundView; |
| 50 params.delegate = view; | 50 params.delegate = view; |
| 51 desktop_widget->Init(params); | 51 desktop_widget->Init(params); |
| 52 desktop_widget->SetContentsView(view); | 52 desktop_widget->SetContentsView(view); |
| 53 desktop_widget->Show(); | 53 desktop_widget->Show(); |
| 54 desktop_widget->GetNativeView()->set_name(L"DesktopBackgroundView"); |
| 54 return desktop_widget; | 55 return desktop_widget; |
| 55 } | 56 } |
| 56 | 57 |
| 57 } // namespace internal | 58 } // namespace internal |
| 58 } // namespace aura_shell | 59 } // namespace aura_shell |
| OLD | NEW |