| Index: win8/metro_driver/chrome_app_view_ash.cc
|
| diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc
|
| index 8686b53c3930d5fbd348e4f5e919d8bd9d523b8c..f410b64dce079fa70fd8251cfc6b877e9663000e 100644
|
| --- a/win8/metro_driver/chrome_app_view_ash.cc
|
| +++ b/win8/metro_driver/chrome_app_view_ash.cc
|
| @@ -83,6 +83,8 @@ class ChromeChannelListener : public IPC::Listener {
|
|
|
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
|
| IPC_BEGIN_MESSAGE_MAP(ChromeChannelListener, message)
|
| + IPC_MESSAGE_HANDLER(MetroViewerHostMsg_OpenURLOnDesktop,
|
| + OnOpenURLOnDesktop)
|
| IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetCursor, OnSetCursor)
|
| IPC_MESSAGE_HANDLER(MetroViewerHostMsg_DisplayFileOpen,
|
| OnDisplayFileOpenDialog)
|
| @@ -102,6 +104,13 @@ class ChromeChannelListener : public IPC::Listener {
|
| }
|
|
|
| private:
|
| + void OnOpenURLOnDesktop(const string16& shortcut, const string16& url) {
|
| + ui_proxy_->PostTask(FROM_HERE,
|
| + base::Bind(&ChromeAppViewAsh::OnOpenURLOnDesktop,
|
| + base::Unretained(app_view_),
|
| + shortcut, url));
|
| + }
|
| +
|
| void OnSetCursor(int64 cursor) {
|
| ui_proxy_->PostTask(FROM_HERE,
|
| base::Bind(&ChromeAppViewAsh::OnSetCursor,
|
| @@ -502,6 +511,17 @@ HRESULT ChromeAppViewAsh::Unsnap() {
|
| }
|
|
|
|
|
| +void ChromeAppViewAsh::OnOpenURLOnDesktop(const string16& shortcut,
|
| + const string16& url) {
|
| + SHELLEXECUTEINFO sei = { sizeof(sei) };
|
| + sei.fMask = SEE_MASK_FLAG_LOG_USAGE;
|
| + sei.nShow = SW_SHOWNORMAL;
|
| + sei.lpFile = shortcut.c_str();
|
| + sei.lpDirectory = L"";
|
| + sei.lpParameters = url.c_str();
|
| + BOOL result = ShellExecuteEx(&sei);
|
| +}
|
| +
|
| void ChromeAppViewAsh::OnSetCursor(HCURSOR cursor) {
|
| ::SetCursor(HCURSOR(cursor));
|
| }
|
|
|