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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 parent1->Init(ui::LAYER_TEXTURED); | 826 parent1->Init(ui::LAYER_TEXTURED); |
827 parent1->Show(); | 827 parent1->Show(); |
828 scoped_ptr<aura::Window> parent2(new aura::Window(&delegate2)); | 828 scoped_ptr<aura::Window> parent2(new aura::Window(&delegate2)); |
829 parent2->Init(ui::LAYER_TEXTURED); | 829 parent2->Init(ui::LAYER_TEXTURED); |
830 parent2->Show(); | 830 parent2->Show(); |
831 | 831 |
832 root->AddChild(parent1.get()); | 832 root->AddChild(parent1.get()); |
833 parent1->AddChild(parent2.get()); | 833 parent1->AddChild(parent2.get()); |
834 parent2->AddChild(view_->GetNativeView()); | 834 parent2->AddChild(view_->GetNativeView()); |
835 | 835 |
836 root->SetBounds(gfx::Rect(0, 0, 400, 400)); | 836 root->SetBounds(gfx::Rect(0, 0, 800, 600)); |
837 parent1->SetBounds(gfx::Rect(1, 1, 300, 300)); | 837 parent1->SetBounds(gfx::Rect(1, 1, 300, 300)); |
838 parent2->SetBounds(gfx::Rect(2, 2, 200, 200)); | 838 parent2->SetBounds(gfx::Rect(2, 2, 200, 200)); |
839 view_->SetBounds(gfx::Rect(3, 3, 100, 100)); | 839 view_->SetBounds(gfx::Rect(3, 3, 100, 100)); |
840 // view_ will be destroyed when parent is destroyed. | 840 // view_ will be destroyed when parent is destroyed. |
841 view_ = NULL; | 841 view_ = NULL; |
842 | 842 |
843 // Flush the state after initial setup is done. | 843 // Flush the state after initial setup is done. |
844 widget_host_->OnMessageReceived( | 844 widget_host_->OnMessageReceived( |
845 ViewHostMsg_UpdateScreenRects_ACK(widget_host_->GetRoutingID())); | 845 ViewHostMsg_UpdateScreenRects_ACK(widget_host_->GetRoutingID())); |
846 widget_host_->OnMessageReceived( | 846 widget_host_->OnMessageReceived( |
(...skipping 2785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3632 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3632 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
3633 view_->InitAsChild(NULL); | 3633 view_->InitAsChild(NULL); |
3634 view_->Show(); | 3634 view_->Show(); |
3635 view_->SetSize(size); | 3635 view_->SetSize(size); |
3636 view_->OnSwapCompositorFrame(0, | 3636 view_->OnSwapCompositorFrame(0, |
3637 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3637 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
3638 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3638 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
3639 } | 3639 } |
3640 | 3640 |
3641 } // namespace content | 3641 } // namespace content |
OLD | NEW |