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

Side by Side Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 1390513002: Remove base::MessageLoop::{Quit,QuitClosure} functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split into small CLs 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
« no previous file with comments | « win8/metro_driver/chrome_app_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "win8/metro_driver/stdafx.h" 5 #include "win8/metro_driver/stdafx.h"
6 #include "win8/metro_driver/chrome_app_view_ash.h" 6 #include "win8/metro_driver/chrome_app_view_ash.h"
7 7
8 #include <corewindow.h> 8 #include <corewindow.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <windows.foundation.h> 10 #include <windows.foundation.h>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Enter main core message loop. There are several ways to exit it 271 // Enter main core message loop. There are several ways to exit it
272 // Nicely: 272 // Nicely:
273 // 1 - User action like ALT-F4. 273 // 1 - User action like ALT-F4.
274 // 2 - Calling ICoreApplicationExit::Exit(). 274 // 2 - Calling ICoreApplicationExit::Exit().
275 // 3- Posting WM_CLOSE to the core window. 275 // 3- Posting WM_CLOSE to the core window.
276 dispatcher->ProcessEvents( 276 dispatcher->ProcessEvents(
277 winui::Core::CoreProcessEventsOption 277 winui::Core::CoreProcessEventsOption
278 ::CoreProcessEventsOption_ProcessUntilQuit); 278 ::CoreProcessEventsOption_ProcessUntilQuit);
279 279
280 // Wind down the thread's chrome message loop. 280 // Wind down the thread's chrome message loop.
281 base::MessageLoop::current()->Quit(); 281 base::MessageLoop::current()->QuitWhenIdle();
282 } 282 }
283 283
284 // Helper to return the state of the shift/control/alt keys. 284 // Helper to return the state of the shift/control/alt keys.
285 uint32 GetKeyboardEventFlags() { 285 uint32 GetKeyboardEventFlags() {
286 uint32 flags = 0; 286 uint32 flags = 0;
287 if (base::win::IsShiftPressed()) 287 if (base::win::IsShiftPressed())
288 flags |= ui::EF_SHIFT_DOWN; 288 flags |= ui::EF_SHIFT_DOWN;
289 if (base::win::IsCtrlPressed()) 289 if (base::win::IsCtrlPressed())
290 flags |= ui::EF_CONTROL_DOWN; 290 flags |= ui::EF_CONTROL_DOWN;
291 if (base::win::IsAltPressed()) 291 if (base::win::IsAltPressed())
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; 1460 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit;
1461 CheckHR(core_app.As(&app_exit)); 1461 CheckHR(core_app.As(&app_exit));
1462 globals.app_exit = app_exit.Detach(); 1462 globals.app_exit = app_exit.Detach();
1463 } 1463 }
1464 1464
1465 IFACEMETHODIMP 1465 IFACEMETHODIMP
1466 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { 1466 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) {
1467 *view = mswr::Make<ChromeAppViewAsh>().Detach(); 1467 *view = mswr::Make<ChromeAppViewAsh>().Detach();
1468 return (*view) ? S_OK : E_OUTOFMEMORY; 1468 return (*view) ? S_OK : E_OUTOFMEMORY;
1469 } 1469 }
OLDNEW
« no previous file with comments | « win8/metro_driver/chrome_app_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698