summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/renderer_host/render_widget_host_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/renderer_host/render_widget_host_impl.h')
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_impl.h317
1 files changed, 128 insertions, 189 deletions
diff --git a/chromium/content/browser/renderer_host/render_widget_host_impl.h b/chromium/content/browser/renderer_host/render_widget_host_impl.h
index 22dbdbe0084..65fa860df34 100644
--- a/chromium/content/browser/renderer_host/render_widget_host_impl.h
+++ b/chromium/content/browser/renderer_host/render_widget_host_impl.h
@@ -23,13 +23,16 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
+#include "cc/resources/shared_bitmap.h"
+#include "content/browser/accessibility/browser_accessibility_manager.h"
+#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/browser/renderer_host/input/input_ack_handler.h"
#include "content/browser/renderer_host/input/input_router_client.h"
-#include "content/common/browser_rendering_stats.h"
+#include "content/browser/renderer_host/input/synthetic_gesture.h"
+#include "content/browser/renderer_host/input/touch_emulator_client.h"
+#include "content/common/input/input_event_ack_state.h"
#include "content/common/input/synthetic_gesture_packet.h"
#include "content/common/view_message_enums.h"
-#include "content/port/browser/event_with_latency_info.h"
-#include "content/port/common/input_event_ack_state.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/common/page_zoom.h"
#include "ipc/ipc_listener.h"
@@ -38,12 +41,12 @@
#include "ui/events/latency_info.h"
#include "ui/gfx/native_widget_types.h"
-class WebCursor;
struct AcceleratedSurfaceMsg_BufferPresented_Params;
+struct ViewHostMsg_BeginSmoothScroll_Params;
struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;
-struct ViewHostMsg_UpdateRect_Params;
+struct ViewHostMsg_SelectionBounds_Params;
struct ViewHostMsg_TextInputState_Params;
-struct ViewHostMsg_BeginSmoothScroll_Params;
+struct ViewHostMsg_UpdateRect_Params;
namespace base {
class TimeTicks;
@@ -76,22 +79,25 @@ class WebLayer;
#endif
namespace content {
-class BackingStore;
class InputRouter;
class MockRenderWidgetHost;
-class OverscrollController;
class RenderWidgetHostDelegate;
-class RenderWidgetHostViewPort;
+class RenderWidgetHostViewBase;
class SyntheticGestureController;
class TimeoutMonitor;
+class TouchEmulator;
+class WebCursor;
struct EditCommand;
// This implements the RenderWidgetHost interface that is exposed to
// embedders of content, and adds things only visible to content.
-class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
- public InputRouterClient,
- public InputAckHandler,
- public IPC::Listener {
+class CONTENT_EXPORT RenderWidgetHostImpl
+ : virtual public RenderWidgetHost,
+ public InputRouterClient,
+ public InputAckHandler,
+ public TouchEmulatorClient,
+ public IPC::Listener,
+ public BrowserAccessibilityDelegate {
public:
// routing_id can be MSG_ROUTING_NONE, in which case the next available
// routing id is taken from the RenderProcessHost.
@@ -121,16 +127,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
}
// RenderWidgetHost implementation.
- virtual void Undo() OVERRIDE;
- virtual void Redo() OVERRIDE;
- virtual void Cut() OVERRIDE;
- virtual void Copy() OVERRIDE;
- virtual void CopyToFindPboard() OVERRIDE;
- virtual void Paste() OVERRIDE;
- virtual void PasteAndMatchStyle() OVERRIDE;
- virtual void Delete() OVERRIDE;
- virtual void SelectAll() OVERRIDE;
- virtual void Unselect() OVERRIDE;
virtual void UpdateTextDirection(blink::WebTextDirection direction) OVERRIDE;
virtual void NotifyTextDirection() OVERRIDE;
virtual void Focus() OVERRIDE;
@@ -139,16 +135,17 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual void CopyFromBackingStore(
const gfx::Rect& src_rect,
const gfx::Size& accelerated_dst_size,
- const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
-#if defined(TOOLKIT_GTK)
- virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
- GdkWindow* target) OVERRIDE;
-#elif defined(OS_MACOSX)
- virtual gfx::Size GetBackingStoreSize() OVERRIDE;
- virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
- CGContextRef target) OVERRIDE;
+ const base::Callback<void(bool, const SkBitmap&)>& callback,
+ const SkBitmap::Config& bitmap_config) OVERRIDE;
+ virtual bool CanCopyFromBackingStore() OVERRIDE;
+#if defined(OS_ANDROID)
+ virtual void LockBackingStore() OVERRIDE;
+ virtual void UnlockBackingStore() OVERRIDE;
#endif
virtual void EnableFullAccessibilityMode() OVERRIDE;
+ virtual bool IsFullAccessibilityModeForTesting() OVERRIDE;
+ virtual void EnableTreeOnlyAccessibilityMode() OVERRIDE;
+ virtual bool IsTreeOnlyAccessibilityModeForTesting() OVERRIDE;
virtual void ForwardMouseEvent(
const blink::WebMouseEvent& mouse_event) OVERRIDE;
virtual void ForwardWheelEvent(
@@ -161,12 +158,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual RenderWidgetHostView* GetView() const OVERRIDE;
virtual bool IsLoading() const OVERRIDE;
virtual bool IsRenderView() const OVERRIDE;
- virtual void PaintAtSize(TransportDIB::Handle dib_handle,
- int tag,
- const gfx::Size& page_size,
- const gfx::Size& desired_size) OVERRIDE;
- virtual void Replace(const base::string16& word) OVERRIDE;
- virtual void ReplaceMisspelling(const base::string16& word) OVERRIDE;
virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE;
virtual void RestartHangMonitorTimeout() OVERRIDE;
virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE;
@@ -181,9 +172,25 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual void RemoveMouseEventCallback(
const MouseEventCallback& callback) OVERRIDE;
virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE;
- virtual void GetSnapshotFromRenderer(
- const gfx::Rect& src_subrect,
- const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
+
+ virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
+
+ // BrowserAccessibilityDelegate
+ virtual void AccessibilitySetFocus(int acc_obj_id) OVERRIDE;
+ virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE;
+ virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE;
+ virtual void AccessibilityScrollToMakeVisible(
+ int acc_obj_id, gfx::Rect subfocus) OVERRIDE;
+ virtual void AccessibilityScrollToPoint(
+ int acc_obj_id, gfx::Point point) OVERRIDE;
+ virtual void AccessibilitySetTextSelection(
+ int acc_obj_id, int start_offset, int end_offset) OVERRIDE;
+ virtual bool AccessibilityViewHasFocus() const OVERRIDE;
+ virtual gfx::Rect AccessibilityGetViewBounds() const OVERRIDE;
+ virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds)
+ const OVERRIDE;
+ virtual void AccessibilityHitTest(const gfx::Point& point) OVERRIDE;
+ virtual void AccessibilityFatalError() OVERRIDE;
const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
@@ -196,7 +203,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
void InvalidateScreenInfo();
// Sets the View of this RenderWidgetHost.
- void SetView(RenderWidgetHostView* view);
+ void SetView(RenderWidgetHostViewBase* view);
int surface_id() const { return surface_id_; }
@@ -235,42 +242,23 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Noifies the RenderWidget of the current mouse cursor visibility state.
void SendCursorVisibilityState(bool is_visible);
- // Tells us whether the page is rendered directly via the GPU process.
- bool is_accelerated_compositing_active() {
- return is_accelerated_compositing_active_;
- }
-
// Notifies the RenderWidgetHost that the View was destroyed.
void ViewDestroyed();
// Indicates if the page has finished loading.
void SetIsLoading(bool is_loading);
- // Check for the existance of a BackingStore of the given |desired_size| and
- // return it if it exists. If the BackingStore is GPU, true is returned and
- // |*backing_store| is set to NULL.
- bool TryGetBackingStore(const gfx::Size& desired_size,
- BackingStore** backing_store);
-
- // Get access to the widget's backing store matching the size of the widget's
- // view. If you pass |force_create| as true, then GetBackingStore may block
- // for the renderer to send a new frame. Otherwise, NULL will be returned if
- // the backing store doesn't already exist. It will also return NULL if the
- // backing store could not be created.
- //
- // Mac only: NULL may also be returned if the last frame was GPU accelerated.
- // Call GetView()->HasAcceleratedSurface to determine if the last frame was
- // accelerated.
- BackingStore* GetBackingStore(bool force_create);
+ // Pause for a moment to wait for pending repaint or resize messages sent to
+ // the renderer to arrive. If pending resize messages are for an old window
+ // size, then also pump through a new resize message if there is time.
+ void PauseForPendingResizeOrRepaints();
- // Allocate a new backing store of the given size. Returns NULL on failure
- // (for example, if we don't currently have a RenderWidgetHostView.)
- BackingStore* AllocBackingStore(const gfx::Size& size);
+ // Whether pausing may be useful.
+ bool CanPauseForPendingResizeOrRepaints();
- // When a backing store does asynchronous painting, it will call this function
- // when it is done with the DIB. We will then forward a message to the
- // renderer to send another paint.
- void DonePaintingToBackingStore();
+ // Wait for a surface matching the size of the widget's view, possibly
+ // blocking until the renderer sends a new frame.
+ void WaitForSurface();
// GPU accelerated version of GetBackingStore function. This will
// trigger a re-composite to the view. It may fail if a resize is pending, or
@@ -288,7 +276,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Forwards the given message to the renderer. These are called by the view
// when it has received a message.
- void ForwardGestureEvent(const blink::WebGestureEvent& gesture_event);
void ForwardGestureEventWithLatencyInfo(
const blink::WebGestureEvent& gesture_event,
const ui::LatencyInfo& ui_latency);
@@ -296,9 +283,24 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
const blink::WebTouchEvent& touch_event,
const ui::LatencyInfo& ui_latency);
void ForwardMouseEventWithLatencyInfo(
- const MouseEventWithLatencyInfo& mouse_event);
+ const blink::WebMouseEvent& mouse_event,
+ const ui::LatencyInfo& ui_latency);
void ForwardWheelEventWithLatencyInfo(
- const MouseWheelEventWithLatencyInfo& wheel_event);
+ const blink::WebMouseWheelEvent& wheel_event,
+ const ui::LatencyInfo& ui_latency);
+
+ // TouchEmulatorClient overrides.
+ virtual void ForwardGestureEvent(
+ const blink::WebGestureEvent& gesture_event) OVERRIDE;
+ virtual void ForwardTouchEvent(
+ const blink::WebTouchEvent& touch_event) OVERRIDE;
+ virtual void SetCursor(const WebCursor& cursor) OVERRIDE;
+
+ // Queues a synthetic gesture for testing purposes. Invokes the on_complete
+ // callback when the gesture is finished running.
+ void QueueSyntheticGesture(
+ scoped_ptr<SyntheticGesture> synthetic_gesture,
+ const base::Callback<void(SyntheticGesture::Result)>& on_complete);
void CancelUpdateTextDirection();
@@ -352,10 +354,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Cancels an ongoing composition.
void ImeCancelComposition();
- // Deletes the current selection plus the specified number of characters
- // before and after the selection or caret.
- void ExtendSelectionAndDelete(size_t before, size_t after);
-
// This is for derived classes to give us access to the resizer rect.
// And to also expose it to the RenderWidgetHostView.
virtual gfx::Rect GetRootWindowResizerRect() const;
@@ -381,8 +379,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// perform an action. See OnUserGesture for more details.
void StartUserGesture();
- // Set the RenderView background.
- void SetBackground(const SkBitmap& background);
+ // Set the RenderView background transparency.
+ void SetBackgroundOpaque(bool opaque);
// Notifies the renderer that the next key event is bound to one or more
// pre-defined edit commands
@@ -394,37 +392,20 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
return accessibility_mode_;
}
- // Send a message to the renderer process to change the accessibility mode.
- void SetAccessibilityMode(AccessibilityMode mode);
-
- // Relay a request from assistive technology to perform the default action
- // on a given node.
- void AccessibilityDoDefaultAction(int object_id);
-
- // Relay a request from assistive technology to set focus to a given node.
- void AccessibilitySetFocus(int object_id);
+ // Adds the given accessibility mode to the current accessibility mode bitmap.
+ void AddAccessibilityMode(AccessibilityMode mode);
- // Relay a request from assistive technology to make a given object
- // visible by scrolling as many scrollable containers as necessary.
- // In addition, if it's not possible to make the entire object visible,
- // scroll so that the |subfocus| rect is visible at least. The subfocus
- // rect is in local coordinates of the object itself.
- void AccessibilityScrollToMakeVisible(
- int acc_obj_id, gfx::Rect subfocus);
+ // Removes the given accessibility mode from the current accessibility mode
+ // bitmap, managing the bits that are shared with other modes such that a
+ // bit will only be turned off when all modes that depend on it have been
+ // removed.
+ void RemoveAccessibilityMode(AccessibilityMode mode);
- // Relay a request from assistive technology to move a given object
- // to a specific location, in the WebContents area coordinate space, i.e.
- // (0, 0) is the top-left corner of the WebContents.
- void AccessibilityScrollToPoint(int acc_obj_id, gfx::Point point);
+ // Resets the accessibility mode to the default setting in
+ // BrowserStateAccessibilityImpl.
+ void ResetAccessibilityMode();
- // Relay a request from assistive technology to set text selection.
- void AccessibilitySetTextSelection(
- int acc_obj_id, int start_offset, int end_offset);
-
- // Kill the renderer because we got a fatal accessibility error.
- void FatalAccessibilityTreeError();
-
-#if defined(OS_WIN) && defined(USE_AURA)
+#if defined(OS_WIN)
void SetParentNativeViewAccessible(
gfx::NativeViewAccessible accessible_parent);
gfx::NativeViewAccessible GetParentNativeViewAccessible() const;
@@ -439,9 +420,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// editable divs).
void ScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
- // Requests the renderer to select the region between two points.
- void SelectRange(const gfx::Point& start, const gfx::Point& end);
-
// Requests the renderer to move the caret selection towards the point.
void MoveCaret(const gfx::Point& point);
@@ -477,26 +455,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
int renderer_host_id,
const cc::CompositorFrameAck& ack);
- // Called by the view in response to AcceleratedSurfaceBuffersSwapped for
- // platforms that support deferred GPU process descheduling. This does
- // nothing if the compositor thread is enabled.
- // TODO(jbates) Once the compositor thread is always on, this can be removed.
- void AcknowledgeSwapBuffersToRenderer();
-
- bool is_threaded_compositing_enabled() const {
- return is_threaded_compositing_enabled_;
- }
-
-#if defined(USE_AURA)
- // Called by the view when the parent changes. If a parent isn't available,
- // NULL is used.
- void ParentChanged(gfx::NativeViewId new_parent);
-#endif
-
- // Signals that the compositing surface was updated, e.g. after a lost context
- // event.
- void CompositingSurfaceUpdated();
-
void set_allow_privileged_mouse_lock(bool allow) {
allow_privileged_mouse_lock_ = allow;
}
@@ -513,13 +471,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Update the renderer's cache of the screen rect of the view and window.
void SendScreenRects();
- OverscrollController* overscroll_controller() const {
- return overscroll_controller_.get();
- }
-
- // Sets whether the overscroll controller should be enabled for this page.
- void SetOverscrollControllerEnabled(bool enabled);
-
// Suppreses future char events until a keydown. See
// suppress_next_char_events_.
void SuppressNextCharEvents();
@@ -542,11 +493,25 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// subsystem.
int64 GetLatencyComponentId();
- static void CompositorFrameDrawn(const ui::LatencyInfo& latency_info);
+ static void CompositorFrameDrawn(
+ const std::vector<ui::LatencyInfo>& latency_info);
// Don't check whether we expected a resize ack during layout tests.
static void DisableResizeAckCheckForTesting();
+ void WindowSnapshotAsyncCallback(
+ int routing_id,
+ int snapshot_id,
+ gfx::Size snapshot_size,
+ scoped_refptr<base::RefCountedBytes> png_data);
+
+ // LatencyComponents generated in the renderer must have component IDs
+ // provided to them by the browser process. This function adds the correct
+ // component ID where necessary.
+ void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info);
+
+ InputRouter* input_router() { return input_router_.get(); }
+
protected:
virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE;
@@ -613,15 +578,12 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
int increment_in_flight_event_count() { return ++in_flight_event_count_; }
int decrement_in_flight_event_count() { return --in_flight_event_count_; }
- // Returns whether an overscroll gesture is in progress.
- bool IsInOverscrollGesture() const;
-
// The View associated with the RenderViewHost. The lifetime of this object
// is associated with the lifetime of the Render process. If the Renderer
// crashes, its View is destroyed and this pointer becomes NULL, even though
// render_view_host_ lives on to load another URL (creating a new View while
// doing so).
- RenderWidgetHostViewPort* view_;
+ RenderWidgetHostViewBase* view_;
// true if a renderer has once been valid. We use this flag to display a sad
// tab only when we lose our renderer and not if a paint occurs during
@@ -653,43 +615,45 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
void OnRequestMove(const gfx::Rect& pos);
void OnSetTooltipText(const base::string16& tooltip_text,
blink::WebTextDirection text_direction_hint);
- void OnPaintAtSizeAck(int tag, const gfx::Size& size);
#if defined(OS_MACOSX)
void OnCompositorSurfaceBuffersSwapped(
const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params);
#endif
bool OnSwapCompositorFrame(const IPC::Message& message);
- void OnOverscrolled(gfx::Vector2dF accumulated_overscroll,
- gfx::Vector2dF current_fling_velocity);
+ void OnFlingingStopped();
void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
- void OnUpdateIsDelayed();
void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet);
virtual void OnFocus();
virtual void OnBlur();
void OnSetCursor(const WebCursor& cursor);
- void OnTextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline);
-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
+ void OnSetTouchEventEmulationEnabled(bool enabled, bool allow_pinch);
+ void OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params);
+
+#if defined(OS_MACOSX) || defined(USE_AURA)
void OnImeCompositionRangeChanged(
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds);
#endif
void OnImeCancelComposition();
- void OnDidActivateAcceleratedCompositing(bool activated);
void OnLockMouse(bool user_gesture,
bool last_unlocked_by_target,
bool privileged);
void OnUnlockMouse();
void OnShowDisambiguationPopup(const gfx::Rect& rect,
const gfx::Size& size,
- const TransportDIB::Id& id);
+ const cc::SharedBitmapId& id);
#if defined(OS_WIN)
void OnWindowlessPluginDummyWindowCreated(
gfx::NativeViewId dummy_activation_window);
void OnWindowlessPluginDummyWindowDestroyed(
gfx::NativeViewId dummy_activation_window);
#endif
+ void OnSelectionChanged(const base::string16& text,
+ size_t offset,
+ const gfx::Range& range);
+ void OnSelectionBoundsChanged(
+ const ViewHostMsg_SelectionBounds_Params& params);
void OnSnapshot(bool success, const SkBitmap& bitmap);
// Called (either immediately or asynchronously) after we're done with our
@@ -698,24 +662,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params,
const base::TimeTicks& paint_start);
- // Paints the given bitmap to the current backing store at the given
- // location. Returns true if the passed callback was asynchronously
- // scheduled in the future (and thus the caller must manually synchronously
- // call the callback function).
- bool PaintBackingStoreRect(TransportDIB::Id bitmap,
- const gfx::Rect& bitmap_rect,
- const std::vector<gfx::Rect>& copy_rects,
- const gfx::Size& view_size,
- float scale_factor,
- const base::Closure& completion_callback);
-
- // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The
- // |dib| and its corresponding location |bitmap_rect| in the backing store
- // is the newly painted pixels by the renderer.
- void ScrollBackingStoreRect(const gfx::Vector2d& delta,
- const gfx::Rect& clip_rect,
- const gfx::Size& view_size);
-
// Give key press listeners a chance to handle this key press. This allow
// widgets that don't have focus to still handle key presses.
bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event);
@@ -727,8 +673,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual void IncrementInFlightEventCount() OVERRIDE;
virtual void DecrementInFlightEventCount() OVERRIDE;
virtual void OnHasTouchEventHandlers(bool has_handlers) OVERRIDE;
- virtual OverscrollController* GetOverscrollController() const OVERRIDE;
virtual void DidFlush() OVERRIDE;
+ virtual void DidOverscroll(const DidOverscrollParams& params) OVERRIDE;
// InputAckHandler
virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event,
@@ -741,12 +687,17 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
InputEventAckState ack_result) OVERRIDE;
virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
+ void OnSyntheticGestureCompleted(SyntheticGesture::Result result);
+
// Called when there is a new auto resize (using a post to avoid a stack
// which may get in recursive loops).
void DelayedAutoResized();
void WindowSnapshotReachedScreen(int snapshot_id);
+ // Send a message to the renderer process to change the accessibility mode.
+ void SetAccessibilityMode(AccessibilityMode AccessibilityMode);
+
// Our delegate, which wants to know mainly about keyboard events.
// It will remain non-NULL until DetachDelegate() is called.
RenderWidgetHostDelegate* delegate_;
@@ -771,12 +722,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Indicates whether a page is fullscreen or not.
bool is_fullscreen_;
- // True when a page is rendered directly via the GPU process.
- bool is_accelerated_compositing_active_;
-
- // True if threaded compositing is enabled on this view.
- bool is_threaded_compositing_enabled_;
-
// Set if we are waiting for a repaint ack for the view.
bool repaint_ack_pending_;
@@ -801,6 +746,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// the browser, for example by an on-screen-keyboard (in DPI-adjusted pixels).
float overdraw_bottom_height_;
+ // The size of the visible viewport, which may be smaller than the view if the
+ // view is partially occluded (e.g. by a virtual keyboard). The size is in
+ // DPI-adjusted pixels.
+ gfx::Size visible_viewport_size_;
+
// The size we last sent as requested size to the renderer. |current_size_|
// is only updated once the resize message has been ack'd. This on the other
// hand is updated when the resize message is sent. This is very similar to
@@ -850,12 +800,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Flag to detect recursive calls to GetBackingStore().
bool in_get_backing_store_;
- // Flag to trigger the GetBackingStore method to abort early.
- bool abort_get_backing_store_;
-
- // Set when we call DidPaintRect/DidScrollRect on the view.
- bool view_being_painted_;
-
// Used for UMA histogram logging to measure the time for a repaint view
// operation to finish.
base::TimeTicks repaint_start_time_;
@@ -905,24 +849,19 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
+ scoped_ptr<TouchEmulator> touch_emulator_;
+
// Receives and handles all input events.
scoped_ptr<InputRouter> input_router_;
- scoped_ptr<OverscrollController> overscroll_controller_;
-
scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
#if defined(OS_WIN)
std::list<HWND> dummy_windows_for_activation_;
#endif
- // List of callbacks for pending snapshot requests to the renderer.
- std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
-
int64 last_input_number_;
- BrowserRenderingStats rendering_stats_;
-
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
};