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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <vector> | 10 #include <vector> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 int selection_end); | 225 int selection_end); |
226 virtual void OnImeConfirmComposition( | 226 virtual void OnImeConfirmComposition( |
227 const string16& text, const ui::Range& replacement_range); | 227 const string16& text, const ui::Range& replacement_range); |
228 void OnMsgPaintAtSize(const TransportDIB::Handle& dib_id, | 228 void OnMsgPaintAtSize(const TransportDIB::Handle& dib_id, |
229 int tag, | 229 int tag, |
230 const gfx::Size& page_size, | 230 const gfx::Size& page_size, |
231 const gfx::Size& desired_size); | 231 const gfx::Size& desired_size); |
232 void OnMsgRepaint(const gfx::Size& size_to_paint); | 232 void OnMsgRepaint(const gfx::Size& size_to_paint); |
233 void OnSetTextDirection(WebKit::WebTextDirection direction); | 233 void OnSetTextDirection(WebKit::WebTextDirection direction); |
234 void OnGetFPS(); | 234 void OnGetFPS(); |
| 235 void OnInvertWebContent(bool invert); |
235 | 236 |
236 // Override points to notify derived classes that a paint has happened. | 237 // Override points to notify derived classes that a paint has happened. |
237 // WillInitiatePaint happens when we're about to generate a new bitmap and | 238 // WillInitiatePaint happens when we're about to generate a new bitmap and |
238 // send it to the browser. DidInitiatePaint happens when that has completed, | 239 // send it to the browser. DidInitiatePaint happens when that has completed, |
239 // and subsequent rendering won't affect the painted content. DidFlushPaint | 240 // and subsequent rendering won't affect the painted content. DidFlushPaint |
240 // happens once we've received the ACK that the screen has been updated. | 241 // happens once we've received the ACK that the screen has been updated. |
241 // For a given paint operation, these overrides will always be called in the | 242 // For a given paint operation, these overrides will always be called in the |
242 // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint. | 243 // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint. |
243 virtual void WillInitiatePaint() {} | 244 virtual void WillInitiatePaint() {} |
244 virtual void DidInitiatePaint() {} | 245 virtual void DidInitiatePaint() {} |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. | 487 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. |
487 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; | 488 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; |
488 | 489 |
489 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to | 490 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to |
490 // delay sending of UpdateRect until the corresponding SwapBuffers has been | 491 // delay sending of UpdateRect until the corresponding SwapBuffers has been |
491 // executed. Since we can have several in flight, we need to keep them in a | 492 // executed. Since we can have several in flight, we need to keep them in a |
492 // queue. Note: some SwapBuffers may not correspond to an update, in which | 493 // queue. Note: some SwapBuffers may not correspond to an update, in which |
493 // case NULL is added to the queue. | 494 // case NULL is added to the queue. |
494 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; | 495 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; |
495 | 496 |
| 497 // Set to true if we should invert all pixels. |
| 498 bool invert_; |
| 499 |
| 500 // The Skia paint object for inverting. |
| 501 scoped_ptr<SkPaint> invert_paint_; |
| 502 |
496 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 503 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
497 }; | 504 }; |
498 | 505 |
499 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 506 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |