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

Side by Side Diff: content/browser/android/content_view_core_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTENT_VIEW_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 15 matching lines...) Expand all
26 26
27 struct WebMenuItem; 27 struct WebMenuItem;
28 28
29 namespace ui { 29 namespace ui {
30 class ViewAndroid; 30 class ViewAndroid;
31 class WindowAndroid; 31 class WindowAndroid;
32 } 32 }
33 33
34 namespace content { 34 namespace content {
35 class RenderWidgetHostViewAndroid; 35 class RenderWidgetHostViewAndroid;
36 class SyncInputEventFilter;
37 36
38 // TODO(jrg): this is a shell. Upstream the rest. 37 // TODO(jrg): this is a shell. Upstream the rest.
39 class ContentViewCoreImpl : public ContentViewCore, 38 class ContentViewCoreImpl : public ContentViewCore,
40 public NotificationObserver { 39 public NotificationObserver {
41 public: 40 public:
42 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); 41 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents);
43 ContentViewCoreImpl(JNIEnv* env, 42 ContentViewCoreImpl(JNIEnv* env,
44 jobject obj, 43 jobject obj,
45 bool hardware_accelerated, 44 bool hardware_accelerated,
46 WebContents* web_contents, 45 WebContents* web_contents,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 282
284 // -------------------------------------------------------------------------- 283 // --------------------------------------------------------------------------
285 // Methods called from native code 284 // Methods called from native code
286 // -------------------------------------------------------------------------- 285 // --------------------------------------------------------------------------
287 286
288 gfx::Size GetPhysicalBackingSize() const; 287 gfx::Size GetPhysicalBackingSize() const;
289 gfx::Size GetViewportSizeDip() const; 288 gfx::Size GetViewportSizeDip() const;
290 gfx::Size GetViewportSizeOffsetDip() const; 289 gfx::Size GetViewportSizeOffsetDip() const;
291 float GetOverdrawBottomHeightDip() const; 290 float GetOverdrawBottomHeightDip() const;
292 291
293 InputEventAckState FilterInputEvent(const WebKit::WebInputEvent& input_event);
294
295 void AttachLayer(scoped_refptr<cc::Layer> layer); 292 void AttachLayer(scoped_refptr<cc::Layer> layer);
296 void RemoveLayer(scoped_refptr<cc::Layer> layer); 293 void RemoveLayer(scoped_refptr<cc::Layer> layer);
297 void SetVSyncNotificationEnabled(bool enabled); 294 void SetVSyncNotificationEnabled(bool enabled);
298 void SetNeedsAnimate(); 295 void SetNeedsAnimate();
299 296
300 private: 297 private:
301 enum InputEventVSyncStatus { 298 enum InputEventVSyncStatus {
302 NOT_LAST_INPUT_EVENT_FOR_VSYNC, 299 NOT_LAST_INPUT_EVENT_FOR_VSYNC,
303 LAST_INPUT_EVENT_FOR_VSYNC 300 LAST_INPUT_EVENT_FOR_VSYNC
304 }; 301 };
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 351
355 // The Android view that can be used to add and remove decoration layers 352 // The Android view that can be used to add and remove decoration layers
356 // like AutofillPopup. 353 // like AutofillPopup.
357 ui::ViewAndroid* view_android_; 354 ui::ViewAndroid* view_android_;
358 355
359 // The owning window that has a hold of main application activity. 356 // The owning window that has a hold of main application activity.
360 ui::WindowAndroid* window_android_; 357 ui::WindowAndroid* window_android_;
361 358
362 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_; 359 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_;
363 360
364 // Optional browser-side input event filtering.
365 scoped_ptr<SyncInputEventFilter> input_event_filter_;
366
367 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 361 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
368 }; 362 };
369 363
370 bool RegisterContentViewCore(JNIEnv* env); 364 bool RegisterContentViewCore(JNIEnv* env);
371 365
372 } // namespace content 366 } // namespace content
373 367
374 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 368 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698