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

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

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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
Index: mojo/services/native_viewport/platform_viewport.h
diff --git a/mojo/services/native_viewport/platform_viewport.h b/mojo/services/native_viewport/platform_viewport.h
new file mode 100644
index 0000000000000000000000000000000000000000..62594b0ccedf117931e8922469dca77926153aa7
--- /dev/null
+++ b/mojo/services/native_viewport/platform_viewport.h
@@ -0,0 +1,49 @@
+// Copyright 2013 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 SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
+#define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "third_party/mojo_services/src/input_events/public/interfaces/input_events.mojom.h"
+#include "third_party/mojo_services/src/native_viewport/public/interfaces/native_viewport.mojom.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace native_viewport {
+
+// Encapsulation of platform-specific Viewport.
+class PlatformViewport {
+ public:
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+
+ virtual void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) = 0;
+ virtual void OnAcceleratedWidgetAvailable(
+ gfx::AcceleratedWidget widget) = 0;
+ virtual void OnAcceleratedWidgetDestroyed() = 0;
+ virtual bool OnEvent(mojo::EventPtr event) = 0;
+ virtual void OnDestroyed() = 0;
+ };
+
+ virtual ~PlatformViewport() {}
+
+ virtual void Init(const gfx::Rect& bounds) = 0;
+ virtual void Show() = 0;
+ virtual void Hide() = 0;
+ virtual void Close() = 0;
+ virtual gfx::Size GetSize() = 0;
+ virtual void SetBounds(const gfx::Rect& bounds) = 0;
+
+ static scoped_ptr<PlatformViewport> Create(Delegate* delegate);
+};
+
+} // namespace native_viewport
+
+#endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
« no previous file with comments | « mojo/services/native_viewport/onscreen_context_provider.cc ('k') | mojo/services/native_viewport/platform_viewport_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698