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

Unified Diff: ui/app_list/demo/app_list_demo_views.cc

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 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 | « ui/app_list/cocoa/app_list_window_controller_unittest.mm ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/demo/app_list_demo_views.cc
diff --git a/ui/app_list/demo/app_list_demo_views.cc b/ui/app_list/demo/app_list_demo_views.cc
index 29c165ff49bdd075c02fb94fd9d69af8028ecd4f..71a22516cded7b5058698a70f95de8040fce7c58 100644
--- a/ui/app_list/demo/app_list_demo_views.cc
+++ b/ui/app_list/demo/app_list_demo_views.cc
@@ -61,7 +61,6 @@ app_list::AppListView* DemoAppListViewDelegate::InitView(
container = window_context;
#endif
- // Note AppListView takes ownership of |this| on the next line.
view_ = new app_list::AppListView(this);
view_->InitAsBubbleAtFixedLocation(container,
0,
@@ -87,9 +86,9 @@ void DemoAppListViewDelegate::Dismiss() {
}
void DemoAppListViewDelegate::ViewClosing() {
- web_contents_.reset();
- view_ = NULL;
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoop* message_loop = base::MessageLoopForUI::current();
+ message_loop->DeleteSoon(FROM_HERE, this);
+ message_loop->QuitWhenIdle();
}
views::View* DemoAppListViewDelegate::CreateStartPageWebView(
« no previous file with comments | « ui/app_list/cocoa/app_list_window_controller_unittest.mm ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698