| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 view_->InitAsChild(NULL); | 1678 view_->InitAsChild(NULL); |
| 1679 aura::client::ParentWindowWithContext( | 1679 aura::client::ParentWindowWithContext( |
| 1680 view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(), | 1680 view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(), |
| 1681 gfx::Rect()); | 1681 gfx::Rect()); |
| 1682 view_->SetSize(view_size); | 1682 view_->SetSize(view_size); |
| 1683 view_->Show(); | 1683 view_->Show(); |
| 1684 | 1684 |
| 1685 view_->OnSwapCompositorFrame(0, | 1685 view_->OnSwapCompositorFrame(0, |
| 1686 MakeDelegatedFrame(1.f, view_size, view_rect)); | 1686 MakeDelegatedFrame(1.f, view_size, view_rect)); |
| 1687 std::unique_ptr<ui::LayerTreeOwner> cloned_owner( | 1687 std::unique_ptr<ui::LayerTreeOwner> cloned_owner( |
| 1688 wm::RecreateLayers(view_->GetNativeView())); | 1688 wm::RecreateLayers(view_->GetNativeView(), nullptr)); |
| 1689 | 1689 |
| 1690 cc::SurfaceId id = view_->GetDelegatedFrameHost()->SurfaceIdForTesting(); | 1690 cc::SurfaceId id = view_->GetDelegatedFrameHost()->SurfaceIdForTesting(); |
| 1691 if (!id.is_null()) { | 1691 if (!id.is_null()) { |
| 1692 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 1692 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| 1693 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 1693 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
| 1694 cc::Surface* surface = manager->GetSurfaceForId(id); | 1694 cc::Surface* surface = manager->GetSurfaceForId(id); |
| 1695 EXPECT_TRUE(surface); | 1695 EXPECT_TRUE(surface); |
| 1696 // Should be a SurfaceSequence for both the original and new layers. | 1696 // Should be a SurfaceSequence for both the original and new layers. |
| 1697 EXPECT_EQ(2u, surface->GetDestructionDependencyCount()); | 1697 EXPECT_EQ(2u, surface->GetDestructionDependencyCount()); |
| 1698 } | 1698 } |
| (...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4485 view()->OnGestureEvent(&gesture_event); | 4485 view()->OnGestureEvent(&gesture_event); |
| 4486 | 4486 |
| 4487 EXPECT_TRUE(delegate->context_menu_request_received()); | 4487 EXPECT_TRUE(delegate->context_menu_request_received()); |
| 4488 EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_TOUCH); | 4488 EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_TOUCH); |
| 4489 #endif | 4489 #endif |
| 4490 | 4490 |
| 4491 RenderViewHostFactory::set_is_real_render_view_host(false); | 4491 RenderViewHostFactory::set_is_real_render_view_host(false); |
| 4492 } | 4492 } |
| 4493 | 4493 |
| 4494 } // namespace content | 4494 } // namespace content |
| OLD | NEW |