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_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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 DVLOG(1) << "Found channel : " << win8::kMetroViewerIPCChannelName; | 1414 DVLOG(1) << "Found channel : " << win8::kMetroViewerIPCChannelName; |
1415 | 1415 |
1416 DCHECK(channel_listener_); | 1416 DCHECK(channel_listener_); |
1417 | 1417 |
1418 // In Aura mode we create an IPC channel to the browser, then ask it to | 1418 // In Aura mode we create an IPC channel to the browser, then ask it to |
1419 // connect to us. | 1419 // connect to us. |
1420 ui_channel_ = | 1420 ui_channel_ = |
1421 IPC::ChannelProxy::Create(win8::kMetroViewerIPCChannelName, | 1421 IPC::ChannelProxy::Create(win8::kMetroViewerIPCChannelName, |
1422 IPC::Channel::MODE_NAMED_CLIENT, | 1422 IPC::Channel::MODE_NAMED_CLIENT, |
1423 channel_listener_, | 1423 channel_listener_, |
1424 io_thread_->message_loop_proxy()); | 1424 io_thread_->task_runner()); |
1425 DVLOG(1) << "Created channel proxy"; | 1425 DVLOG(1) << "Created channel proxy"; |
1426 | 1426 |
1427 // Upon receipt of the MetroViewerHostMsg_SetTargetSurface message the | 1427 // Upon receipt of the MetroViewerHostMsg_SetTargetSurface message the |
1428 // browser will use D3D from the browser process to present to our Window. | 1428 // browser will use D3D from the browser process to present to our Window. |
1429 ui_channel_->Send(new MetroViewerHostMsg_SetTargetSurface( | 1429 ui_channel_->Send(new MetroViewerHostMsg_SetTargetSurface( |
1430 gfx::NativeViewId(core_window_hwnd_), | 1430 gfx::NativeViewId(core_window_hwnd_), |
1431 win32_dpi_scale_)); | 1431 win32_dpi_scale_)); |
1432 DVLOG(1) << "ICoreWindow sent " << core_window_hwnd_; | 1432 DVLOG(1) << "ICoreWindow sent " << core_window_hwnd_; |
1433 | 1433 |
1434 // Send an initial size message so that the Ash root window host gets sized | 1434 // Send an initial size message so that the Ash root window host gets sized |
(...skipping 25 matching lines...) Expand all Loading... |
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 } |
OLD | NEW |