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

Side by Side Diff: content/renderer/text_input_client_observer.cc

Issue 1962923002: Fix rendering of flash content inside an out-of-process iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing unneded includes Created 4 years, 7 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 | « content/renderer/render_widget_owner_delegate.h ('k') | no next file » | 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 #include "content/renderer/text_input_client_observer.h" 5 #include "content/renderer/text_input_client_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 blink::WebPoint web_point(point); 68 blink::WebPoint web_point(point);
69 uint32_t index = static_cast<uint32_t>( 69 uint32_t index = static_cast<uint32_t>(
70 webview()->focusedFrame()->characterIndexForPoint(web_point)); 70 webview()->focusedFrame()->characterIndexForPoint(web_point));
71 Send(new TextInputClientReplyMsg_GotCharacterIndexForPoint(routing_id(), 71 Send(new TextInputClientReplyMsg_GotCharacterIndexForPoint(routing_id(),
72 index)); 72 index));
73 } 73 }
74 74
75 void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) { 75 void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) {
76 gfx::Rect rect; 76 gfx::Rect rect;
77 #if defined(ENABLE_PLUGINS) 77 #if defined(ENABLE_PLUGINS)
78 if (render_view_impl_->focused_pepper_plugin()) { 78 if (render_view_impl_->GetFocusedPepperPlugin()) {
79 rect = render_view_impl_->focused_pepper_plugin()->GetCaretBounds(); 79 rect = render_view_impl_->GetFocusedPepperPlugin()->GetCaretBounds();
80 } else 80 } else
81 #endif 81 #endif
82 { 82 {
83 blink::WebFrame* frame = webview()->focusedFrame(); 83 blink::WebFrame* frame = webview()->focusedFrame();
84 if (frame) { 84 if (frame) {
85 blink::WebRect web_rect; 85 blink::WebRect web_rect;
86 frame->firstRectForCharacterRange(range.start(), range.length(), 86 frame->firstRectForCharacterRange(range.start(), range.length(),
87 web_rect); 87 web_rect);
88 rect = web_rect; 88 rect = web_rect;
89 } 89 }
(...skipping 13 matching lines...) Expand all
103 std::unique_ptr<const mac::AttributedStringCoder::EncodedString> encoded( 103 std::unique_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
104 mac::AttributedStringCoder::Encode(string)); 104 mac::AttributedStringCoder::Encode(string));
105 Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(), 105 Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(),
106 *encoded.get(), baselinePoint)); 106 *encoded.get(), baselinePoint));
107 #else 107 #else
108 NOTIMPLEMENTED(); 108 NOTIMPLEMENTED();
109 #endif 109 #endif
110 } 110 }
111 111
112 } // namespace content 112 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget_owner_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698