| 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_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ | |
| 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_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 DesktopBackgroundView : public views::View, | |
| 19 public views::ContextMenuController { | |
| 20 public: | |
| 21 DesktopBackgroundView(); | |
| 22 ~DesktopBackgroundView() override; | |
| 23 | |
| 24 private: | |
| 25 friend class DesktopBackgroundControllerTest; | |
| 26 | |
| 27 // Overridden from views::View: | |
| 28 void OnPaint(gfx::Canvas* canvas) override; | |
| 29 bool OnMousePressed(const ui::MouseEvent& event) override; | |
| 30 | |
| 31 // Overridden from views::ContextMenuController: | |
| 32 void ShowContextMenuForView(views::View* source, | |
| 33 const gfx::Point& point, | |
| 34 ui::MenuSourceType source_type) override; | |
| 35 std::unique_ptr<PreEventDispatchHandler> pre_dispatch_handler_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView); | |
| 38 }; | |
| 39 | |
| 40 views::Widget* CreateDesktopBackground(WmWindow* root_window, int container_id); | |
| 41 | |
| 42 } // namespace ash | |
| 43 | |
| 44 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ | |
| OLD | NEW |