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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_impl.h

Issue 15920002: Fix WebView compositor input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 6 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 CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h" 11 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h"
12 #include "content/port/common/input_event_ack_state.h"
12 #include "content/public/browser/android/synchronous_compositor.h" 13 #include "content/public/browser/android/synchronous_compositor.h"
13 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
14 15
16 namespace WebKit {
17 class WebInputEvent;
18 }
19
15 namespace content { 20 namespace content {
16 21
17 // The purpose of this class is to act as the intermediary between the various 22 // The purpose of this class is to act as the intermediary between the various
18 // components that make up the 'synchronous compositor mode' implementation and 23 // components that make up the 'synchronous compositor mode' implementation and
19 // expose their functionality via the SynchronousCompositor interface. 24 // expose their functionality via the SynchronousCompositor interface.
20 // This class is created on the main thread but most of the APIs are called 25 // This class is created on the main thread but most of the APIs are called
21 // from the Compositor thread. 26 // from the Compositor thread.
22 class SynchronousCompositorImpl 27 class SynchronousCompositorImpl
23 : public SynchronousCompositor, 28 : public SynchronousCompositor,
24 public SynchronousCompositorOutputSurfaceDelegate, 29 public SynchronousCompositorOutputSurfaceDelegate,
(...skipping 11 matching lines...) Expand all
36 const gfx::Transform& transform, 41 const gfx::Transform& transform,
37 gfx::Rect clip) OVERRIDE; 42 gfx::Rect clip) OVERRIDE;
38 43
39 // SynchronousCompositorOutputSurfaceDelegate 44 // SynchronousCompositorOutputSurfaceDelegate
40 virtual void DidBindOutputSurface( 45 virtual void DidBindOutputSurface(
41 SynchronousCompositorOutputSurface* output_surface) OVERRIDE; 46 SynchronousCompositorOutputSurface* output_surface) OVERRIDE;
42 virtual void DidDestroySynchronousOutputSurface( 47 virtual void DidDestroySynchronousOutputSurface(
43 SynchronousCompositorOutputSurface* output_surface) OVERRIDE; 48 SynchronousCompositorOutputSurface* output_surface) OVERRIDE;
44 virtual void SetContinuousInvalidate(bool enable) OVERRIDE; 49 virtual void SetContinuousInvalidate(bool enable) OVERRIDE;
45 50
51 InputEventAckState HandleInputEvent(const WebKit::WebInputEvent& input_event);
joth 2013/05/31 18:05:08 nit: move to line 33 .
jdduke (slow) 2013/05/31 20:48:24 Done.
52
46 private: 53 private:
47 explicit SynchronousCompositorImpl(WebContents* contents); 54 explicit SynchronousCompositorImpl(WebContents* contents);
48 virtual ~SynchronousCompositorImpl(); 55 virtual ~SynchronousCompositorImpl();
49 friend class WebContentsUserData<SynchronousCompositorImpl>; 56 friend class WebContentsUserData<SynchronousCompositorImpl>;
50 57
51 void DidCreateSynchronousOutputSurface( 58 void DidCreateSynchronousOutputSurface(
52 SynchronousCompositorOutputSurface* output_surface); 59 SynchronousCompositorOutputSurface* output_surface);
53 bool CalledOnValidThread() const; 60 bool CalledOnValidThread() const;
54 61
55 int routing_id_; 62 int routing_id_;
56 SynchronousCompositorClient* compositor_client_; 63 SynchronousCompositorClient* compositor_client_;
57 SynchronousCompositorOutputSurface* output_surface_; 64 SynchronousCompositorOutputSurface* output_surface_;
58 WebContents* contents_; 65 WebContents* contents_;
59 66
60 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); 67 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl);
61 }; 68 };
62 69
63 } // namespace content 70 } // namespace content
64 71
65 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ 72 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698