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

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

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_ 5 #ifndef MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
6 #define MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_ 6 #define MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "mojo/public/cpp/bindings/error_handler.h"
10 #include "mojo/public/cpp/bindings/remote_ptr.h"
11 #include "mojo/services/native_viewport/native_viewport.mojom.h" 9 #include "mojo/services/native_viewport/native_viewport.mojom.h"
12 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
13 #include "ui/events/event_source.h" 11 #include "ui/events/event_source.h"
14 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
15 13
16 namespace ui { 14 namespace ui {
17 class ContextFactory; 15 class ContextFactory;
18 } 16 }
19 17
20 namespace mojo { 18 namespace mojo {
21 19
22 class ContextFactoryMojo; 20 class ContextFactoryMojo;
23 21
24 class WindowTreeHostMojo : public aura::WindowTreeHost, 22 class WindowTreeHostMojo : public aura::WindowTreeHost,
25 public ui::EventSource, 23 public ui::EventSource,
26 public NativeViewportClient { 24 public NativeViewportClient {
27 public: 25 public:
28 WindowTreeHostMojo(ScopedNativeViewportHandle viewport_handle, 26 WindowTreeHostMojo(NativeViewportPtr viewport,
29 const gfx::Rect& bounds, 27 const gfx::Rect& bounds,
30 const base::Callback<void()>& compositor_created_callback); 28 const base::Callback<void()>& compositor_created_callback);
31 virtual ~WindowTreeHostMojo(); 29 virtual ~WindowTreeHostMojo();
32 30
33 gfx::Rect bounds() const { return bounds_; } 31 gfx::Rect bounds() const { return bounds_; }
34 32
35 private: 33 private:
36 // WindowTreeHost: 34 // WindowTreeHost:
37 virtual ui::EventSource* GetEventSource() OVERRIDE; 35 virtual ui::EventSource* GetEventSource() OVERRIDE;
38 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 36 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
(...skipping 15 matching lines...) Expand all
54 52
55 // Overridden from NativeViewportClient: 53 // Overridden from NativeViewportClient:
56 virtual void OnCreated() OVERRIDE; 54 virtual void OnCreated() OVERRIDE;
57 virtual void OnDestroyed() OVERRIDE; 55 virtual void OnDestroyed() OVERRIDE;
58 virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE; 56 virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE;
59 virtual void OnEvent(const Event& event, 57 virtual void OnEvent(const Event& event,
60 const mojo::Callback<void()>& callback) OVERRIDE; 58 const mojo::Callback<void()>& callback) OVERRIDE;
61 59
62 static ContextFactoryMojo* context_factory_; 60 static ContextFactoryMojo* context_factory_;
63 61
64 RemotePtr<NativeViewport> native_viewport_; 62 NativeViewportPtr native_viewport_;
65 base::Callback<void()> compositor_created_callback_; 63 base::Callback<void()> compositor_created_callback_;
66 64
67 gfx::Rect bounds_; 65 gfx::Rect bounds_;
68 66
69 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo); 67 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo);
70 }; 68 };
71 69
72 } // namespace mojo 70 } // namespace mojo
73 71
74 #endif // MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_ 72 #endif // MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698