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

Unified Diff: ui/ozone/common/platform_window_base.h

Issue 375053002: ozone: Port WindowTreeHostOzone on top of PlatformWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto sadrul's CL Created 6 years, 5 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: ui/ozone/common/platform_window_base.h
diff --git a/ui/ozone/common/platform_window_base.h b/ui/ozone/common/platform_window_base.h
new file mode 100644
index 0000000000000000000000000000000000000000..331bed22ab896f14b7a2f79e549055bc62ae302c
--- /dev/null
+++ b/ui/ozone/common/platform_window_base.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2014 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 UI_OZONE_COMMON_PLATFORM_WINDOW_BASE_H_
+#define UI_OZONE_COMMON_PLATFORM_WINDOW_BASE_H_
+
+#include "ui/base/cursor/cursor.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/ozone/ozone_export.h"
+#include "ui/platform_window/platform_window.h"
+
+namespace gfx {
+class Point;
+class Rect;
+}
+
+namespace ui {
+
+class PlatformWindowDelegate;
+
+// Platform window subclass with stubs for most window functions.
+class OZONE_EXPORT PlatformWindowBase : public PlatformWindow {
sadrul 2014/07/14 22:58:07 I don't think we should have this. If we must, we
spang 2014/07/14 23:17:41 Please elaborate - what's the harm? Maximizing doe
sadrul 2014/07/15 16:53:10 The platforms that don't need maximize will have a
+ public:
+ PlatformWindowBase();
+ virtual ~PlatformWindowBase();
+
+ // PlatformWindow:
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual void Close() OVERRIDE;
+ virtual void SetCapture() OVERRIDE;
+ virtual void ReleaseCapture() OVERRIDE;
+ virtual void ToggleFullscreen() OVERRIDE;
+ virtual void Maximize() OVERRIDE;
+ virtual void Minimize() OVERRIDE;
+ virtual void Restore() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PlatformWindowBase);
+};
+
+// This is just transitional code. Will be removed shortly.
+class OZONE_EXPORT PlatformWindowCompat : public PlatformWindowBase {
+ public:
+ PlatformWindowCompat(PlatformWindowDelegate* delegate,
+ const gfx::Rect& bounds);
+ virtual ~PlatformWindowCompat();
+
+ // PlatformWindow:
+ virtual gfx::Rect GetBounds() OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+
+ private:
+ PlatformWindowDelegate* delegate_;
+ gfx::Rect bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(PlatformWindowCompat);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_COMMON_PLATFORM_WINDOW_BASE_H_

Powered by Google App Engine
This is Rietveld 408576698