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