OLD | NEW |
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.h" | 6 #include "win8/metro_driver/chrome_app_view.h" |
7 #include "win8/metro_driver/direct3d_helper.h" | 7 #include "win8/metro_driver/direct3d_helper.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <windows.applicationModel.datatransfer.h> | 10 #include <windows.applicationModel.datatransfer.h> |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 << reinterpret_cast<int>(current_top_window.first); | 298 << reinterpret_cast<int>(current_top_window.first); |
299 AnimateWindow(current_top_window.first, kAnimateWindowTimeoutMs, | 299 AnimateWindow(current_top_window.first, kAnimateWindowTimeoutMs, |
300 AW_HIDE | AW_HOR_POSITIVE | AW_SLIDE); | 300 AW_HIDE | AW_HOR_POSITIVE | AW_SLIDE); |
301 | 301 |
302 globals.host_windows.push_back(current_top_window); | 302 globals.host_windows.push_back(current_top_window); |
303 } | 303 } |
304 } | 304 } |
305 | 305 |
306 } // namespace | 306 } // namespace |
307 | 307 |
308 HRESULT ChromeAppView::TileRequestCreateDone( | |
309 winfoundtn::IAsyncOperation<bool>* async, | |
310 AsyncStatus status) { | |
311 if (status == Completed) { | |
312 unsigned char result; | |
313 CheckHR(async->GetResults(&result)); | |
314 DVLOG(1) << __FUNCTION__ << " result " << static_cast<int>(result); | |
315 } else { | |
316 LOG(ERROR) << __FUNCTION__ << " Unexpected async status " << status; | |
317 } | |
318 | |
319 return S_OK; | |
320 } | |
321 | |
322 void ChromeAppView::DisplayNotification( | 308 void ChromeAppView::DisplayNotification( |
323 const ToastNotificationHandler::DesktopNotification& notification) { | 309 const ToastNotificationHandler::DesktopNotification& notification) { |
324 DVLOG(1) << __FUNCTION__; | 310 DVLOG(1) << __FUNCTION__; |
325 | 311 |
326 if (IsValidNotification(notification.id)) { | 312 if (IsValidNotification(notification.id)) { |
327 NOTREACHED() << "Duplicate notification id passed in."; | 313 NOTREACHED() << "Duplicate notification id passed in."; |
328 return; | 314 return; |
329 } | 315 } |
330 | 316 |
331 base::AutoLock lock(notification_lock_); | 317 base::AutoLock lock(notification_lock_); |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 CheckHR(core_app.As(&app_exit)); | 1190 CheckHR(core_app.As(&app_exit)); |
1205 globals.app_exit = app_exit.Detach(); | 1191 globals.app_exit = app_exit.Detach(); |
1206 } | 1192 } |
1207 | 1193 |
1208 IFACEMETHODIMP | 1194 IFACEMETHODIMP |
1209 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { | 1195 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { |
1210 globals.view = mswr::Make<ChromeAppView>().Detach(); | 1196 globals.view = mswr::Make<ChromeAppView>().Detach(); |
1211 *view = globals.view; | 1197 *view = globals.view; |
1212 return (*view) ? S_OK : E_OUTOFMEMORY; | 1198 return (*view) ? S_OK : E_OUTOFMEMORY; |
1213 } | 1199 } |
OLD | NEW |