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

Side by Side Diff: ui/aura_shell/desktop_background_view.cc

Issue 8381015: Add workspace to desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily exlucde tests failing on win Created 9 years, 1 month 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
« no previous file with comments | « ui/aura_shell/default_container_layout_manager_unittest.cc ('k') | ui/aura_shell/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/aura_shell/desktop_background_view.h" 5 #include "ui/aura_shell/desktop_background_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "ui/aura/desktop.h" 9 #include "ui/aura/desktop.h"
10 #include "ui/aura_shell/aura_shell_export.h" 10 #include "ui/aura_shell/aura_shell_export.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) { 34 void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
35 canvas->TileImageInt(wallpaper_, 0, 0, width(), height()); 35 canvas->TileImageInt(wallpaper_, 0, 0, width(), height());
36 } 36 }
37 37
38 bool DesktopBackgroundView::OnMousePressed(const views::MouseEvent& event) { 38 bool DesktopBackgroundView::OnMousePressed(const views::MouseEvent& event) {
39 return true; 39 return true;
40 } 40 }
41 41
42 void DesktopBackgroundView::OnMouseReleased(const views::MouseEvent& event) { 42 void DesktopBackgroundView::OnMouseReleased(const views::MouseEvent& event) {
43 Shell::GetInstance()->TileWindows(); 43 Shell::GetInstance()->ToggleOverview();
44 } 44 }
45 45
46 views::Widget* CreateDesktopBackground() { 46 views::Widget* CreateDesktopBackground() {
47 views::Widget* desktop_widget = new views::Widget; 47 views::Widget* desktop_widget = new views::Widget;
48 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); 48 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
49 params.parent = Shell::GetInstance()->GetContainer( 49 params.parent = Shell::GetInstance()->GetContainer(
50 aura_shell::internal::kShellWindowId_DesktopBackgroundContainer); 50 aura_shell::internal::kShellWindowId_DesktopBackgroundContainer);
51 DesktopBackgroundView* view = new DesktopBackgroundView; 51 DesktopBackgroundView* view = new DesktopBackgroundView;
52 params.delegate = view; 52 params.delegate = view;
53 desktop_widget->Init(params); 53 desktop_widget->Init(params);
54 desktop_widget->SetContentsView(view); 54 desktop_widget->SetContentsView(view);
55 desktop_widget->Show(); 55 desktop_widget->Show();
56 desktop_widget->GetNativeView()->set_name("DesktopBackgroundView"); 56 desktop_widget->GetNativeView()->set_name("DesktopBackgroundView");
57 return desktop_widget; 57 return desktop_widget;
58 } 58 }
59 59
60 } // namespace internal 60 } // namespace internal
61 } // namespace aura_shell 61 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/default_container_layout_manager_unittest.cc ('k') | ui/aura_shell/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698