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 base::string16& selection_text() const { return selection_text_; } | |
366 size_t selection_text_offset() const { return selection_text_offset_; } | |
367 | 364 |
368 // Returns true and stores first rectangle for character range if the | 365 // Returns true and stores first rectangle for character range if the |
369 // requested |range| is already cached, otherwise returns false. | 366 // requested |range| is already cached, otherwise returns false. |
370 // Exposed for testing. | 367 // Exposed for testing. |
371 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( | 368 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( |
372 NSRange range, NSRect* rect, NSRange* actual_range); | 369 NSRange range, NSRect* rect, NSRange* actual_range); |
373 | 370 |
374 // Returns true if there is line break in |range| and stores line breaking | 371 // Returns true if there is line break in |range| and stores line breaking |
375 // point to |line_breaking_point|. The |line_break_point| is valid only if | 372 // point to |line_breaking_point|. The |line_break_point| is valid only if |
376 // this function returns true. | 373 // this function returns true. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 base::TimeTicks vsync_timebase_; | 578 base::TimeTicks vsync_timebase_; |
582 base::TimeDelta vsync_interval_; | 579 base::TimeDelta vsync_interval_; |
583 | 580 |
584 // The current composition character range and its bounds. | 581 // The current composition character range and its bounds. |
585 gfx::Range composition_range_; | 582 gfx::Range composition_range_; |
586 std::vector<gfx::Rect> composition_bounds_; | 583 std::vector<gfx::Rect> composition_bounds_; |
587 | 584 |
588 // The current caret bounds. | 585 // The current caret bounds. |
589 gfx::Rect caret_rect_; | 586 gfx::Rect caret_rect_; |
590 | 587 |
591 // The current first selection bounds. | |
592 gfx::Rect first_selection_rect_; | |
593 | |
594 // Factory used to safely scope delayed calls to ShutdownHost(). | 588 // Factory used to safely scope delayed calls to ShutdownHost(). |
595 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 589 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
596 | 590 |
597 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
598 }; | 592 }; |
599 | 593 |
600 } // namespace content | 594 } // namespace content |
601 | 595 |
602 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |