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

Side by Side Diff: mojo/aura/window_tree_host_mojo.h

Issue 315223004: Moves view_manager files to view_manager directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm sample_view_manager.app again Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/aura/context_factory_mojo.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
6 #define MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
7
8 #include "base/bind.h"
9 #include "mojo/services/native_viewport/native_viewport.mojom.h"
10 #include "ui/aura/window_tree_host.h"
11 #include "ui/events/event_source.h"
12 #include "ui/gfx/rect.h"
13
14 namespace ui {
15 class ContextFactory;
16 }
17
18 namespace mojo {
19
20 class ContextFactoryMojo;
21
22 class WindowTreeHostMojo : public aura::WindowTreeHost,
23 public ui::EventSource,
24 public NativeViewportClient {
25 public:
26 WindowTreeHostMojo(NativeViewportPtr viewport,
27 const gfx::Rect& bounds,
28 const base::Callback<void()>& compositor_created_callback);
29 virtual ~WindowTreeHostMojo();
30
31 gfx::Rect bounds() const { return bounds_; }
32
33 private:
34 // WindowTreeHost:
35 virtual ui::EventSource* GetEventSource() OVERRIDE;
36 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
37 virtual void Show() OVERRIDE;
38 virtual void Hide() OVERRIDE;
39 virtual gfx::Rect GetBounds() const OVERRIDE;
40 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
41 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
42 virtual void SetCapture() OVERRIDE;
43 virtual void ReleaseCapture() OVERRIDE;
44 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
45 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
46 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE;
47 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE;
48 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
49
50 // ui::EventSource:
51 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
52
53 // Overridden from NativeViewportClient:
54 virtual void OnCreated() OVERRIDE;
55 virtual void OnDestroyed() OVERRIDE;
56 virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE;
57 virtual void OnEvent(EventPtr event,
58 const mojo::Callback<void()>& callback) OVERRIDE;
59
60 static ContextFactoryMojo* context_factory_;
61
62 NativeViewportPtr native_viewport_;
63 base::Callback<void()> compositor_created_callback_;
64
65 gfx::Rect bounds_;
66
67 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo);
68 };
69
70 } // namespace mojo
71
72 #endif // MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
OLDNEW
« no previous file with comments | « mojo/aura/context_factory_mojo.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698