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

Unified Diff: mojo/examples/aura_demo/window_tree_host_view_manager.h

Issue 313483002: Gets aura_demo working with the view_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 master and fix windows Created 6 years, 7 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/examples/aura_demo/window_tree_host_view_manager.h
diff --git a/mojo/examples/aura_demo/window_tree_host_view_manager.h b/mojo/examples/aura_demo/window_tree_host_view_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..f22cdb61c89e7dc85678df7397492b972b997b61
--- /dev/null
+++ b/mojo/examples/aura_demo/window_tree_host_view_manager.h
@@ -0,0 +1,51 @@
+// Copyright 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 MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
+#define MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
+
+#include "ui/aura/window_tree_host.h"
+#include "ui/events/event_source.h"
+#include "ui/gfx/geometry/rect.h"
+
+namespace mojo {
+namespace examples {
+
+class WindowTreeHostViewManager : public aura::WindowTreeHost,
+ public ui::EventSource {
+ public:
+ explicit WindowTreeHostViewManager(const gfx::Rect& bounds);
+ virtual ~WindowTreeHostViewManager();
+
+ const gfx::Rect& bounds() const { return bounds_; }
+
+ private:
+ // WindowTreeHost:
+ virtual ui::EventSource* GetEventSource() OVERRIDE;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual gfx::Rect GetBounds() const OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+ virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
+ virtual void SetCapture() OVERRIDE;
+ virtual void ReleaseCapture() OVERRIDE;
+ virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+ virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE;
+ virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
+ virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
+
+ // ui::EventSource:
+ virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
+
+ gfx::Rect bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostViewManager);
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
« no previous file with comments | « mojo/examples/aura_demo/view_manager_init.cc ('k') | mojo/examples/aura_demo/window_tree_host_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698