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

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

Issue 2200893002: mash: Partially migrate ash/desktop_background to ash common types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mash browser test crash in GetMaxDisplaySizeInNative. Created 4 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
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 #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 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h"
11 #include "ui/events/event.h"
12 #include "ui/gfx/image/image_skia.h"
13 #include "ui/views/context_menu_controller.h" 10 #include "ui/views/context_menu_controller.h"
14 #include "ui/views/view.h" 11 #include "ui/views/view.h"
15 12
16 namespace ash { 13 namespace ash {
17 14
18 class PreEventDispatchHandler; 15 class PreEventDispatchHandler;
16 class WmWindow;
19 17
20 class DesktopBackgroundView : public views::View, 18 class DesktopBackgroundView : public views::View,
21 public views::ContextMenuController { 19 public views::ContextMenuController {
22 public: 20 public:
23 DesktopBackgroundView(); 21 DesktopBackgroundView();
24 ~DesktopBackgroundView() override; 22 ~DesktopBackgroundView() override;
25 23
26 private: 24 private:
27 friend class DesktopBackgroundControllerTest; 25 friend class DesktopBackgroundControllerTest;
28 26
29 // Overridden from views::View: 27 // Overridden from views::View:
30 void OnPaint(gfx::Canvas* canvas) override; 28 void OnPaint(gfx::Canvas* canvas) override;
31 bool OnMousePressed(const ui::MouseEvent& event) override; 29 bool OnMousePressed(const ui::MouseEvent& event) override;
32 30
33 // Overridden from views::ContextMenuController: 31 // Overridden from views::ContextMenuController:
34 void ShowContextMenuForView(views::View* source, 32 void ShowContextMenuForView(views::View* source,
35 const gfx::Point& point, 33 const gfx::Point& point,
36 ui::MenuSourceType source_type) override; 34 ui::MenuSourceType source_type) override;
37 std::unique_ptr<PreEventDispatchHandler> pre_dispatch_handler_; 35 std::unique_ptr<PreEventDispatchHandler> pre_dispatch_handler_;
38 36
39 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView); 37 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView);
40 }; 38 };
41 39
40 views::Widget* CreateDesktopBackground(WmWindow* root_window, int container_id);
41
42 } // namespace ash 42 } // namespace ash
43 43
44 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_ 44 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_controller_unittest.cc ('k') | ash/desktop_background/desktop_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698