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/renderer/render_widget.h

Issue 2707243005: Discard compositor frames from unloaded web content (Closed)
Patch Set: Small changes for review comments Created 3 years, 9 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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 // When emulated, this returns original device scale factor. 408 // When emulated, this returns original device scale factor.
409 float GetOriginalDeviceScaleFactor() const; 409 float GetOriginalDeviceScaleFactor() const;
410 410
411 // Helper to convert |point| using ConvertWindowToViewport(). 411 // Helper to convert |point| using ConvertWindowToViewport().
412 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point); 412 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point);
413 413
414 virtual void TransferActiveWheelFlingAnimation( 414 virtual void TransferActiveWheelFlingAnimation(
415 const blink::WebActiveWheelFlingParameters& params) {} 415 const blink::WebActiveWheelFlingParameters& params) {}
416 416
417 uint32_t GetContentSourceId();
418 void IncrementContentSourceId();
419
417 protected: 420 protected:
418 // Friend RefCounted so that the dtor can be non-public. Using this class 421 // Friend RefCounted so that the dtor can be non-public. Using this class
419 // without ref-counting is an error. 422 // without ref-counting is an error.
420 friend class base::RefCounted<RenderWidget>; 423 friend class base::RefCounted<RenderWidget>;
421 424
422 // For unit tests. 425 // For unit tests.
423 friend class RenderWidgetTest; 426 friend class RenderWidgetTest;
424 427
425 enum ResizeAck { 428 enum ResizeAck {
426 SEND_RESIZE_ACK, 429 SEND_RESIZE_ACK,
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 EditCommands edit_commands_; 843 EditCommands edit_commands_;
841 844
842 // This field stores drag/drop related info for the event that is currently 845 // This field stores drag/drop related info for the event that is currently
843 // being handled. If the current event results in starting a drag/drop 846 // being handled. If the current event results in starting a drag/drop
844 // session, this info is sent to the browser along with other drag/drop info. 847 // session, this info is sent to the browser along with other drag/drop info.
845 DragEventSourceInfo possible_drag_event_info_; 848 DragEventSourceInfo possible_drag_event_info_;
846 849
847 bool time_to_first_active_paint_recorded_; 850 bool time_to_first_active_paint_recorded_;
848 base::TimeTicks was_shown_time_; 851 base::TimeTicks was_shown_time_;
849 852
853 // This is initialized to zero and is incremented on each non-same-page
854 // navigation commit by RenderFrameImpl. At that time it is sent to the
855 // compositor so that it can tag compositor frames, and RenderFrameImpl is
856 // responsible for sending it to the browser process to be used to match
857 // each compositor frame to the most recent page navigation before it was
858 // generated.
859 // TODO(kenrb, fsamuel): This should be removed when SurfaceIDs can be used
860 // to replace it. See https://crbug.com/695579.
861 uint32_t current_content_source_id_;
862
850 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; 863 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
851 864
852 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 865 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
853 }; 866 };
854 867
855 } // namespace content 868 } // namespace content
856 869
857 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 870 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698