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

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: Fixed reviewers comments Created 7 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 | 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 virtual void AcceleratedSurfacePostSubBuffer( 216 virtual void AcceleratedSurfacePostSubBuffer(
217 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, 217 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
218 int gpu_host_id) OVERRIDE; 218 int gpu_host_id) OVERRIDE;
219 virtual void AcceleratedSurfaceSuspend() OVERRIDE; 219 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
220 virtual void AcceleratedSurfaceRelease() OVERRIDE; 220 virtual void AcceleratedSurfaceRelease() OVERRIDE;
221 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; 221 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
222 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; 222 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
223 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; 223 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
224 virtual void GestureEventAck(int gesture_event_type, 224 virtual void GestureEventAck(int gesture_event_type,
225 InputEventAckState ack_result) OVERRIDE; 225 InputEventAckState ack_result) OVERRIDE;
226 virtual void SetExpectedRenderedSize(const gfx::Size& size) OVERRIDE;
226 virtual void ProcessAckedTouchEvent( 227 virtual void ProcessAckedTouchEvent(
227 const TouchEventWithLatencyInfo& touch, 228 const TouchEventWithLatencyInfo& touch,
228 InputEventAckState ack_result) OVERRIDE; 229 InputEventAckState ack_result) OVERRIDE;
229 virtual SyntheticGesture* CreateSmoothScrollGesture( 230 virtual SyntheticGesture* CreateSmoothScrollGesture(
230 bool scroll_down, 231 bool scroll_down,
231 int pixels_to_scroll, 232 int pixels_to_scroll,
232 int mouse_event_x, 233 int mouse_event_x,
233 int mouse_event_y) OVERRIDE; 234 int mouse_event_y) OVERRIDE;
234 virtual void SetHasHorizontalScrollbar( 235 virtual void SetHasHorizontalScrollbar(
235 bool has_horizontal_scrollbar) OVERRIDE; 236 bool has_horizontal_scrollbar) OVERRIDE;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 bool accelerated_compositing_state_changed_; 652 bool accelerated_compositing_state_changed_;
652 653
653 // This lock is the one waiting for a frame of the right size to come back 654 // This lock is the one waiting for a frame of the right size to come back
654 // from the renderer/GPU process. It is set from the moment the aura window 655 // from the renderer/GPU process. It is set from the moment the aura window
655 // got resized, to the moment we committed the renderer frame of the same 656 // got resized, to the moment we committed the renderer frame of the same
656 // size. It keeps track of the size we expect from the renderer, and locks the 657 // size. It keeps track of the size we expect from the renderer, and locks the
657 // compositor, as well as the UI for a short time to give a chance to the 658 // compositor, as well as the UI for a short time to give a chance to the
658 // renderer of producing a frame of the right size. 659 // renderer of producing a frame of the right size.
659 scoped_ptr<ResizeLock> resize_lock_; 660 scoped_ptr<ResizeLock> resize_lock_;
660 661
662 // When emulating screen metrics, renderer may supply image of different size.
663 // Empty size means the default view size is expected.
664 gfx::Size expected_rendered_size_;
665
661 // Keeps track of the current frame size. 666 // Keeps track of the current frame size.
662 gfx::Size current_frame_size_; 667 gfx::Size current_frame_size_;
663 668
664 // This lock is for waiting for a front surface to become available to draw. 669 // This lock is for waiting for a front surface to become available to draw.
665 scoped_refptr<ui::CompositorLock> released_front_lock_; 670 scoped_refptr<ui::CompositorLock> released_front_lock_;
666 671
667 // Used to track the state of the window we're created from. Only used when 672 // Used to track the state of the window we're created from. Only used when
668 // created fullscreen. 673 // created fullscreen.
669 scoped_ptr<aura::WindowTracker> host_tracker_; 674 scoped_ptr<aura::WindowTracker> host_tracker_;
670 675
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 unsigned frame_id; 734 unsigned frame_id;
730 }; 735 };
731 std::vector<ReleasedFrameInfo> released_software_frames_; 736 std::vector<ReleasedFrameInfo> released_software_frames_;
732 737
733 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 738 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
734 }; 739 };
735 740
736 } // namespace content 741 } // namespace content
737 742
738 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 743 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698