| 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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 ui::mojom::kEmbedFlagEmbedderInterceptsEvents, | 1908 ui::mojom::kEmbedFlagEmbedderInterceptsEvents, |
| 1909 base::Bind(&EmbedCallback)); | 1909 base::Bind(&EmbedCallback)); |
| 1910 } | 1910 } |
| 1911 | 1911 |
| 1912 void RenderWidgetHostViewAura::CreateDelegatedFrameHostClient() { | 1912 void RenderWidgetHostViewAura::CreateDelegatedFrameHostClient() { |
| 1913 if (IsMus()) | 1913 if (IsMus()) |
| 1914 return; | 1914 return; |
| 1915 | 1915 |
| 1916 // GuestViews have two RenderWidgetHostViews and so we need to make sure | 1916 // GuestViews have two RenderWidgetHostViews and so we need to make sure |
| 1917 // we don't have FrameSinkId collisions. | 1917 // we don't have FrameSinkId collisions. |
| 1918 // The FrameSinkId generated here must be unique with FrameSinkId allocated |
| 1919 // in ContextFactoryPrivate. |
| 1920 // TODO(crbug.com/685777): Centralize allocation in one place for easier |
| 1921 // maintenance. |
| 1918 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 1922 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| 1919 cc::FrameSinkId frame_sink_id = | 1923 cc::FrameSinkId frame_sink_id = |
| 1920 is_guest_view_hack_ | 1924 is_guest_view_hack_ |
| 1921 ? factory->GetContextFactoryPrivate()->AllocateFrameSinkId() | 1925 ? factory->GetContextFactoryPrivate()->AllocateFrameSinkId() |
| 1922 : cc::FrameSinkId( | 1926 : cc::FrameSinkId( |
| 1923 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), | 1927 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), |
| 1924 base::checked_cast<uint32_t>(host_->GetRoutingID())); | 1928 base::checked_cast<uint32_t>(host_->GetRoutingID())); |
| 1925 // Tests may set |delegated_frame_host_client_|. | 1929 // Tests may set |delegated_frame_host_client_|. |
| 1926 if (!delegated_frame_host_client_) { | 1930 if (!delegated_frame_host_client_) { |
| 1927 delegated_frame_host_client_ = | 1931 delegated_frame_host_client_ = |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2374 | 2378 |
| 2375 void RenderWidgetHostViewAura::SetPopupChild( | 2379 void RenderWidgetHostViewAura::SetPopupChild( |
| 2376 RenderWidgetHostViewAura* popup_child_host_view) { | 2380 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2377 popup_child_host_view_ = popup_child_host_view; | 2381 popup_child_host_view_ = popup_child_host_view; |
| 2378 event_handler_->SetPopupChild( | 2382 event_handler_->SetPopupChild( |
| 2379 popup_child_host_view, | 2383 popup_child_host_view, |
| 2380 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2384 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2381 } | 2385 } |
| 2382 | 2386 |
| 2383 } // namespace content | 2387 } // namespace content |
| OLD | NEW |