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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 ImageTransportFactory::InitializeForUnitTests( | 384 ImageTransportFactory::InitializeForUnitTests( |
385 scoped_ptr<ImageTransportFactory>( | 385 scoped_ptr<ImageTransportFactory>( |
386 new NoTransportImageTransportFactory)); | 386 new NoTransportImageTransportFactory)); |
387 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); | 387 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); |
388 aura_test_helper_->SetUp( | 388 aura_test_helper_->SetUp( |
389 ImageTransportFactory::GetInstance()->GetContextFactory()); | 389 ImageTransportFactory::GetInstance()->GetContextFactory()); |
390 new wm::DefaultActivationClient(aura_test_helper_->root_window()); | 390 new wm::DefaultActivationClient(aura_test_helper_->root_window()); |
391 | 391 |
392 browser_context_.reset(new TestBrowserContext); | 392 browser_context_.reset(new TestBrowserContext); |
393 process_host_ = new MockRenderProcessHost(browser_context_.get()); | 393 process_host_ = new MockRenderProcessHost(browser_context_.get()); |
| 394 process_host_->Init(); |
394 | 395 |
395 sink_ = &process_host_->sink(); | 396 sink_ = &process_host_->sink(); |
396 | 397 |
397 parent_host_ = new RenderWidgetHostImpl( | 398 parent_host_ = new RenderWidgetHostImpl( |
398 &delegate_, process_host_, MSG_ROUTING_NONE, false); | 399 &delegate_, process_host_, MSG_ROUTING_NONE, false); |
399 parent_view_ = new RenderWidgetHostViewAura(parent_host_, | 400 parent_view_ = new RenderWidgetHostViewAura(parent_host_, |
400 is_guest_view_hack_); | 401 is_guest_view_hack_); |
401 parent_view_->InitAsChild(NULL); | 402 parent_view_->InitAsChild(NULL); |
402 aura::client::ParentWindowWithContext(parent_view_->GetNativeView(), | 403 aura::client::ParentWindowWithContext(parent_view_->GetNativeView(), |
403 aura_test_helper_->root_window(), | 404 aura_test_helper_->root_window(), |
(...skipping 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3569 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3570 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
3570 view_->InitAsChild(NULL); | 3571 view_->InitAsChild(NULL); |
3571 view_->Show(); | 3572 view_->Show(); |
3572 view_->SetSize(size); | 3573 view_->SetSize(size); |
3573 view_->OnSwapCompositorFrame(0, | 3574 view_->OnSwapCompositorFrame(0, |
3574 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3575 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
3575 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3576 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
3576 } | 3577 } |
3577 | 3578 |
3578 } // namespace content | 3579 } // namespace content |
OLD | NEW |