| 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_WALLPAPER_WALLPAPER_VIEW_H_ | 5 #ifndef ASH_WALLPAPER_WALLPAPER_VIEW_H_ |
| 6 #define ASH_WALLPAPER_WALLPAPER_VIEW_H_ | 6 #define ASH_WALLPAPER_WALLPAPER_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ui/views/context_menu_controller.h" | 10 #include "ui/views/context_menu_controller.h" |
| 11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
| 12 | 12 |
| 13 namespace aura { |
| 14 class Window; |
| 15 } |
| 16 |
| 13 namespace ash { | 17 namespace ash { |
| 14 | 18 |
| 15 class PreEventDispatchHandler; | 19 class PreEventDispatchHandler; |
| 16 class WmWindow; | |
| 17 | 20 |
| 18 class WallpaperView : public views::View, public views::ContextMenuController { | 21 class WallpaperView : public views::View, public views::ContextMenuController { |
| 19 public: | 22 public: |
| 20 WallpaperView(); | 23 WallpaperView(); |
| 21 ~WallpaperView() override; | 24 ~WallpaperView() override; |
| 22 | 25 |
| 23 private: | 26 private: |
| 24 friend class WallpaperControllerTest; | 27 friend class WallpaperControllerTest; |
| 25 | 28 |
| 26 // Overridden from views::View: | 29 // Overridden from views::View: |
| 27 void OnPaint(gfx::Canvas* canvas) override; | 30 void OnPaint(gfx::Canvas* canvas) override; |
| 28 bool OnMousePressed(const ui::MouseEvent& event) override; | 31 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 29 | 32 |
| 30 // Overridden from views::ContextMenuController: | 33 // Overridden from views::ContextMenuController: |
| 31 void ShowContextMenuForView(views::View* source, | 34 void ShowContextMenuForView(views::View* source, |
| 32 const gfx::Point& point, | 35 const gfx::Point& point, |
| 33 ui::MenuSourceType source_type) override; | 36 ui::MenuSourceType source_type) override; |
| 34 std::unique_ptr<PreEventDispatchHandler> pre_dispatch_handler_; | 37 std::unique_ptr<PreEventDispatchHandler> pre_dispatch_handler_; |
| 35 | 38 |
| 36 DISALLOW_COPY_AND_ASSIGN(WallpaperView); | 39 DISALLOW_COPY_AND_ASSIGN(WallpaperView); |
| 37 }; | 40 }; |
| 38 | 41 |
| 39 views::Widget* CreateWallpaper(WmWindow* root_window, int container_id); | 42 views::Widget* CreateWallpaper(aura::Window* root_window, int container_id); |
| 40 | 43 |
| 41 } // namespace ash | 44 } // namespace ash |
| 42 | 45 |
| 43 #endif // ASH_WALLPAPER_WALLPAPER_VIEW_H_ | 46 #endif // ASH_WALLPAPER_WALLPAPER_VIEW_H_ |
| OLD | NEW |