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

Unified Diff: ui/views_content_client/views_content_client_main_parts_chromeos.cc

Issue 344833004: aura: Make sure TestScreen objects are destroyed properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views_content_client/views_content_client_main_parts_chromeos.cc
diff --git a/ui/views_content_client/views_content_client_main_parts_chromeos.cc b/ui/views_content_client/views_content_client_main_parts_chromeos.cc
index b1ba000db33cfdd84efdfec6b8f94f5e524580e4..b2d304e04b0fe74d27f39aba96a3cd26bb302293 100644
--- a/ui/views_content_client/views_content_client_main_parts_chromeos.cc
+++ b/ui/views_content_client/views_content_client_main_parts_chromeos.cc
@@ -47,6 +47,7 @@ class ViewsContentClientMainPartsChromeOS
private:
// Enable a minimal set of views::corewm to be initialized.
+ scoped_ptr<gfx::Screen> test_screen_;
scoped_ptr< ::wm::WMTestHelper> wm_test_helper_;
scoped_ptr< ::wm::NestedAcceleratorController> nested_accelerator_controller_;
@@ -63,8 +64,8 @@ void ViewsContentClientMainPartsChromeOS::PreMainMessageLoopRun() {
ViewsContentClientMainPartsAura::PreMainMessageLoopRun();
gfx::Size host_size(800, 600);
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
- aura::TestScreen::Create(host_size));
+ test_screen_.reset(aura::TestScreen::Create(host_size));
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
// Set up basic pieces of views::corewm.
wm_test_helper_.reset(
new ::wm::WMTestHelper(host_size, content::GetContextFactory()));
@@ -85,6 +86,7 @@ void ViewsContentClientMainPartsChromeOS::PostMainMessageLoopRun() {
aura::client::SetDispatcherClient(wm_test_helper_->host()->window(), NULL);
nested_accelerator_controller_.reset();
wm_test_helper_.reset();
+ test_screen_.reset();
ViewsContentClientMainPartsAura::PostMainMessageLoopRun();
}
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698