OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |