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

Unified Diff: mojo/services/native_viewport/native_viewport.h

Issue 59383011: Factor common code into native_viewport_controller.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix X11 Created 7 years, 1 month 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
Index: mojo/services/native_viewport/native_viewport.h
diff --git a/mojo/services/native_viewport/native_viewport.h b/mojo/services/native_viewport/native_viewport.h
index f2f2692ebcabb48e87d2b00f4dbc562145c09f39..97a2372a310b3099576f0d8739ba6bec87d38195 100644
--- a/mojo/services/native_viewport/native_viewport.h
+++ b/mojo/services/native_viewport/native_viewport.h
@@ -6,12 +6,11 @@
#define MOJO_SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_H_
#include "base/memory/scoped_ptr.h"
-
-namespace gfx {
-class Size;
-}
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/rect.h"
namespace gpu {
+class GLInProcessContext;
namespace gles2 {
class GLES2Interface;
}
@@ -42,12 +41,23 @@ class NativeViewportDelegate {
// Encapsulation of platform-specific Viewport.
class NativeViewport {
public:
- virtual ~NativeViewport() {}
+ virtual ~NativeViewport();
virtual void Close() = 0;
static scoped_ptr<NativeViewport> Create(shell::Context* context,
NativeViewportDelegate* delegate);
+
+ protected:
+ explicit NativeViewport(NativeViewportDelegate* delegate);
+
+ void OnAcceleratedWidgetAvailable();
Ben Goodger (Google) 2013/11/06 07:17:17 wdyt about this stuff being the responsibility of
abarth-chromium 2013/11/06 15:40:55 It depends on whether we're going to have the obje
+ void OnGLContextLost();
+
+ NativeViewportDelegate* delegate_;
+ gfx::Rect bounds_;
+ gfx::AcceleratedWidget widget_;
+ scoped_ptr<gpu::GLInProcessContext> gl_context_;
};
} // namespace services

Powered by Google App Engine
This is Rietveld 408576698