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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 23364004: Implementation of device metrics emulation in render view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Moved helper class to cc Created 7 years, 3 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 | Annotate | Revision Log
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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 virtual void AcceleratedSurfacePostSubBuffer( 217 virtual void AcceleratedSurfacePostSubBuffer(
218 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, 218 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
219 int gpu_host_id) OVERRIDE; 219 int gpu_host_id) OVERRIDE;
220 virtual void AcceleratedSurfaceSuspend() OVERRIDE; 220 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
221 virtual void AcceleratedSurfaceRelease() OVERRIDE; 221 virtual void AcceleratedSurfaceRelease() OVERRIDE;
222 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; 222 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
223 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; 223 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
224 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; 224 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
225 virtual void GestureEventAck(int gesture_event_type, 225 virtual void GestureEventAck(int gesture_event_type,
226 InputEventAckState ack_result) OVERRIDE; 226 InputEventAckState ack_result) OVERRIDE;
227 virtual void SetExpectedRenderedSize(const gfx::Size& size) OVERRIDE;
227 virtual void ProcessAckedTouchEvent( 228 virtual void ProcessAckedTouchEvent(
228 const TouchEventWithLatencyInfo& touch, 229 const TouchEventWithLatencyInfo& touch,
229 InputEventAckState ack_result) OVERRIDE; 230 InputEventAckState ack_result) OVERRIDE;
230 virtual SyntheticGesture* CreateSmoothScrollGesture( 231 virtual SyntheticGesture* CreateSmoothScrollGesture(
231 bool scroll_down, 232 bool scroll_down,
232 int pixels_to_scroll, 233 int pixels_to_scroll,
233 int mouse_event_x, 234 int mouse_event_x,
234 int mouse_event_y) OVERRIDE; 235 int mouse_event_y) OVERRIDE;
235 virtual void SetHasHorizontalScrollbar( 236 virtual void SetHasHorizontalScrollbar(
236 bool has_horizontal_scrollbar) OVERRIDE; 237 bool has_horizontal_scrollbar) OVERRIDE;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 class ResizeLock; 630 class ResizeLock;
630 631
631 // This lock is the one waiting for a frame of the right size to come back 632 // This lock is the one waiting for a frame of the right size to come back
632 // from the renderer/GPU process. It is set from the moment the aura window 633 // from the renderer/GPU process. It is set from the moment the aura window
633 // got resized, to the moment we committed the renderer frame of the same 634 // got resized, to the moment we committed the renderer frame of the same
634 // size. It keeps track of the size we expect from the renderer, and locks the 635 // size. It keeps track of the size we expect from the renderer, and locks the
635 // compositor, as well as the UI for a short time to give a chance to the 636 // compositor, as well as the UI for a short time to give a chance to the
636 // renderer of producing a frame of the right size. 637 // renderer of producing a frame of the right size.
637 scoped_ptr<ResizeLock> resize_lock_; 638 scoped_ptr<ResizeLock> resize_lock_;
638 639
640 // When emulating device metrics, renderer may supply image of different size.
641 // Empty size means the default view size is expected.
642 gfx::Size expected_rendered_size_;
643
639 // Keeps track of the current frame size. 644 // Keeps track of the current frame size.
640 gfx::Size current_frame_size_; 645 gfx::Size current_frame_size_;
641 646
642 // This lock is for waiting for a front surface to become available to draw. 647 // This lock is for waiting for a front surface to become available to draw.
643 scoped_refptr<ui::CompositorLock> released_front_lock_; 648 scoped_refptr<ui::CompositorLock> released_front_lock_;
644 649
645 // Used to track the state of the window we're created from. Only used when 650 // Used to track the state of the window we're created from. Only used when
646 // created fullscreen. 651 // created fullscreen.
647 scoped_ptr<aura::WindowTracker> host_tracker_; 652 scoped_ptr<aura::WindowTracker> host_tracker_;
648 653
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 TouchEditingClient* touch_editing_client_; 704 TouchEditingClient* touch_editing_client_;
700 705
701 ui::LatencyInfo software_latency_info_; 706 ui::LatencyInfo software_latency_info_;
702 707
703 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 708 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
704 }; 709 };
705 710
706 } // namespace content 711 } // namespace content
707 712
708 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 713 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698