OLD | NEW |
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 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ | 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ |
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ | 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ |
7 #pragma once | |
8 | 7 |
9 #include "ash/desktop_background/desktop_background_resources.h" | 8 #include "ash/desktop_background/desktop_background_resources.h" |
10 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
11 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
12 #include "ui/views/widget/widget_delegate.h" | 11 #include "ui/views/widget/widget_delegate.h" |
13 | 12 |
14 namespace ash { | 13 namespace ash { |
15 namespace internal { | 14 namespace internal { |
16 | 15 |
17 class DesktopBackgroundView : public views::WidgetDelegateView { | 16 class DesktopBackgroundView : public views::WidgetDelegateView { |
18 public: | 17 public: |
19 DesktopBackgroundView(); | 18 DesktopBackgroundView(); |
20 virtual ~DesktopBackgroundView(); | 19 virtual ~DesktopBackgroundView(); |
21 | 20 |
22 private: | 21 private: |
23 // Overridden from views::View: | 22 // Overridden from views::View: |
24 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 23 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
25 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 24 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
26 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 25 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
27 | 26 |
28 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView); | 27 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView); |
29 }; | 28 }; |
30 | 29 |
31 } // namespace internal | 30 } // namespace internal |
32 } // namespace ash | 31 } // namespace ash |
33 | 32 |
34 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ | 33 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ |
OLD | NEW |