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

Side by Side Diff: extensions/shell/browser/shell_desktop_controller_aura.cc

Issue 1389163008: Don't use base::MessageLoop::{Quit,QuitClosure} in extensions/, ipc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 "extensions/shell/browser/shell_desktop_controller_aura.h" 5 #include "extensions/shell/browser/shell_desktop_controller_aura.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 gfx::Size size = GetPrimaryDisplaySize(); 239 gfx::Size size = GetPrimaryDisplaySize();
240 if (!size.IsEmpty()) 240 if (!size.IsEmpty())
241 host_->UpdateRootWindowSize(size); 241 host_->UpdateRootWindowSize(size);
242 } 242 }
243 #endif 243 #endif
244 244
245 void ShellDesktopControllerAura::OnHostCloseRequested( 245 void ShellDesktopControllerAura::OnHostCloseRequested(
246 const aura::WindowTreeHost* host) { 246 const aura::WindowTreeHost* host) {
247 DCHECK_EQ(host_.get(), host); 247 DCHECK_EQ(host_.get(), host);
248 CloseAppWindows(); 248 CloseAppWindows();
249 base::MessageLoop::current()->PostTask(FROM_HERE, 249 base::MessageLoop::current()->PostTask(
250 base::MessageLoop::QuitClosure()); 250 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
251 } 251 }
252 252
253 void ShellDesktopControllerAura::InitWindowManager() { 253 void ShellDesktopControllerAura::InitWindowManager() {
254 wm::FocusController* focus_controller = 254 wm::FocusController* focus_controller =
255 new wm::FocusController(new AppsFocusRules()); 255 new wm::FocusController(new AppsFocusRules());
256 aura::client::SetFocusClient(host_->window(), focus_controller); 256 aura::client::SetFocusClient(host_->window(), focus_controller);
257 host_->window()->AddPreTargetHandler(focus_controller); 257 host_->window()->AddPreTargetHandler(focus_controller);
258 aura::client::SetActivationClient(host_->window(), focus_controller); 258 aura::client::SetActivationClient(host_->window(), focus_controller);
259 focus_client_.reset(focus_controller); 259 focus_client_.reset(focus_controller);
260 260
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (displays.empty()) 338 if (displays.empty())
339 return gfx::Size(); 339 return gfx::Size();
340 const ui::DisplayMode* mode = displays[0]->current_mode(); 340 const ui::DisplayMode* mode = displays[0]->current_mode();
341 return mode ? mode->size() : gfx::Size(); 341 return mode ? mode->size() : gfx::Size();
342 #else 342 #else
343 return gfx::Size(); 343 return gfx::Size();
344 #endif 344 #endif
345 } 345 }
346 346
347 } // namespace extensions 347 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/value_store/value_store_frontend_unittest.cc ('k') | extensions/test/extension_test_message_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698