| OLD | NEW |
| 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 Loading... |
| 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 | |
| 420 protected: | 417 protected: |
| 421 // Friend RefCounted so that the dtor can be non-public. Using this class | 418 // Friend RefCounted so that the dtor can be non-public. Using this class |
| 422 // without ref-counting is an error. | 419 // without ref-counting is an error. |
| 423 friend class base::RefCounted<RenderWidget>; | 420 friend class base::RefCounted<RenderWidget>; |
| 424 | 421 |
| 425 // For unit tests. | 422 // For unit tests. |
| 426 friend class RenderWidgetTest; | 423 friend class RenderWidgetTest; |
| 427 | 424 |
| 428 enum ResizeAck { | 425 enum ResizeAck { |
| 429 SEND_RESIZE_ACK, | 426 SEND_RESIZE_ACK, |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 EditCommands edit_commands_; | 840 EditCommands edit_commands_; |
| 844 | 841 |
| 845 // This field stores drag/drop related info for the event that is currently | 842 // This field stores drag/drop related info for the event that is currently |
| 846 // being handled. If the current event results in starting a drag/drop | 843 // being handled. If the current event results in starting a drag/drop |
| 847 // session, this info is sent to the browser along with other drag/drop info. | 844 // session, this info is sent to the browser along with other drag/drop info. |
| 848 DragEventSourceInfo possible_drag_event_info_; | 845 DragEventSourceInfo possible_drag_event_info_; |
| 849 | 846 |
| 850 bool time_to_first_active_paint_recorded_; | 847 bool time_to_first_active_paint_recorded_; |
| 851 base::TimeTicks was_shown_time_; | 848 base::TimeTicks was_shown_time_; |
| 852 | 849 |
| 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 // This only applies to main frames, and is not touched for subframe | |
| 860 // RenderWidgets, where there is no concern around displaying unloaded | |
| 861 // content. | |
| 862 // TODO(kenrb, fsamuel): This should be removed when SurfaceIDs can be used | |
| 863 // to replace it. See https://crbug.com/695579. | |
| 864 uint32_t current_content_source_id_; | |
| 865 | |
| 866 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 850 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 867 | 851 |
| 868 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 852 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 869 }; | 853 }; |
| 870 | 854 |
| 871 } // namespace content | 855 } // namespace content |
| 872 | 856 |
| 873 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 857 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |