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

Side by Side Diff: ash/surfaces/test_surface_overlay_view.h

Issue 1394573003: chromeos: Add SurfaceServiceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « ash/surfaces/surface_controller.cc ('k') | ash/surfaces/test_surface_overlay_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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_TEST_SURFACE_OVERLAY_SURFACE_OVERLAY_VIEW_H_
6 #define ASH_TEST_SURFACE_OVERLAY_SURFACE_OVERLAY_VIEW_H_
7
8 #include "ash/surfaces/surface_controller.h"
9 #include "ash/wm/overlay_event_filter.h"
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "ui/views/view.h"
14 #include "ui/views/widget/widget.h"
15 #include "ui/views/widget/widget_delegate.h"
16
17 namespace cc {
18 class ContentProvider;
19 }
20
21 namespace ui {
22 class Layer;
23 }
24
25 namespace ash {
26
27 class TestSurfaceOverlayView : public views::WidgetDelegateView,
denniskempin (chromium) 2015/10/09 21:16:24 I know this code is WIP, just wanted to leave this
28 public OverlayEventFilter::Delegate,
29 public SurfaceController::Observer {
30 public:
31 TestSurfaceOverlayView();
32 ~TestSurfaceOverlayView() override;
33
34 // Overridden from ui::EventHandler:
35 void OnKeyEvent(ui::KeyEvent* event) override;
36 void OnMouseEvent(ui::MouseEvent* event) override;
37 void OnScrollEvent(ui::ScrollEvent* event) override;
38 void OnGestureEvent(ui::GestureEvent* event) override;
39
40 // Overridden from views::View:
41 void OnPaint(gfx::Canvas* canvas) override;
42
43 // Overridden from views::WidgetDelegate:
44 void WindowClosing() override;
45
46 // Overridden from ash::OverlayEventFilter::Delegate:
47 void Cancel() override;
48 bool IsCancelingKeyEvent(ui::KeyEvent* event) override;
49 aura::Window* GetWindow() override;
50
51 // Overridden from SurfaceOverlayController::Observer:
52 void OnTestSurfaceGpuMemoryBufferChanged() override;
53
54 // Shows the test surface overlay.
55 static void Show();
56
57 private:
58 void TextureReleased(scoped_refptr<cc::ContextProvider> context_provider,
59 unsigned image_id,
60 unsigned texture_id,
61 uint32 sync_point,
62 bool is_lost);
63
64 scoped_ptr<ui::Layer> test_surface_layer_;
65
66 base::WeakPtrFactory<TestSurfaceOverlayView> weak_ptr_factory_;
67
68 DISALLOW_COPY_AND_ASSIGN(TestSurfaceOverlayView);
69 };
70
71 } // namespace ash
72
73 #endif // ASH_SURFACES_TEST_SURFACE_OVERLAY_VIEW_H_
OLDNEW
« no previous file with comments | « ash/surfaces/surface_controller.cc ('k') | ash/surfaces/test_surface_overlay_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698