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

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

Issue 1297173003: Revert of 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"
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
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
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