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/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 view_->InitAsFullscreen(parent_view_); | 324 view_->InitAsFullscreen(parent_view_); |
325 aura::Window* window = view_->GetNativeView(); | 325 aura::Window* window = view_->GetNativeView(); |
326 ASSERT_TRUE(window != NULL); | 326 ASSERT_TRUE(window != NULL); |
327 ASSERT_TRUE(window->HasFocus()); | 327 ASSERT_TRUE(window->HasFocus()); |
328 | 328 |
329 // After we create and focus another window, the RWHVA's window should be | 329 // After we create and focus another window, the RWHVA's window should be |
330 // destroyed. | 330 // destroyed. |
331 TestWindowObserver observer(window); | 331 TestWindowObserver observer(window); |
332 aura::test::TestWindowDelegate delegate; | 332 aura::test::TestWindowDelegate delegate; |
333 scoped_ptr<aura::Window> sibling(new aura::Window(&delegate)); | 333 scoped_ptr<aura::Window> sibling(new aura::Window(&delegate)); |
334 sibling->Init(ui::LAYER_TEXTURED); | 334 sibling->Init(aura::WINDOW_LAYER_TEXTURED); |
335 sibling->Show(); | 335 sibling->Show(); |
336 window->parent()->AddChild(sibling.get()); | 336 window->parent()->AddChild(sibling.get()); |
337 sibling->Focus(); | 337 sibling->Focus(); |
338 ASSERT_TRUE(sibling->HasFocus()); | 338 ASSERT_TRUE(sibling->HasFocus()); |
339 ASSERT_TRUE(observer.destroyed()); | 339 ASSERT_TRUE(observer.destroyed()); |
340 | 340 |
341 widget_host_ = NULL; | 341 widget_host_ = NULL; |
342 view_ = NULL; | 342 view_ = NULL; |
343 } | 343 } |
344 | 344 |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 view_->OnSwapCompositorFrame( | 1211 view_->OnSwapCompositorFrame( |
1212 1, MakeDelegatedFrame(2.f, frame_size, gfx::Rect(frame_size))); | 1212 1, MakeDelegatedFrame(2.f, frame_size, gfx::Rect(frame_size))); |
1213 | 1213 |
1214 // When we get a new frame with the same frame size in physical pixels, but a | 1214 // When we get a new frame with the same frame size in physical pixels, but a |
1215 // different scale, we should generate a new frame provider, as the final | 1215 // different scale, we should generate a new frame provider, as the final |
1216 // result will need to be scaled differently to the screen. | 1216 // result will need to be scaled differently to the screen. |
1217 EXPECT_NE(frame_provider.get(), view_->frame_provider_.get()); | 1217 EXPECT_NE(frame_provider.get(), view_->frame_provider_.get()); |
1218 } | 1218 } |
1219 | 1219 |
1220 } // namespace content | 1220 } // namespace content |
OLD | NEW |