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

Unified Diff: chrome/browser/ui/views/first_run_dialog.cc

Issue 280483003: wm: Change the DispatcherClient interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 6 years, 7 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
Index: chrome/browser/ui/views/first_run_dialog.cc
diff --git a/chrome/browser/ui/views/first_run_dialog.cc b/chrome/browser/ui/views/first_run_dialog.cc
index 15a1169ce08a521e026d583117c8a6e41b20be83..76671638ad550c0bbdc49bae8ffbec5c17f6dac5 100644
--- a/chrome/browser/ui/views/first_run_dialog.cc
+++ b/chrome/browser/ui/views/first_run_dialog.cc
@@ -66,7 +66,9 @@ bool FirstRunDialog::Show(Profile* profile) {
aura::Window* anchor = dialog->GetWidget()->GetNativeWindow();
aura::client::DispatcherClient* client =
aura::client::GetDispatcherClient(anchor->GetRootWindow());
- client->RunWithDispatcher(NULL);
+ aura::client::DispatcherRunLoop run_loop(client, NULL);
+ dialog->quit_runloop_ = run_loop.QuitClosure();
+ run_loop.Run();
dialog_shown = true;
}
#endif // defined(GOOGLE_CHROME_BUILD)
@@ -103,10 +105,8 @@ FirstRunDialog::~FirstRunDialog() {
}
void FirstRunDialog::Done() {
- aura::Window* window = GetWidget()->GetNativeView();
- aura::client::DispatcherClient* client =
- aura::client::GetDispatcherClient(window->GetRootWindow());
- client->QuitNestedMessageLoop();
+ CHECK(!quit_runloop_.is_null());
+ quit_runloop_.Run();
}
views::View* FirstRunDialog::CreateExtraView() {

Powered by Google App Engine
This is Rietveld 408576698