| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "content/public/browser/context_factory.h" | 6 #include "content/public/browser/context_factory.h" |
| 7 #include "content/shell/browser/shell_browser_context.h" | 7 #include "content/shell/browser/shell_browser_context.h" |
| 8 #include "ui/aura/test/test_screen.h" | 8 #include "ui/aura/test/test_screen.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/gfx/screen.h" | 10 #include "ui/gfx/screen.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const content::MainFunctionParams& content_params, | 58 const content::MainFunctionParams& content_params, |
| 59 ViewsContentClient* views_content_client) | 59 ViewsContentClient* views_content_client) |
| 60 : ViewsContentClientMainPartsAura(content_params, views_content_client) { | 60 : ViewsContentClientMainPartsAura(content_params, views_content_client) { |
| 61 } | 61 } |
| 62 | 62 |
| 63 void ViewsContentClientMainPartsChromeOS::PreMainMessageLoopRun() { | 63 void ViewsContentClientMainPartsChromeOS::PreMainMessageLoopRun() { |
| 64 ViewsContentClientMainPartsAura::PreMainMessageLoopRun(); | 64 ViewsContentClientMainPartsAura::PreMainMessageLoopRun(); |
| 65 | 65 |
| 66 gfx::Size host_size(800, 600); | 66 gfx::Size host_size(800, 600); |
| 67 test_screen_.reset(aura::TestScreen::Create(host_size)); | 67 test_screen_.reset(aura::TestScreen::Create(host_size)); |
| 68 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get()); | 68 gfx::Screen::SetScreenInstance(test_screen_.get()); |
| 69 // Set up basic pieces of views::corewm. | 69 // Set up basic pieces of views::corewm. |
| 70 wm_test_helper_.reset( | 70 wm_test_helper_.reset( |
| 71 new ::wm::WMTestHelper(host_size, content::GetContextFactory())); | 71 new ::wm::WMTestHelper(host_size, content::GetContextFactory())); |
| 72 // Ensure the X window gets mapped. | 72 // Ensure the X window gets mapped. |
| 73 wm_test_helper_->host()->Show(); | 73 wm_test_helper_->host()->Show(); |
| 74 | 74 |
| 75 // Ensure Aura knows where to open new windows. | 75 // Ensure Aura knows where to open new windows. |
| 76 aura::Window* root_window = wm_test_helper_->host()->window(); | 76 aura::Window* root_window = wm_test_helper_->host()->window(); |
| 77 views_content_client()->task().Run(browser_context(), root_window); | 77 views_content_client()->task().Run(browser_context(), root_window); |
| 78 | 78 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 95 | 95 |
| 96 // static | 96 // static |
| 97 ViewsContentClientMainParts* ViewsContentClientMainParts::Create( | 97 ViewsContentClientMainParts* ViewsContentClientMainParts::Create( |
| 98 const content::MainFunctionParams& content_params, | 98 const content::MainFunctionParams& content_params, |
| 99 ViewsContentClient* views_content_client) { | 99 ViewsContentClient* views_content_client) { |
| 100 return new ViewsContentClientMainPartsChromeOS( | 100 return new ViewsContentClientMainPartsChromeOS( |
| 101 content_params, views_content_client); | 101 content_params, views_content_client); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace ui | 104 } // namespace ui |
| OLD | NEW |