| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // Checks if the composition range or composition character bounds have been | 353 // Checks if the composition range or composition character bounds have been |
| 354 // changed. If they are changed, the new value will be sent to the browser | 354 // changed. If they are changed, the new value will be sent to the browser |
| 355 // process. This method does nothing when the browser process is not able to | 355 // process. This method does nothing when the browser process is not able to |
| 356 // handle composition range and composition character bounds. | 356 // handle composition range and composition character bounds. |
| 357 void UpdateCompositionInfo(bool should_update_range); | 357 void UpdateCompositionInfo(bool should_update_range); |
| 358 | 358 |
| 359 // Change the device ICC color profile while running a layout test. | 359 // Change the device ICC color profile while running a layout test. |
| 360 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); | 360 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); |
| 361 void ResetDeviceColorProfileForTesting(); | 361 void ResetDeviceColorProfileForTesting(); |
| 362 | 362 |
| 363 // Indicates whether this widget has focus. |
| 364 bool has_focus() const { return has_focus_; } |
| 365 |
| 363 protected: | 366 protected: |
| 364 // Friend RefCounted so that the dtor can be non-public. Using this class | 367 // Friend RefCounted so that the dtor can be non-public. Using this class |
| 365 // without ref-counting is an error. | 368 // without ref-counting is an error. |
| 366 friend class base::RefCounted<RenderWidget>; | 369 friend class base::RefCounted<RenderWidget>; |
| 367 | 370 |
| 368 // For unit tests. | 371 // For unit tests. |
| 369 friend class RenderWidgetTest; | 372 friend class RenderWidgetTest; |
| 370 | 373 |
| 371 enum ResizeAck { | 374 enum ResizeAck { |
| 372 SEND_RESIZE_ACK, | 375 SEND_RESIZE_ACK, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 bool SetDeviceColorProfile(const std::vector<char>& color_profile); | 491 bool SetDeviceColorProfile(const std::vector<char>& color_profile); |
| 489 | 492 |
| 490 virtual void OnOrientationChange(); | 493 virtual void OnOrientationChange(); |
| 491 | 494 |
| 492 // Override points to notify derived classes that a paint has happened. | 495 // Override points to notify derived classes that a paint has happened. |
| 493 // DidInitiatePaint happens when that has completed, and subsequent rendering | 496 // DidInitiatePaint happens when that has completed, and subsequent rendering |
| 494 // won't affect the painted content. DidFlushPaint happens once we've received | 497 // won't affect the painted content. DidFlushPaint happens once we've received |
| 495 // the ACK that the screen has been updated. For a given paint operation, | 498 // the ACK that the screen has been updated. For a given paint operation, |
| 496 // these overrides will always be called in the order DidInitiatePaint, | 499 // these overrides will always be called in the order DidInitiatePaint, |
| 497 // DidFlushPaint. | 500 // DidFlushPaint. |
| 498 virtual void DidInitiatePaint(); | 501 virtual void DidInitiatePaint() {} |
| 499 virtual void DidFlushPaint(); | 502 virtual void DidFlushPaint(); |
| 500 | 503 |
| 501 virtual GURL GetURLForGraphicsContext3D(); | 504 virtual GURL GetURLForGraphicsContext3D(); |
| 502 | 505 |
| 503 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should | 506 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should |
| 504 // use this method so that we can properly inform the RenderThread of our | 507 // use this method so that we can properly inform the RenderThread of our |
| 505 // state. | 508 // state. |
| 506 void SetHidden(bool hidden); | 509 void SetHidden(bool hidden); |
| 507 | 510 |
| 508 void DidToggleFullscreen(); | 511 void DidToggleFullscreen(); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 bool has_host_context_menu_location_; | 754 bool has_host_context_menu_location_; |
| 752 gfx::Point host_context_menu_location_; | 755 gfx::Point host_context_menu_location_; |
| 753 | 756 |
| 754 std::unique_ptr<scheduler::RenderWidgetSchedulingState> | 757 std::unique_ptr<scheduler::RenderWidgetSchedulingState> |
| 755 render_widget_scheduling_state_; | 758 render_widget_scheduling_state_; |
| 756 | 759 |
| 757 private: | 760 private: |
| 758 // When emulated, this returns original device scale factor. | 761 // When emulated, this returns original device scale factor. |
| 759 float GetOriginalDeviceScaleFactor() const; | 762 float GetOriginalDeviceScaleFactor() const; |
| 760 | 763 |
| 764 // Indicates whether this widget has focus. |
| 765 bool has_focus_; |
| 766 |
| 761 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 767 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 762 }; | 768 }; |
| 763 | 769 |
| 764 } // namespace content | 770 } // namespace content |
| 765 | 771 |
| 766 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 772 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |