OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |