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

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

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry Created 4 years, 10 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
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 "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 mac::AttributedStringCoder::Encode(string)); 58 mac::AttributedStringCoder::Encode(string));
59 Send(new TextInputClientReplyMsg_GotStringAtPoint( 59 Send(new TextInputClientReplyMsg_GotStringAtPoint(
60 routing_id(), *encoded.get(), baselinePoint)); 60 routing_id(), *encoded.get(), baselinePoint));
61 #else 61 #else
62 NOTIMPLEMENTED(); 62 NOTIMPLEMENTED();
63 #endif 63 #endif
64 } 64 }
65 65
66 void TextInputClientObserver::OnCharacterIndexForPoint(gfx::Point point) { 66 void TextInputClientObserver::OnCharacterIndexForPoint(gfx::Point point) {
67 blink::WebPoint web_point(point); 67 blink::WebPoint web_point(point);
68 size_t index = webview()->focusedFrame()->characterIndexForPoint(web_point); 68 uint32_t index = static_cast<uint32_t>(
69 webview()->focusedFrame()->characterIndexForPoint(web_point));
69 Send(new TextInputClientReplyMsg_GotCharacterIndexForPoint(routing_id(), 70 Send(new TextInputClientReplyMsg_GotCharacterIndexForPoint(routing_id(),
70 index)); 71 index));
71 } 72 }
72 73
73 void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) { 74 void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) {
74 gfx::Rect rect; 75 gfx::Rect rect;
75 #if defined(ENABLE_PLUGINS) 76 #if defined(ENABLE_PLUGINS)
76 if (render_view_impl_->focused_pepper_plugin()) { 77 if (render_view_impl_->focused_pepper_plugin()) {
77 rect = render_view_impl_->focused_pepper_plugin()->GetCaretBounds(); 78 rect = render_view_impl_->focused_pepper_plugin()->GetCaretBounds();
78 } else 79 } else
(...skipping 22 matching lines...) Expand all
101 scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded( 102 scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
102 mac::AttributedStringCoder::Encode(string)); 103 mac::AttributedStringCoder::Encode(string));
103 Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(), 104 Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(),
104 *encoded.get(), baselinePoint)); 105 *encoded.get(), baselinePoint));
105 #else 106 #else
106 NOTIMPLEMENTED(); 107 NOTIMPLEMENTED();
107 #endif 108 #endif
108 } 109 }
109 110
110 } // namespace content 111 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698