Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 // given output parameters. | 239 // given output parameters. |
| 240 // | 240 // |
| 241 // A return value of null means optimized painting can not be used and we | 241 // A return value of null means optimized painting can not be used and we |
| 242 // should continue with the normal painting code path. | 242 // should continue with the normal painting code path. |
| 243 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint( | 243 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint( |
| 244 const gfx::Rect& paint_bounds, | 244 const gfx::Rect& paint_bounds, |
| 245 TransportDIB** dib, | 245 TransportDIB** dib, |
| 246 gfx::Rect* location, | 246 gfx::Rect* location, |
| 247 gfx::Rect* clip); | 247 gfx::Rect* clip); |
| 248 | 248 |
| 249 // Gets the size of the document according to WebKit. | |
| 250 virtual gfx::Size GetContentSize(); | |
|
jam
2011/09/02 17:11:41
what's the point of adding these virtual methods t
Fady Samuel
2011/09/08 23:46:39
Done.
| |
| 251 virtual float GetPageScaleFactor(); | |
| 252 | |
| 249 // Gets the scroll offset of this widget, if this widget has a notion of | 253 // Gets the scroll offset of this widget, if this widget has a notion of |
| 250 // scroll offset. | 254 // scroll offset. |
| 251 virtual gfx::Point GetScrollOffset(); | 255 virtual gfx::Point GetScrollOffset(); |
| 252 | 256 |
| 257 | |
|
jam
2011/09/02 17:11:41
?
Fady Samuel
2011/09/08 23:46:39
Done.
| |
| 253 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should | 258 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should |
| 254 // use this method so that we can properly inform the RenderThread of our | 259 // use this method so that we can properly inform the RenderThread of our |
| 255 // state. | 260 // state. |
| 256 void SetHidden(bool hidden); | 261 void SetHidden(bool hidden); |
| 257 | 262 |
| 258 bool is_hidden() const { return is_hidden_; } | 263 bool is_hidden() const { return is_hidden_; } |
| 259 | 264 |
| 260 // True if an UpdateRect_ACK message is pending. | 265 // True if an UpdateRect_ACK message is pending. |
| 261 bool update_reply_pending() const { | 266 bool update_reply_pending() const { |
| 262 return update_reply_pending_; | 267 return update_reply_pending_; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 418 // While we are waiting for the browser to update window sizes, | 423 // While we are waiting for the browser to update window sizes, |
| 419 // we track the pending size temporarily. | 424 // we track the pending size temporarily. |
| 420 int pending_window_rect_count_; | 425 int pending_window_rect_count_; |
| 421 WebKit::WebRect pending_window_rect_; | 426 WebKit::WebRect pending_window_rect_; |
| 422 | 427 |
| 423 scoped_ptr<IPC::Message> pending_input_event_ack_; | 428 scoped_ptr<IPC::Message> pending_input_event_ack_; |
| 424 | 429 |
| 425 // Indicates if the next sequence of Char events should be suppressed or not. | 430 // Indicates if the next sequence of Char events should be suppressed or not. |
| 426 bool suppress_next_char_events_; | 431 bool suppress_next_char_events_; |
| 427 | 432 |
| 433 // Whether the page scale factor has been set by the page viewport tag or | |
| 434 // user. If not, we may choose to zoom out to fit all the content width. | |
| 435 bool page_scale_factor_set_; | |
| 436 | |
| 428 // Set to true if painting to the window is handled by the accelerated | 437 // Set to true if painting to the window is handled by the accelerated |
| 429 // compositor. | 438 // compositor. |
| 430 bool is_accelerated_compositing_active_; | 439 bool is_accelerated_compositing_active_; |
| 431 | 440 |
| 432 base::Time animation_floor_time_; | 441 base::Time animation_floor_time_; |
| 433 bool animation_update_pending_; | 442 bool animation_update_pending_; |
| 434 bool animation_task_posted_; | 443 bool animation_task_posted_; |
| 435 bool invalidation_task_posted_; | 444 bool invalidation_task_posted_; |
| 436 | 445 |
| 437 bool has_disable_gpu_vsync_switch_; | 446 bool has_disable_gpu_vsync_switch_; |
| 438 base::TimeTicks last_do_deferred_update_time_; | 447 base::TimeTicks last_do_deferred_update_time_; |
| 439 | 448 |
| 440 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 449 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 441 }; | 450 }; |
| 442 | 451 |
| 443 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 452 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |