Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: ui/views_content_client/views_content_client_main_parts_desktop_aura.cc

Issue 1293013002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
7 #include "ui/gfx/screen.h" 6 #include "ui/gfx/screen.h"
8 #include "ui/views/widget/desktop_aura/desktop_screen.h" 7 #include "ui/views/widget/desktop_aura/desktop_screen.h"
9 #include "ui/views_content_client/views_content_client.h" 8 #include "ui/views_content_client/views_content_client.h"
10 #include "ui/views_content_client/views_content_client_main_parts_aura.h" 9 #include "ui/views_content_client/views_content_client_main_parts_aura.h"
11 10
12 namespace ui { 11 namespace ui {
13 12
14 namespace { 13 namespace {
15 14
16 class ViewsContentClientMainPartsDesktopAura 15 class ViewsContentClientMainPartsDesktopAura
(...skipping 13 matching lines...) Expand all
30 29
31 ViewsContentClientMainPartsDesktopAura::ViewsContentClientMainPartsDesktopAura( 30 ViewsContentClientMainPartsDesktopAura::ViewsContentClientMainPartsDesktopAura(
32 const content::MainFunctionParams& content_params, 31 const content::MainFunctionParams& content_params,
33 ViewsContentClient* views_content_client) 32 ViewsContentClient* views_content_client)
34 : ViewsContentClientMainPartsAura(content_params, views_content_client) { 33 : ViewsContentClientMainPartsAura(content_params, views_content_client) {
35 } 34 }
36 35
37 void ViewsContentClientMainPartsDesktopAura::PreMainMessageLoopRun() { 36 void ViewsContentClientMainPartsDesktopAura::PreMainMessageLoopRun() {
38 ViewsContentClientMainPartsAura::PreMainMessageLoopRun(); 37 ViewsContentClientMainPartsAura::PreMainMessageLoopRun();
39 38
40 aura::Env::CreateInstance(true);
41 gfx::Screen::SetScreenInstance( 39 gfx::Screen::SetScreenInstance(
42 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); 40 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
43 41
44 views_content_client()->task().Run(browser_context(), NULL); 42 views_content_client()->task().Run(browser_context(), NULL);
45 } 43 }
46 44
47 } // namespace 45 } // namespace
48 46
49 // static 47 // static
50 ViewsContentClientMainParts* ViewsContentClientMainParts::Create( 48 ViewsContentClientMainParts* ViewsContentClientMainParts::Create(
51 const content::MainFunctionParams& content_params, 49 const content::MainFunctionParams& content_params,
52 ViewsContentClient* views_content_client) { 50 ViewsContentClient* views_content_client) {
53 return new ViewsContentClientMainPartsDesktopAura( 51 return new ViewsContentClientMainPartsDesktopAura(
54 content_params, views_content_client); 52 content_params, views_content_client);
55 } 53 }
56 54
57 } // namespace ui 55 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views_content_client/views_content_client_main_parts_aura.cc ('k') | ui/wm/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698