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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « mojo/aura/surface_context_factory.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 2014 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_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
6 #define MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
7
8 #include "base/macros.h"
9 #include "mojo/services/view_manager/public/cpp/view_observer.h"
10 #include "ui/aura/window_tree_host.h"
11 #include "ui/events/event_source.h"
12 #include "ui/gfx/geometry/rect.h"
13
14 class SkBitmap;
15
16 namespace ui {
17 class Compositor;
18 }
19
20 namespace mojo {
21
22 class Shell;
23 class SurfaceContextFactory;
24
25 class WindowTreeHostMojo : public aura::WindowTreeHost,
26 public ui::EventSource,
27 public ViewObserver {
28 public:
29 WindowTreeHostMojo(Shell* shell, View* view);
30 ~WindowTreeHostMojo() override;
31
32 const gfx::Rect& bounds() const { return bounds_; }
33
34 ui::EventDispatchDetails SendEventToProcessor(ui::Event* event) {
35 return ui::EventSource::SendEventToProcessor(event);
36 }
37
38 private:
39 // WindowTreeHost:
40 ui::EventSource* GetEventSource() override;
41 gfx::AcceleratedWidget GetAcceleratedWidget() override;
42 void Show() override;
43 void Hide() override;
44 gfx::Rect GetBounds() const override;
45 void SetBounds(const gfx::Rect& bounds) override;
46 gfx::Point GetLocationOnNativeScreen() const override;
47 void SetCapture() override;
48 void ReleaseCapture() override;
49 void PostNativeEvent(const base::NativeEvent& native_event) override;
50 void SetCursorNative(gfx::NativeCursor cursor) override;
51 void MoveCursorToNative(const gfx::Point& location) override;
52 void OnCursorVisibilityChangedNative(bool show) override;
53
54 // ui::EventSource:
55 ui::EventProcessor* GetEventProcessor() override;
56
57 // ViewObserver:
58 void OnViewBoundsChanged(View* view,
59 const Rect& old_bounds,
60 const Rect& new_bounds) override;
61
62 View* view_;
63
64 gfx::Rect bounds_;
65
66 scoped_ptr<SurfaceContextFactory> context_factory_;
67
68 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo);
69 };
70
71 } // namespace mojo
72
73 #endif // MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/aura/surface_context_factory.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698