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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <limits> 7 #include <limits>
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // This is generally not recommended as it may show artifacts. 119 // This is generally not recommended as it may show artifacts.
120 canvas->DrawImageInt(wallpaper, 0, 0, wallpaper.width(), 120 canvas->DrawImageInt(wallpaper, 0, 0, wallpaper.width(),
121 wallpaper.height(), 0, 0, width(), height(), true); 121 wallpaper.height(), 0, 0, width(), height(), true);
122 } else { 122 } else {
123 // All other are simply centered, and not scaled (but may be clipped). 123 // All other are simply centered, and not scaled (but may be clipped).
124 canvas->DrawImageInt(wallpaper, (width() - wallpaper.width()) / 2, 124 canvas->DrawImageInt(wallpaper, (width() - wallpaper.width()) / 2,
125 (height() - wallpaper.height()) / 2); 125 (height() - wallpaper.height()) / 2);
126 } 126 }
127 } 127 }
128 128
129 bool DesktopBackgroundView::OnMousePressed(const views::MouseEvent& event) { 129 bool DesktopBackgroundView::OnMousePressed(const ui::MouseEvent& event) {
130 return true; 130 return true;
131 } 131 }
132 132
133 void DesktopBackgroundView::ShowContextMenuForView(views::View* source, 133 void DesktopBackgroundView::ShowContextMenuForView(views::View* source,
134 const gfx::Point& point) { 134 const gfx::Point& point) {
135 Shell::GetInstance()->ShowBackgroundMenu(GetWidget(), point); 135 Shell::GetInstance()->ShowBackgroundMenu(GetWidget(), point);
136 } 136 }
137 137
138 views::Widget* CreateDesktopBackground(aura::RootWindow* root_window, 138 views::Widget* CreateDesktopBackground(aura::RootWindow* root_window,
139 int container_id) { 139 int container_id) {
(...skipping 22 matching lines...) Expand all
162 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, 162 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window,
163 container_id, 163 container_id,
164 desktop_widget)); 164 desktop_widget));
165 desktop_widget->Show(); 165 desktop_widget->Show();
166 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); 166 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
167 return desktop_widget; 167 return desktop_widget;
168 } 168 }
169 169
170 } // namespace internal 170 } // namespace internal
171 } // namespace ash 171 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_view.h ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698