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

Side by Side Diff: chrome/browser/platform_util_win.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include <commdlg.h> 7 #include <commdlg.h>
8 #include <dwmapi.h> 8 #include <dwmapi.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 case OPEN_FOLDER: 182 case OPEN_FOLDER:
183 utility_process_host->Send( 183 utility_process_host->Send(
184 new ChromeUtilityMsg_OpenFolderViaShell(full_path)); 184 new ChromeUtilityMsg_OpenFolderViaShell(full_path));
185 return; 185 return;
186 } 186 }
187 } 187 }
188 188
189 void ActivateDesktopIfNecessary() { 189 void ActivateDesktopIfNecessary() {
190 DCHECK_CURRENTLY_ON(BrowserThread::UI); 190 DCHECK_CURRENTLY_ON(BrowserThread::UI);
191 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) 191 if (chrome::GetActiveDesktop() == ui::HOST_DESKTOP_TYPE_ASH)
192 chrome::ActivateDesktopHelper(chrome::ASH_KEEP_RUNNING); 192 chrome::ActivateDesktopHelper(chrome::ASH_KEEP_RUNNING);
193 } 193 }
194 194
195 } // namespace 195 } // namespace
196 196
197 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) { 197 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
198 ActivateDesktopIfNecessary(); 198 ActivateDesktopIfNecessary();
199 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 199 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
200 base::Bind(&ShowItemInFolderOnFileThread, full_path)); 200 base::Bind(&ShowItemInFolderOnFileThread, full_path));
201 } 201 }
(...skipping 20 matching lines...) Expand all
222 break; 222 break;
223 } 223 }
224 } 224 }
225 } 225 }
226 226
227 } // namespace internal 227 } // namespace internal
228 228
229 void OpenExternal(Profile* profile, const GURL& url) { 229 void OpenExternal(Profile* profile, const GURL& url) {
230 DCHECK_CURRENTLY_ON(BrowserThread::UI); 230 DCHECK_CURRENTLY_ON(BrowserThread::UI);
231 231
232 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH && 232 if (chrome::GetActiveDesktop() == ui::HOST_DESKTOP_TYPE_ASH &&
233 !url.SchemeIsHTTPOrHTTPS()) 233 !url.SchemeIsHTTPOrHTTPS())
234 chrome::ActivateDesktopHelper(chrome::ASH_KEEP_RUNNING); 234 chrome::ActivateDesktopHelper(chrome::ASH_KEEP_RUNNING);
235 235
236 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 236 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
237 base::Bind(&OpenExternalOnFileThread, url)); 237 base::Bind(&OpenExternalOnFileThread, url));
238 } 238 }
239 239
240 } // namespace platform_util 240 } // namespace platform_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698