Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 1327743002: Avoid sync IPCs for firstRectForCharacterRange/attributedSubstringForProposedRange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed palmer@'s comment.s Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 void ForwardMouseEvent(const blink::WebMouseEvent& event); 355 void ForwardMouseEvent(const blink::WebMouseEvent& event);
356 356
357 void KillSelf(); 357 void KillSelf();
358 358
359 void SetTextInputActive(bool active); 359 void SetTextInputActive(bool active);
360 360
361 // Sends completed plugin IME notification and text back to the renderer. 361 // Sends completed plugin IME notification and text back to the renderer.
362 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id); 362 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id);
363 363
364 const std::string& selected_text() const { return selected_text_; } 364 const std::string& selected_text() const { return selected_text_; }
365 const gfx::Range& composition_range() const { return composition_range_; }
366 const base::string16& selection_text() const { return selection_text_; }
367 size_t selection_text_offset() const { return selection_text_offset_; }
365 368
366 // Returns true and stores first rectangle for character range if the 369 // Returns true and stores first rectangle for character range if the
367 // requested |range| is already cached, otherwise returns false. 370 // requested |range| is already cached, otherwise returns false.
368 // Exposed for testing. 371 // Exposed for testing.
369 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange( 372 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange(
370 NSRange range, NSRect* rect, NSRange* actual_range); 373 NSRange range, NSRect* rect, NSRange* actual_range);
371 374
372 // Returns true if there is line break in |range| and stores line breaking 375 // Returns true if there is line break in |range| and stores line breaking
373 // point to |line_breaking_point|. The |line_break_point| is valid only if 376 // point to |line_breaking_point|. The |line_break_point| is valid only if
374 // this function returns true. 377 // this function returns true.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 base::TimeTicks vsync_timebase_; 583 base::TimeTicks vsync_timebase_;
581 base::TimeDelta vsync_interval_; 584 base::TimeDelta vsync_interval_;
582 585
583 // The current composition character range and its bounds. 586 // The current composition character range and its bounds.
584 gfx::Range composition_range_; 587 gfx::Range composition_range_;
585 std::vector<gfx::Rect> composition_bounds_; 588 std::vector<gfx::Rect> composition_bounds_;
586 589
587 // The current caret bounds. 590 // The current caret bounds.
588 gfx::Rect caret_rect_; 591 gfx::Rect caret_rect_;
589 592
593 // The current first selection bounds.
594 gfx::Rect first_selection_rect_;
595
590 // Factory used to safely scope delayed calls to ShutdownHost(). 596 // Factory used to safely scope delayed calls to ShutdownHost().
591 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 597 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
592 598
593 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 599 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
594 }; 600 };
595 601
596 } // namespace content 602 } // namespace content
597 603
598 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 604 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698