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

Side by Side Diff: mojo/examples/compositor_app/compositor_host.h

Issue 585063002: Made double-tap zoom work in pinch virtual viewport mode (Chromium-side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another build fix 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_ 5 #ifndef MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_
6 #define MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_ 6 #define MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 15 matching lines...) Expand all
26 explicit CompositorHost(ScopedMessagePipeHandle command_buffer_handle); 26 explicit CompositorHost(ScopedMessagePipeHandle command_buffer_handle);
27 virtual ~CompositorHost(); 27 virtual ~CompositorHost();
28 28
29 void SetSize(const gfx::Size& viewport_size); 29 void SetSize(const gfx::Size& viewport_size);
30 30
31 // cc::LayerTreeHostClient implementation. 31 // cc::LayerTreeHostClient implementation.
32 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; 32 virtual void WillBeginMainFrame(int frame_id) OVERRIDE;
33 virtual void DidBeginMainFrame() OVERRIDE; 33 virtual void DidBeginMainFrame() OVERRIDE;
34 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE; 34 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE;
35 virtual void Layout() OVERRIDE; 35 virtual void Layout() OVERRIDE;
36 virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
37 const gfx::Vector2d& outer_delta,
38 float page_scale,
39 float top_controls_delta) OVERRIDE;
36 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, 40 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
37 float page_scale, 41 float page_scale,
38 float top_controls_delta) OVERRIDE; 42 float top_controls_delta) OVERRIDE;
39 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) 43 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback)
40 OVERRIDE; 44 OVERRIDE;
41 virtual void DidInitializeOutputSurface() OVERRIDE; 45 virtual void DidInitializeOutputSurface() OVERRIDE;
42 virtual void WillCommit() OVERRIDE; 46 virtual void WillCommit() OVERRIDE;
43 virtual void DidCommit() OVERRIDE; 47 virtual void DidCommit() OVERRIDE;
44 virtual void DidCommitAndDrawFrame() OVERRIDE; 48 virtual void DidCommitAndDrawFrame() OVERRIDE;
45 virtual void DidCompleteSwapBuffers() OVERRIDE; 49 virtual void DidCompleteSwapBuffers() OVERRIDE;
46 50
47 private: 51 private:
48 void SetupScene(); 52 void SetupScene();
49 53
50 ScopedMessagePipeHandle command_buffer_handle_; 54 ScopedMessagePipeHandle command_buffer_handle_;
51 scoped_ptr<cc::LayerTreeHost> tree_; 55 scoped_ptr<cc::LayerTreeHost> tree_;
52 scoped_refptr<cc::Layer> child_layer_; 56 scoped_refptr<cc::Layer> child_layer_;
53 base::Thread compositor_thread_; 57 base::Thread compositor_thread_;
54 }; 58 };
55 59
56 } // namespace examples 60 } // namespace examples
57 } // namespace mojo 61 } // namespace mojo
58 62
59 #endif // MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_ 63 #endif // MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | mojo/examples/compositor_app/compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698