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

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

Issue 617513003: Makes NativeViewport send OnBoundsChanged() after widget available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 28 matching lines...) Expand all
39 // PlatformViewport::Delegate implementation. 39 // PlatformViewport::Delegate implementation.
40 virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE; 40 virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE;
41 virtual void OnAcceleratedWidgetAvailable( 41 virtual void OnAcceleratedWidgetAvailable(
42 gfx::AcceleratedWidget widget) OVERRIDE; 42 gfx::AcceleratedWidget widget) OVERRIDE;
43 virtual bool OnEvent(ui::Event* ui_event) OVERRIDE; 43 virtual bool OnEvent(ui::Event* ui_event) OVERRIDE;
44 virtual void OnDestroyed() OVERRIDE; 44 virtual void OnDestroyed() OVERRIDE;
45 45
46 void AckEvent(); 46 void AckEvent();
47 47
48 private: 48 private:
49 void ProcessOnBoundsChanged();
50
49 bool is_headless_; 51 bool is_headless_;
50 scoped_ptr<PlatformViewport> platform_viewport_; 52 scoped_ptr<PlatformViewport> platform_viewport_;
51 scoped_ptr<ViewportSurface> viewport_surface_; 53 scoped_ptr<ViewportSurface> viewport_surface_;
52 uint64_t widget_id_; 54 uint64_t widget_id_;
53 gfx::Size size_; 55 gfx::Size size_;
54 GpuPtr gpu_service_; 56 GpuPtr gpu_service_;
55 SurfacesServicePtr surfaces_service_; 57 SurfacesServicePtr surfaces_service_;
56 cc::SurfaceId child_surface_id_; 58 cc::SurfaceId child_surface_id_;
57 bool waiting_for_event_ack_; 59 bool waiting_for_event_ack_;
58 Callback<void(uint64_t)> create_callback_; 60 Callback<void(uint64_t)> create_callback_;
59 base::WeakPtrFactory<NativeViewportImpl> weak_factory_; 61 base::WeakPtrFactory<NativeViewportImpl> weak_factory_;
60 62
61 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl); 63 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl);
62 }; 64 };
63 65
64 } // namespace mojo 66 } // namespace mojo
65 67
66 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_ 68 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/shared_ptr.h ('k') | mojo/services/native_viewport/native_viewport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698