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

Unified Diff: components/exo/surface.h

Issue 1490223002: exo: Use aura::Windows instead of views::Views as exo::Surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and update unit tests Created 5 years 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 | « components/exo/sub_surface_unittest.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/surface.h
diff --git a/components/exo/surface.h b/components/exo/surface.h
index d21b376357d6b01303f720188c4a51869e11b4bd..596fc5eb0f57395f0ec58fbaaff145dab5cd631b 100644
--- a/components/exo/surface.h
+++ b/components/exo/surface.h
@@ -13,9 +13,9 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "third_party/skia/include/core/SkRegion.h"
+#include "ui/aura/window.h"
#include "ui/compositor/compositor_observer.h"
#include "ui/gfx/geometry/rect.h"
-#include "ui/views/view.h"
namespace base {
namespace trace_event {
@@ -30,7 +30,7 @@ class SurfaceObserver;
// This class represents a rectangular area that is displayed on the screen.
// It has a location, size and pixel contents.
-class Surface : public views::View, public ui::CompositorObserver {
+class Surface : public aura::Window, public ui::CompositorObserver {
public:
Surface();
~Surface() override;
@@ -74,6 +74,9 @@ class Surface : public views::View, public ui::CompositorObserver {
// Returns true if surface is in synchronized mode.
bool IsSynchronized() const;
+ // Returns the preferred size of surface.
+ gfx::Size GetPreferredSize() const;
+
// Set the surface delegate.
void SetSurfaceDelegate(SurfaceDelegate* delegate);
@@ -91,9 +94,6 @@ class Surface : public views::View, public ui::CompositorObserver {
bool HasPendingDamageForTesting() const { return !pending_damage_.IsEmpty(); }
- // Overridden from views::View:
- gfx::Size GetPreferredSize() const override;
-
// Overridden from ui::CompositorObserver:
void OnCompositingDidCommit(ui::Compositor* compositor) override;
void OnCompositingStarted(ui::Compositor* compositor,
« no previous file with comments | « components/exo/sub_surface_unittest.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698