| 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 "content/shell/browser/shell_browser_context.h" | 5 #include "content/shell/browser/shell_browser_context.h" |
| 6 #include "ui/aura/env.h" |
| 6 #include "ui/gfx/screen.h" | 7 #include "ui/gfx/screen.h" |
| 7 #include "ui/views/widget/desktop_aura/desktop_screen.h" | 8 #include "ui/views/widget/desktop_aura/desktop_screen.h" |
| 8 #include "ui/views_content_client/views_content_client.h" | 9 #include "ui/views_content_client/views_content_client.h" |
| 9 #include "ui/views_content_client/views_content_client_main_parts_aura.h" | 10 #include "ui/views_content_client/views_content_client_main_parts_aura.h" |
| 10 | 11 |
| 11 namespace ui { | 12 namespace ui { |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 class ViewsContentClientMainPartsDesktopAura | 16 class ViewsContentClientMainPartsDesktopAura |
| (...skipping 13 matching lines...) Expand all Loading... |
| 29 | 30 |
| 30 ViewsContentClientMainPartsDesktopAura::ViewsContentClientMainPartsDesktopAura( | 31 ViewsContentClientMainPartsDesktopAura::ViewsContentClientMainPartsDesktopAura( |
| 31 const content::MainFunctionParams& content_params, | 32 const content::MainFunctionParams& content_params, |
| 32 ViewsContentClient* views_content_client) | 33 ViewsContentClient* views_content_client) |
| 33 : ViewsContentClientMainPartsAura(content_params, views_content_client) { | 34 : ViewsContentClientMainPartsAura(content_params, views_content_client) { |
| 34 } | 35 } |
| 35 | 36 |
| 36 void ViewsContentClientMainPartsDesktopAura::PreMainMessageLoopRun() { | 37 void ViewsContentClientMainPartsDesktopAura::PreMainMessageLoopRun() { |
| 37 ViewsContentClientMainPartsAura::PreMainMessageLoopRun(); | 38 ViewsContentClientMainPartsAura::PreMainMessageLoopRun(); |
| 38 | 39 |
| 40 aura::Env::CreateInstance(true); |
| 39 gfx::Screen::SetScreenInstance( | 41 gfx::Screen::SetScreenInstance( |
| 40 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); | 42 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); |
| 41 | 43 |
| 42 views_content_client()->task().Run(browser_context(), NULL); | 44 views_content_client()->task().Run(browser_context(), NULL); |
| 43 } | 45 } |
| 44 | 46 |
| 45 } // namespace | 47 } // namespace |
| 46 | 48 |
| 47 // static | 49 // static |
| 48 ViewsContentClientMainParts* ViewsContentClientMainParts::Create( | 50 ViewsContentClientMainParts* ViewsContentClientMainParts::Create( |
| 49 const content::MainFunctionParams& content_params, | 51 const content::MainFunctionParams& content_params, |
| 50 ViewsContentClient* views_content_client) { | 52 ViewsContentClient* views_content_client) { |
| 51 return new ViewsContentClientMainPartsDesktopAura( | 53 return new ViewsContentClientMainPartsDesktopAura( |
| 52 content_params, views_content_client); | 54 content_params, views_content_client); |
| 53 } | 55 } |
| 54 | 56 |
| 55 } // namespace ui | 57 } // namespace ui |
| OLD | NEW |