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