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

Side by Side Diff: content/renderer/render_frame_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 source_frame, 2123 source_frame,
2124 frame_->document(), 2124 frame_->document(),
2125 channels); 2125 channels);
2126 frame_->dispatchMessageEventWithOriginCheck(target_origin, msg_event); 2126 frame_->dispatchMessageEventWithOriginCheck(target_origin, msg_event);
2127 } 2127 }
2128 2128
2129 void RenderFrameImpl::OnReload(bool ignore_cache) { 2129 void RenderFrameImpl::OnReload(bool ignore_cache) {
2130 frame_->reload(ignore_cache); 2130 frame_->reload(ignore_cache);
2131 } 2131 }
2132 2132
2133 void RenderFrameImpl::OnTextSurroundingSelectionRequest(size_t max_length) { 2133 void RenderFrameImpl::OnTextSurroundingSelectionRequest(uint32_t max_length) {
2134 blink::WebSurroundingText surroundingText; 2134 blink::WebSurroundingText surroundingText;
2135 surroundingText.initialize(frame_->selectionRange(), max_length); 2135 surroundingText.initialize(frame_->selectionRange(), max_length);
2136 2136
2137 if (surroundingText.isNull()) { 2137 if (surroundingText.isNull()) {
2138 // |surroundingText| might not be correctly initialized, for example if 2138 // |surroundingText| might not be correctly initialized, for example if
2139 // |frame_->selectionRange().isNull()|, in other words, if there was no 2139 // |frame_->selectionRange().isNull()|, in other words, if there was no
2140 // selection. 2140 // selection.
2141 Send(new FrameHostMsg_TextSurroundingSelectionResponse( 2141 Send(new FrameHostMsg_TextSurroundingSelectionResponse(
2142 routing_id_, base::string16(), 0, 0)); 2142 routing_id_, base::string16(), 0, 0));
2143 return; 2143 return;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 void RenderFrameImpl::DetachGuest(int element_instance_id) { 2336 void RenderFrameImpl::DetachGuest(int element_instance_id) {
2337 BrowserPluginManager::Get()->Detach(element_instance_id); 2337 BrowserPluginManager::Get()->Detach(element_instance_id);
2338 } 2338 }
2339 2339
2340 void RenderFrameImpl::SetSelectedText(const base::string16& selection_text, 2340 void RenderFrameImpl::SetSelectedText(const base::string16& selection_text,
2341 size_t offset, 2341 size_t offset,
2342 const gfx::Range& range) { 2342 const gfx::Range& range) {
2343 // Use the routing id of Render Widget Host. 2343 // Use the routing id of Render Widget Host.
2344 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), 2344 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(),
2345 selection_text, 2345 selection_text,
2346 offset, 2346 static_cast<uint32_t>(offset),
2347 range)); 2347 range));
2348 } 2348 }
2349 2349
2350 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( 2350 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable(
2351 v8::Isolate* isolate, 2351 v8::Isolate* isolate,
2352 v8::Local<v8::Context> context) { 2352 v8::Local<v8::Context> context) {
2353 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); 2353 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context);
2354 if (registry->available_modules().count(mojo::js::Core::kModuleName)) 2354 if (registry->available_modules().count(mojo::js::Core::kModuleName))
2355 return; 2355 return;
2356 2356
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 log_severity = logging::LOG_ERROR; 2814 log_severity = logging::LOG_ERROR;
2815 break; 2815 break;
2816 default: 2816 default:
2817 log_severity = logging::LOG_VERBOSE; 2817 log_severity = logging::LOG_VERBOSE;
2818 } 2818 }
2819 2819
2820 if (shouldReportDetailedMessageForSource(source_name)) { 2820 if (shouldReportDetailedMessageForSource(source_name)) {
2821 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, 2821 FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
2822 DetailedConsoleMessageAdded( 2822 DetailedConsoleMessageAdded(
2823 message.text, source_name, stack_trace, source_line, 2823 message.text, source_name, stack_trace, source_line,
2824 static_cast<int32_t>(log_severity))); 2824 static_cast<uint32_t>(log_severity)));
2825 } 2825 }
2826 2826
2827 Send(new FrameHostMsg_AddMessageToConsole( 2827 Send(new FrameHostMsg_AddMessageToConsole(
2828 routing_id_, static_cast<int32_t>(log_severity), message.text, 2828 routing_id_, static_cast<int32_t>(log_severity), message.text,
2829 static_cast<int32_t>(source_line), source_name)); 2829 static_cast<int32_t>(source_line), source_name));
2830 } 2830 }
2831 2831
2832 void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request, 2832 void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request,
2833 blink::WebNavigationPolicy policy, 2833 blink::WebNavigationPolicy policy,
2834 const blink::WebString& suggested_name, 2834 const blink::WebString& suggested_name,
(...skipping 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after
6084 int match_count, 6084 int match_count,
6085 int ordinal, 6085 int ordinal,
6086 const WebRect& selection_rect, 6086 const WebRect& selection_rect,
6087 bool final_status_update) { 6087 bool final_status_update) {
6088 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6088 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6089 selection_rect, ordinal, 6089 selection_rect, ordinal,
6090 final_status_update)); 6090 final_status_update));
6091 } 6091 }
6092 6092
6093 } // namespace content 6093 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698