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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <list> | 9 #include <list> |
10 | 10 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // Call setNeedsDisplay on the cocoa_view_. The IOSurface will be drawn during | 328 // Call setNeedsDisplay on the cocoa_view_. The IOSurface will be drawn during |
329 // the next drawRect. Return true if the Ack should be sent, false if it | 329 // the next drawRect. Return true if the Ack should be sent, false if it |
330 // should be deferred until drawRect. | 330 // should be deferred until drawRect. |
331 bool CompositorSwapBuffers(uint64 surface_handle); | 331 bool CompositorSwapBuffers(uint64 surface_handle); |
332 // Ack pending SwapBuffers requests, if any, to unblock the GPU process. Has | 332 // Ack pending SwapBuffers requests, if any, to unblock the GPU process. Has |
333 // no effect if there are no pending requests. | 333 // no effect if there are no pending requests. |
334 void AckPendingSwapBuffers(); | 334 void AckPendingSwapBuffers(); |
335 | 335 |
336 // Returns true and stores first rectangle for character range if the | 336 // Returns true and stores first rectangle for character range if the |
337 // requested |range| is already cached, otherwise returns false. | 337 // requested |range| is already cached, otherwise returns false. |
338 bool GetCachedFirstRectForCharacterRange(NSRange range, NSRect* rect, | 338 // Exposed for testing. |
339 NSRange* actual_range); | 339 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( |
| 340 NSRange range, NSRect* rect, NSRange* actual_range); |
340 | 341 |
341 // Returns true if there is line break in |range| and stores line breaking | 342 // Returns true if there is line break in |range| and stores line breaking |
342 // point to |line_breaking_point|. The |line_break_point| is valid only if | 343 // point to |line_breaking_point|. The |line_break_point| is valid only if |
343 // this function returns true. | 344 // this function returns true. |
344 bool GetLineBreakIndex(const std::vector<gfx::Rect>& bounds, | 345 bool GetLineBreakIndex(const std::vector<gfx::Rect>& bounds, |
345 const ui::Range& range, | 346 const ui::Range& range, |
346 size_t* line_break_point); | 347 size_t* line_break_point); |
347 | 348 |
348 // Returns composition character boundary rectangle. The |range| is | 349 // Returns composition character boundary rectangle. The |range| is |
349 // composition based range. Also stores |actual_range| which is corresponding | 350 // composition based range. Also stores |actual_range| which is corresponding |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 459 |
459 // The current caret bounds. | 460 // The current caret bounds. |
460 gfx::Rect caret_rect_; | 461 gfx::Rect caret_rect_; |
461 | 462 |
462 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 463 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
463 }; | 464 }; |
464 | 465 |
465 } // namespace content | 466 } // namespace content |
466 | 467 |
467 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 468 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |