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

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

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
« no previous file with comments | « mojo/examples/aura_demo/window_tree_host_view_manager.h ('k') | mojo/mojo.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/aura_demo/window_tree_host_view_manager.cc
diff --git a/mojo/examples/aura_demo/window_tree_host_view_manager.cc b/mojo/examples/aura_demo/window_tree_host_view_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..030e51a57558f7992a3d2dd6c0453023bfd10cfb
--- /dev/null
+++ b/mojo/examples/aura_demo/window_tree_host_view_manager.cc
@@ -0,0 +1,96 @@
+// 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.
+
+#include "mojo/examples/aura_demo/window_tree_host_view_manager.h"
+
+#include "ui/aura/window.h"
+#include "ui/aura/window_event_dispatcher.h"
+#include "ui/events/event.h"
+#include "ui/events/event_constants.h"
+
+namespace mojo {
+namespace examples {
+
+////////////////////////////////////////////////////////////////////////////////
+// WindowTreeHostViewManager, public:
+
+WindowTreeHostViewManager::WindowTreeHostViewManager(const gfx::Rect& bounds)
+ : bounds_(bounds) {
+ CreateCompositor(GetAcceleratedWidget());
+}
+
+WindowTreeHostViewManager::~WindowTreeHostViewManager() {
+ DestroyCompositor();
+ DestroyDispatcher();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// WindowTreeHostViewManager, aura::WindowTreeHost implementation:
+
+ui::EventSource* WindowTreeHostViewManager::GetEventSource() {
+ return this;
+}
+
+gfx::AcceleratedWidget WindowTreeHostViewManager::GetAcceleratedWidget() {
+ NOTIMPLEMENTED() << "GetAcceleratedWidget";
+ return gfx::kNullAcceleratedWidget;
+}
+
+void WindowTreeHostViewManager::Show() {
+ window()->Show();
+}
+
+void WindowTreeHostViewManager::Hide() {
+}
+
+gfx::Rect WindowTreeHostViewManager::GetBounds() const {
+ return bounds_;
+}
+
+void WindowTreeHostViewManager::SetBounds(const gfx::Rect& bounds) {
+}
+
+gfx::Point WindowTreeHostViewManager::GetLocationOnNativeScreen() const {
+ return gfx::Point(0, 0);
+}
+
+void WindowTreeHostViewManager::SetCapture() {
+ NOTIMPLEMENTED();
+}
+
+void WindowTreeHostViewManager::ReleaseCapture() {
+ NOTIMPLEMENTED();
+}
+
+void WindowTreeHostViewManager::PostNativeEvent(
+ const base::NativeEvent& native_event) {
+ NOTIMPLEMENTED();
+}
+
+void WindowTreeHostViewManager::OnDeviceScaleFactorChanged(
+ float device_scale_factor) {
+ NOTIMPLEMENTED();
+}
+
+void WindowTreeHostViewManager::SetCursorNative(gfx::NativeCursor cursor) {
+ NOTIMPLEMENTED();
+}
+
+void WindowTreeHostViewManager::MoveCursorToNative(const gfx::Point& location) {
+ NOTIMPLEMENTED();
+}
+
+void WindowTreeHostViewManager::OnCursorVisibilityChangedNative(bool show) {
+ NOTIMPLEMENTED();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// WindowTreeHostViewManager, ui::EventSource implementation:
+
+ui::EventProcessor* WindowTreeHostViewManager::GetEventProcessor() {
+ return dispatcher();
+}
+
+} // namespace examples
+} // namespace mojo
« no previous file with comments | « mojo/examples/aura_demo/window_tree_host_view_manager.h ('k') | mojo/mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698