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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1442853005: Add IPC messages to transfer compositor protos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapped char to uint8_t, added checked_cast, updated description Created 5 years, 1 month 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 #if defined(OS_WIN) 466 #if defined(OS_WIN)
467 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated, 467 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated,
468 OnWindowlessPluginDummyWindowCreated) 468 OnWindowlessPluginDummyWindowCreated)
469 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowDestroyed, 469 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
470 OnWindowlessPluginDummyWindowDestroyed) 470 OnWindowlessPluginDummyWindowDestroyed)
471 #endif 471 #endif
472 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, 472 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged,
473 OnImeCompositionRangeChanged) 473 OnImeCompositionRangeChanged)
474 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstPaintAfterLoad, 474 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstPaintAfterLoad,
475 OnFirstPaintAfterLoad) 475 OnFirstPaintAfterLoad)
476 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardCompositorProto,
477 OnForwardCompositorProto)
476 IPC_MESSAGE_UNHANDLED(handled = false) 478 IPC_MESSAGE_UNHANDLED(handled = false)
477 IPC_END_MESSAGE_MAP() 479 IPC_END_MESSAGE_MAP()
478 480
479 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) 481 if (!handled && input_router_ && input_router_->OnMessageReceived(msg))
480 return true; 482 return true;
481 483
482 if (!handled && view_ && view_->OnMessageReceived(msg)) 484 if (!handled && view_ && view_->OnMessageReceived(msg))
483 return true; 485 return true;
484 486
485 return handled; 487 return handled;
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1248 }
1247 1249
1248 bool RenderWidgetHostImpl::GetScreenColorProfile( 1250 bool RenderWidgetHostImpl::GetScreenColorProfile(
1249 std::vector<char>* color_profile) { 1251 std::vector<char>* color_profile) {
1250 DCHECK(color_profile->empty()); 1252 DCHECK(color_profile->empty());
1251 if (view_) 1253 if (view_)
1252 return view_->GetScreenColorProfile(color_profile); 1254 return view_->GetScreenColorProfile(color_profile);
1253 return false; 1255 return false;
1254 } 1256 }
1255 1257
1258 void RenderWidgetHostImpl::HandleCompositorProto(
1259 const std::vector<uint8_t>& proto) {
1260 DCHECK(!proto.empty());
1261 Send(new ViewMsg_HandleCompositorProto(GetRoutingID(), proto));
1262 }
1263
1256 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { 1264 void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
1257 color_profile_out_of_date_ = true; 1265 color_profile_out_of_date_ = true;
1258 1266
1259 if (delegate_) 1267 if (delegate_)
1260 delegate_->ScreenInfoChanged(); 1268 delegate_->ScreenInfoChanged();
1261 1269
1262 // The resize message (which may not happen immediately) will carry with it 1270 // The resize message (which may not happen immediately) will carry with it
1263 // the screen info as well as the new size (if the screen has changed scale 1271 // the screen info as well as the new size (if the screen has changed scale
1264 // factor). 1272 // factor).
1265 WasResized(); 1273 WasResized();
(...skipping 18 matching lines...) Expand all
1284 view_->SelectionChanged(text, offset, range); 1292 view_->SelectionChanged(text, offset, range);
1285 } 1293 }
1286 1294
1287 void RenderWidgetHostImpl::OnSelectionBoundsChanged( 1295 void RenderWidgetHostImpl::OnSelectionBoundsChanged(
1288 const ViewHostMsg_SelectionBounds_Params& params) { 1296 const ViewHostMsg_SelectionBounds_Params& params) {
1289 if (view_) { 1297 if (view_) {
1290 view_->SelectionBoundsChanged(params); 1298 view_->SelectionBoundsChanged(params);
1291 } 1299 }
1292 } 1300 }
1293 1301
1302 void RenderWidgetHostImpl::OnForwardCompositorProto(
1303 const std::vector<uint8_t>& proto) {
1304 if (delegate_)
1305 delegate_->ForwardCompositorProto(this, proto);
1306 }
1307
1294 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, 1308 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase,
1295 base::TimeDelta interval) { 1309 base::TimeDelta interval) {
1296 Send(new ViewMsg_UpdateVSyncParameters(GetRoutingID(), timebase, interval)); 1310 Send(new ViewMsg_UpdateVSyncParameters(GetRoutingID(), timebase, interval));
1297 } 1311 }
1298 1312
1299 void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status, 1313 void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
1300 int exit_code) { 1314 int exit_code) {
1301 if (!renderer_initialized_) 1315 if (!renderer_initialized_)
1302 return; 1316 return;
1303 1317
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 } 2220 }
2207 2221
2208 #if defined(OS_WIN) 2222 #if defined(OS_WIN)
2209 gfx::NativeViewAccessible 2223 gfx::NativeViewAccessible
2210 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2224 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2211 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2225 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2212 } 2226 }
2213 #endif 2227 #endif
2214 2228
2215 } // namespace content 2229 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698