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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 int selection_end); | 248 int selection_end); |
249 virtual void OnImeConfirmComposition( | 249 virtual void OnImeConfirmComposition( |
250 const string16& text, const ui::Range& replacement_range); | 250 const string16& text, const ui::Range& replacement_range); |
251 void OnMsgPaintAtSize(const TransportDIB::Handle& dib_id, | 251 void OnMsgPaintAtSize(const TransportDIB::Handle& dib_id, |
252 int tag, | 252 int tag, |
253 const gfx::Size& page_size, | 253 const gfx::Size& page_size, |
254 const gfx::Size& desired_size); | 254 const gfx::Size& desired_size); |
255 void OnMsgRepaint(const gfx::Size& size_to_paint); | 255 void OnMsgRepaint(const gfx::Size& size_to_paint); |
256 void OnSetTextDirection(WebKit::WebTextDirection direction); | 256 void OnSetTextDirection(WebKit::WebTextDirection direction); |
257 void OnGetFPS(); | 257 void OnGetFPS(); |
258 void OnInvertWebContent(bool invert); | |
259 | 258 |
260 // Override points to notify derived classes that a paint has happened. | 259 // Override points to notify derived classes that a paint has happened. |
261 // WillInitiatePaint happens when we're about to generate a new bitmap and | 260 // WillInitiatePaint happens when we're about to generate a new bitmap and |
262 // send it to the browser. DidInitiatePaint happens when that has completed, | 261 // send it to the browser. DidInitiatePaint happens when that has completed, |
263 // and subsequent rendering won't affect the painted content. DidFlushPaint | 262 // and subsequent rendering won't affect the painted content. DidFlushPaint |
264 // happens once we've received the ACK that the screen has been updated. | 263 // happens once we've received the ACK that the screen has been updated. |
265 // For a given paint operation, these overrides will always be called in the | 264 // For a given paint operation, these overrides will always be called in the |
266 // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint. | 265 // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint. |
267 virtual void WillInitiatePaint() {} | 266 virtual void WillInitiatePaint() {} |
268 virtual void DidInitiatePaint() {} | 267 virtual void DidInitiatePaint() {} |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 // case NULL is added to the queue. | 521 // case NULL is added to the queue. |
523 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; | 522 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; |
524 | 523 |
525 // Properties of the screen hosting this RenderWidget instance. | 524 // Properties of the screen hosting this RenderWidget instance. |
526 WebKit::WebScreenInfo screen_info_; | 525 WebKit::WebScreenInfo screen_info_; |
527 | 526 |
528 // The device scale factor. This value is computed from the DPI entries in | 527 // The device scale factor. This value is computed from the DPI entries in |
529 // |screen_info_| on some platforms, and defaults to 1 on other platforms. | 528 // |screen_info_| on some platforms, and defaults to 1 on other platforms. |
530 int device_scale_factor_; | 529 int device_scale_factor_; |
531 | 530 |
532 // Set to true if we should invert all pixels. | |
533 bool invert_; | |
534 | |
535 // The Skia paint object for inverting. | |
536 scoped_ptr<SkPaint> invert_paint_; | |
537 | |
538 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 531 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
539 }; | 532 }; |
540 | 533 |
541 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 534 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |