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

Unified Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 23592024: Make the metro viewer responsible for relaunching browser in desktop mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
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));
}
« ui/aura/remote_root_window_host_win.cc ('K') | « win8/metro_driver/chrome_app_view_ash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698