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

Side by Side Diff: mojo/services/native_viewport/native_viewport_impl.h

Issue 534843002: Convert view manager to surfaces with uploading shim in client lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove overzealous shutdown check in cc/surfaces, add NON_EXPORTED_BASE for windows build, saturate… Created 6 years, 3 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/mojo_services.gypi ('k') | mojo/services/native_viewport/native_viewport_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_SERVICES_NATIVE_VIEWPORT_IMPL_H_ 5 #ifndef MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_
6 #define MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_ 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "cc/surfaces/surface_id.h" 9 #include "cc/surfaces/surface_id.h"
10 #include "mojo/services/native_viewport/platform_viewport.h" 10 #include "mojo/services/native_viewport/platform_viewport.h"
(...skipping 10 matching lines...) Expand all
21 class ApplicationImpl; 21 class ApplicationImpl;
22 class ViewportSurface; 22 class ViewportSurface;
23 23
24 class NativeViewportImpl : public InterfaceImpl<NativeViewport>, 24 class NativeViewportImpl : public InterfaceImpl<NativeViewport>,
25 public PlatformViewport::Delegate { 25 public PlatformViewport::Delegate {
26 public: 26 public:
27 explicit NativeViewportImpl(ApplicationImpl* app); 27 explicit NativeViewportImpl(ApplicationImpl* app);
28 virtual ~NativeViewportImpl(); 28 virtual ~NativeViewportImpl();
29 29
30 // InterfaceImpl<NativeViewport> implementation. 30 // InterfaceImpl<NativeViewport> implementation.
31 virtual void Create(RectPtr bounds) OVERRIDE; 31 virtual void Create(SizePtr bounds) OVERRIDE;
32 virtual void Show() OVERRIDE; 32 virtual void Show() OVERRIDE;
33 virtual void Hide() OVERRIDE; 33 virtual void Hide() OVERRIDE;
34 virtual void Close() OVERRIDE; 34 virtual void Close() OVERRIDE;
35 virtual void SetBounds(RectPtr bounds) OVERRIDE; 35 virtual void SetBounds(SizePtr bounds) OVERRIDE;
36 virtual void SubmittedFrame(SurfaceIdPtr surface_id) OVERRIDE; 36 virtual void SubmittedFrame(SurfaceIdPtr surface_id) OVERRIDE;
37 37
38 // PlatformViewport::Delegate implementation. 38 // PlatformViewport::Delegate implementation.
39 virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE; 39 virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE;
40 virtual void OnAcceleratedWidgetAvailable( 40 virtual void OnAcceleratedWidgetAvailable(
41 gfx::AcceleratedWidget widget) OVERRIDE; 41 gfx::AcceleratedWidget widget) OVERRIDE;
42 virtual bool OnEvent(ui::Event* ui_event) OVERRIDE; 42 virtual bool OnEvent(ui::Event* ui_event) OVERRIDE;
43 virtual void OnDestroyed() OVERRIDE; 43 virtual void OnDestroyed() OVERRIDE;
44 44
45 void AckEvent(); 45 void AckEvent();
46 46
47 private: 47 private:
48 scoped_ptr<PlatformViewport> platform_viewport_; 48 scoped_ptr<PlatformViewport> platform_viewport_;
49 scoped_ptr<ViewportSurface> viewport_surface_; 49 scoped_ptr<ViewportSurface> viewport_surface_;
50 uint64_t widget_id_; 50 uint64_t widget_id_;
51 gfx::Rect bounds_; 51 gfx::Rect bounds_;
52 GpuPtr gpu_service_; 52 GpuPtr gpu_service_;
53 SurfacesServicePtr surfaces_service_; 53 SurfacesServicePtr surfaces_service_;
54 cc::SurfaceId child_surface_id_; 54 cc::SurfaceId child_surface_id_;
55 bool waiting_for_event_ack_; 55 bool waiting_for_event_ack_;
56 base::WeakPtrFactory<NativeViewportImpl> weak_factory_; 56 base::WeakPtrFactory<NativeViewportImpl> weak_factory_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl); 58 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl);
59 }; 59 };
60 60
61 } // namespace mojo 61 } // namespace mojo
62 62
63 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_ 63 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/mojo_services.gypi ('k') | mojo/services/native_viewport/native_viewport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698