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

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: More cleanup 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_SendCompositorProto,
no sievers 2015/11/14 00:13:43 nit: it's slightly contradictory between Send/OnHa
David Trainor- moved to gerrit 2015/11/16 04:33:58 Done.
477 OnHandleCompositorProto)
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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } 949 }
948 950
949 void RenderWidgetHostImpl::OnFirstPaintAfterLoad() { 951 void RenderWidgetHostImpl::OnFirstPaintAfterLoad() {
950 if (new_content_rendering_timeout_->IsRunning()) { 952 if (new_content_rendering_timeout_->IsRunning()) {
951 new_content_rendering_timeout_->Stop(); 953 new_content_rendering_timeout_->Stop();
952 } else { 954 } else {
953 received_paint_after_load_ = true; 955 received_paint_after_load_ = true;
954 } 956 }
955 } 957 }
956 958
959 void RenderWidgetHostImpl::OnHandleCompositorProto(
960 const std::vector<char>& proto) {
961 if (delegate_)
962 delegate_->HandleCompositorProto(this, proto);
963 }
964
957 void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) { 965 void RenderWidgetHostImpl::ForwardMouseEvent(const WebMouseEvent& mouse_event) {
958 ForwardMouseEventWithLatencyInfo(mouse_event, ui::LatencyInfo()); 966 ForwardMouseEventWithLatencyInfo(mouse_event, ui::LatencyInfo());
959 } 967 }
960 968
961 void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( 969 void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(
962 const blink::WebMouseEvent& mouse_event, 970 const blink::WebMouseEvent& mouse_event,
963 const ui::LatencyInfo& ui_latency) { 971 const ui::LatencyInfo& ui_latency) {
964 TRACE_EVENT2("input", "RenderWidgetHostImpl::ForwardMouseEvent", 972 TRACE_EVENT2("input", "RenderWidgetHostImpl::ForwardMouseEvent",
965 "x", mouse_event.x, "y", mouse_event.y); 973 "x", mouse_event.x, "y", mouse_event.y);
966 974
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1254 }
1247 1255
1248 bool RenderWidgetHostImpl::GetScreenColorProfile( 1256 bool RenderWidgetHostImpl::GetScreenColorProfile(
1249 std::vector<char>* color_profile) { 1257 std::vector<char>* color_profile) {
1250 DCHECK(color_profile->empty()); 1258 DCHECK(color_profile->empty());
1251 if (view_) 1259 if (view_)
1252 return view_->GetScreenColorProfile(color_profile); 1260 return view_->GetScreenColorProfile(color_profile);
1253 return false; 1261 return false;
1254 } 1262 }
1255 1263
1264 void RenderWidgetHostImpl::HandleCompositorProto(
no sievers 2015/11/14 00:13:43 oops, now i'm even more confused, 'Handle' overloa
David Trainor- moved to gerrit 2015/11/16 04:33:58 Yeah this is weird. I made it HandleCompositorPro
1265 const std::vector<char>& proto) {
1266 DCHECK(!proto.empty());
1267 Send(new ViewMsg_HandleCompositorProto(GetRoutingID(), proto));
1268 }
1269
1256 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { 1270 void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
1257 color_profile_out_of_date_ = true; 1271 color_profile_out_of_date_ = true;
1258 1272
1259 if (delegate_) 1273 if (delegate_)
1260 delegate_->ScreenInfoChanged(); 1274 delegate_->ScreenInfoChanged();
1261 1275
1262 // The resize message (which may not happen immediately) will carry with it 1276 // 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 1277 // the screen info as well as the new size (if the screen has changed scale
1264 // factor). 1278 // factor).
1265 WasResized(); 1279 WasResized();
(...skipping 940 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