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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/surfaces/test_surface_overlay_view.h
diff --git a/ash/surfaces/test_surface_overlay_view.h b/ash/surfaces/test_surface_overlay_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..e114c7a0cd81959ba156a4297acde9e7f79cad4b
--- /dev/null
+++ b/ash/surfaces/test_surface_overlay_view.h
@@ -0,0 +1,73 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_TEST_SURFACE_OVERLAY_SURFACE_OVERLAY_VIEW_H_
+#define ASH_TEST_SURFACE_OVERLAY_SURFACE_OVERLAY_VIEW_H_
+
+#include "ash/surfaces/surface_controller.h"
+#include "ash/wm/overlay_event_filter.h"
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/views/view.h"
+#include "ui/views/widget/widget.h"
+#include "ui/views/widget/widget_delegate.h"
+
+namespace cc {
+class ContentProvider;
+}
+
+namespace ui {
+class Layer;
+}
+
+namespace ash {
+
+class TestSurfaceOverlayView : public views::WidgetDelegateView,
denniskempin (chromium) 2015/10/09 21:16:24 I know this code is WIP, just wanted to leave this
+ public OverlayEventFilter::Delegate,
+ public SurfaceController::Observer {
+ public:
+ TestSurfaceOverlayView();
+ ~TestSurfaceOverlayView() override;
+
+ // Overridden from ui::EventHandler:
+ void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnScrollEvent(ui::ScrollEvent* event) override;
+ void OnGestureEvent(ui::GestureEvent* event) override;
+
+ // Overridden from views::View:
+ void OnPaint(gfx::Canvas* canvas) override;
+
+ // Overridden from views::WidgetDelegate:
+ void WindowClosing() override;
+
+ // Overridden from ash::OverlayEventFilter::Delegate:
+ void Cancel() override;
+ bool IsCancelingKeyEvent(ui::KeyEvent* event) override;
+ aura::Window* GetWindow() override;
+
+ // Overridden from SurfaceOverlayController::Observer:
+ void OnTestSurfaceGpuMemoryBufferChanged() override;
+
+ // Shows the test surface overlay.
+ static void Show();
+
+ private:
+ void TextureReleased(scoped_refptr<cc::ContextProvider> context_provider,
+ unsigned image_id,
+ unsigned texture_id,
+ uint32 sync_point,
+ bool is_lost);
+
+ scoped_ptr<ui::Layer> test_surface_layer_;
+
+ base::WeakPtrFactory<TestSurfaceOverlayView> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestSurfaceOverlayView);
+};
+
+} // namespace ash
+
+#endif // ASH_SURFACES_TEST_SURFACE_OVERLAY_VIEW_H_
« 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