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_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 view_.SetLayer(cc::Layer::Create()); | 447 view_.SetLayer(cc::Layer::Create()); |
448 if (using_browser_compositor_) { | 448 if (using_browser_compositor_) { |
449 // This FrameSinkId must be unique with ContextProviderFactory's FrameSinkId | 449 // This FrameSinkId must be unique with ContextProviderFactory's FrameSinkId |
450 // allocation. | 450 // allocation. |
451 // TODO(crbug.com/685777): Centralize allocation in one place for easier | 451 // TODO(crbug.com/685777): Centralize allocation in one place for easier |
452 // maintenance. | 452 // maintenance. |
453 cc::FrameSinkId frame_sink_id = cc::FrameSinkId( | 453 cc::FrameSinkId frame_sink_id = cc::FrameSinkId( |
454 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), | 454 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), |
455 base::checked_cast<uint32_t>(host_->GetRoutingID())); | 455 base::checked_cast<uint32_t>(host_->GetRoutingID())); |
456 delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid( | 456 delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid( |
457 &view_, cached_background_color_, this, frame_sink_id)); | 457 &view_, CompositorImpl::GetSurfaceManager(), cached_background_color_, |
| 458 this, frame_sink_id)); |
458 } | 459 } |
459 | 460 |
460 host_->SetView(this); | 461 host_->SetView(this); |
461 SetContentViewCore(content_view_core); | 462 SetContentViewCore(content_view_core); |
462 | 463 |
463 CreateOverscrollControllerIfPossible(); | 464 CreateOverscrollControllerIfPossible(); |
464 | 465 |
465 if (GetTextInputManager()) | 466 if (GetTextInputManager()) |
466 GetTextInputManager()->AddObserver(this); | 467 GetTextInputManager()->AddObserver(this); |
467 } | 468 } |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 1999 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
1999 if (!compositor) | 2000 if (!compositor) |
2000 return; | 2001 return; |
2001 | 2002 |
2002 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2003 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
2003 overscroll_refresh_handler, compositor, | 2004 overscroll_refresh_handler, compositor, |
2004 ui::GetScaleFactorForNativeView(GetNativeView())); | 2005 ui::GetScaleFactorForNativeView(GetNativeView())); |
2005 } | 2006 } |
2006 | 2007 |
2007 } // namespace content | 2008 } // namespace content |
OLD | NEW |