OLD | NEW |
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 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 void RenderWidgetHostImpl::SetView(RenderWidgetHostViewBase* view) { | 324 void RenderWidgetHostImpl::SetView(RenderWidgetHostViewBase* view) { |
325 if (view) | 325 if (view) |
326 view_ = view->GetWeakPtr(); | 326 view_ = view->GetWeakPtr(); |
327 else | 327 else |
328 view_.reset(); | 328 view_.reset(); |
329 | 329 |
330 // If the renderer has not yet been initialized, then the surface ID | 330 // If the renderer has not yet been initialized, then the surface ID |
331 // namespace will be sent during initialization. | 331 // namespace will be sent during initialization. |
332 if (view_ && renderer_initialized_) { | 332 if (view_ && renderer_initialized_) { |
333 Send(new ViewMsg_SetSurfaceIdNamespace(routing_id_, | 333 Send(new ViewMsg_SetSurfaceClientId(routing_id_, |
334 view_->GetSurfaceIdNamespace())); | 334 view_->GetSurfaceClientId())); |
335 } | 335 } |
336 | 336 |
337 synthetic_gesture_controller_.reset(); | 337 synthetic_gesture_controller_.reset(); |
338 } | 338 } |
339 | 339 |
340 RenderProcessHost* RenderWidgetHostImpl::GetProcess() const { | 340 RenderProcessHost* RenderWidgetHostImpl::GetProcess() const { |
341 return process_; | 341 return process_; |
342 } | 342 } |
343 | 343 |
344 int RenderWidgetHostImpl::GetRoutingID() const { | 344 int RenderWidgetHostImpl::GetRoutingID() const { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 } | 396 } |
397 | 397 |
398 void RenderWidgetHostImpl::Init() { | 398 void RenderWidgetHostImpl::Init() { |
399 DCHECK(process_->HasConnection()); | 399 DCHECK(process_->HasConnection()); |
400 | 400 |
401 renderer_initialized_ = true; | 401 renderer_initialized_ = true; |
402 | 402 |
403 // If the RWHV has not yet been set, the surface ID namespace will get | 403 // If the RWHV has not yet been set, the surface ID namespace will get |
404 // passed down by the call to SetView(). | 404 // passed down by the call to SetView(). |
405 if (view_) { | 405 if (view_) { |
406 Send(new ViewMsg_SetSurfaceIdNamespace(routing_id_, | 406 Send(new ViewMsg_SetSurfaceClientId(routing_id_, |
407 view_->GetSurfaceIdNamespace())); | 407 view_->GetSurfaceClientId())); |
408 } | 408 } |
409 | 409 |
410 SendScreenRects(); | 410 SendScreenRects(); |
411 WasResized(); | 411 WasResized(); |
412 | 412 |
413 if (owner_delegate_) | 413 if (owner_delegate_) |
414 owner_delegate_->RenderWidgetDidInit(); | 414 owner_delegate_->RenderWidgetDidInit(); |
415 } | 415 } |
416 | 416 |
417 void RenderWidgetHostImpl::InitForFrame() { | 417 void RenderWidgetHostImpl::InitForFrame() { |
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2154 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2154 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
2155 } | 2155 } |
2156 | 2156 |
2157 BrowserAccessibilityManager* | 2157 BrowserAccessibilityManager* |
2158 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2158 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
2159 return delegate_ ? | 2159 return delegate_ ? |
2160 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2160 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
2161 } | 2161 } |
2162 | 2162 |
2163 } // namespace content | 2163 } // namespace content |
OLD | NEW |