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 <IOSurface/IOSurface.h> | 9 #include <IOSurface/IOSurface.h> |
10 #include <list> | 10 #include <list> |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 void ForwardMouseEvent(const blink::WebMouseEvent& event); | 354 void ForwardMouseEvent(const blink::WebMouseEvent& event); |
355 | 355 |
356 void KillSelf(); | 356 void KillSelf(); |
357 | 357 |
358 void SetTextInputActive(bool active); | 358 void SetTextInputActive(bool active); |
359 | 359 |
360 // Sends completed plugin IME notification and text back to the renderer. | 360 // Sends completed plugin IME notification and text back to the renderer. |
361 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id); | 361 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id); |
362 | 362 |
363 const std::string& selected_text() const { return selected_text_; } | 363 const std::string& selected_text() const { return selected_text_; } |
| 364 const gfx::Range& composition_range() const { return composition_range_; } |
| 365 const gfx::Range& selection_range() const { return selection_range_; } |
364 | 366 |
365 // Returns true and stores first rectangle for character range if the | 367 // Returns true and stores first rectangle for character range if the |
366 // requested |range| is already cached, otherwise returns false. | 368 // requested |range| is already cached, otherwise returns false. |
367 // Exposed for testing. | 369 // Exposed for testing. |
368 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( | 370 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( |
369 NSRange range, NSRect* rect, NSRange* actual_range); | 371 NSRange range, NSRect* rect, NSRange* actual_range); |
370 | 372 |
371 // Returns true if there is line break in |range| and stores line breaking | 373 // Returns true if there is line break in |range| and stores line breaking |
372 // point to |line_breaking_point|. The |line_break_point| is valid only if | 374 // point to |line_breaking_point|. The |line_break_point| is valid only if |
373 // this function returns true. | 375 // this function returns true. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 base::TimeTicks vsync_timebase_; | 580 base::TimeTicks vsync_timebase_; |
579 base::TimeDelta vsync_interval_; | 581 base::TimeDelta vsync_interval_; |
580 | 582 |
581 // The current composition character range and its bounds. | 583 // The current composition character range and its bounds. |
582 gfx::Range composition_range_; | 584 gfx::Range composition_range_; |
583 std::vector<gfx::Rect> composition_bounds_; | 585 std::vector<gfx::Rect> composition_bounds_; |
584 | 586 |
585 // The current caret bounds. | 587 // The current caret bounds. |
586 gfx::Rect caret_rect_; | 588 gfx::Rect caret_rect_; |
587 | 589 |
| 590 // The current first selection bounds. |
| 591 gfx::Rect first_selection_rect_; |
| 592 |
588 // Factory used to safely scope delayed calls to ShutdownHost(). | 593 // Factory used to safely scope delayed calls to ShutdownHost(). |
589 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 594 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
590 | 595 |
591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 596 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
592 }; | 597 }; |
593 | 598 |
594 } // namespace content | 599 } // namespace content |
595 | 600 |
596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 601 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |