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

Side by Side Diff: ash/desktop_background/desktop_background_view.cc

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "ash/desktop_background/desktop_background_view.h" 5 #include "ash/desktop_background/desktop_background_view.h"
6 6
7 #include "ash/ash_export.h" 7 #include "ash/ash_export.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "grit/ui_resources.h" 11 #include "grit/ui_resources.h"
12 #include "ui/aura/root_window.h" 12 #include "ui/aura/root_window.h"
13 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/canvas.h" 14 #include "ui/gfx/canvas.h"
15 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
16 16
17 namespace aura_shell { 17 namespace ash {
18 namespace internal { 18 namespace internal {
19 19
20 //////////////////////////////////////////////////////////////////////////////// 20 ////////////////////////////////////////////////////////////////////////////////
21 // DesktopBackgroundView, public: 21 // DesktopBackgroundView, public:
22 22
23 DesktopBackgroundView::DesktopBackgroundView() { 23 DesktopBackgroundView::DesktopBackgroundView() {
24 wallpaper_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( 24 wallpaper_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed(
25 IDR_AURA_WALLPAPER); 25 IDR_AURA_WALLPAPER);
26 wallpaper_.buildMipMap(false); 26 wallpaper_.buildMipMap(false);
27 } 27 }
(...skipping 20 matching lines...) Expand all
48 } 48 }
49 49
50 views::Widget* CreateDesktopBackground() { 50 views::Widget* CreateDesktopBackground() {
51 views::Widget* desktop_widget = new views::Widget; 51 views::Widget* desktop_widget = new views::Widget;
52 views::Widget::InitParams params( 52 views::Widget::InitParams params(
53 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 53 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
54 DesktopBackgroundView* view = new DesktopBackgroundView; 54 DesktopBackgroundView* view = new DesktopBackgroundView;
55 params.delegate = view; 55 params.delegate = view;
56 desktop_widget->Init(params); 56 desktop_widget->Init(params);
57 Shell::GetInstance()->GetContainer( 57 Shell::GetInstance()->GetContainer(
58 aura_shell::internal::kShellWindowId_DesktopBackgroundContainer)-> 58 ash::internal::kShellWindowId_DesktopBackgroundContainer)->
59 AddChild(desktop_widget->GetNativeView()); 59 AddChild(desktop_widget->GetNativeView());
60 desktop_widget->SetContentsView(view); 60 desktop_widget->SetContentsView(view);
61 desktop_widget->Show(); 61 desktop_widget->Show();
62 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); 62 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
63 return desktop_widget; 63 return desktop_widget;
64 } 64 }
65 65
66 } // namespace internal 66 } // namespace internal
67 } // namespace aura_shell 67 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698