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

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

Issue 909183002: win/aura: Remove some more non-aura code for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 204 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
205 205
206 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH && 206 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH &&
207 !url.SchemeIsHTTPOrHTTPS()) 207 !url.SchemeIsHTTPOrHTTPS())
208 chrome::ActivateDesktopHelper(chrome::ASH_KEEP_RUNNING); 208 chrome::ActivateDesktopHelper(chrome::ASH_KEEP_RUNNING);
209 209
210 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 210 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
211 base::Bind(&OpenExternalOnFileThread, url)); 211 base::Bind(&OpenExternalOnFileThread, url));
212 } 212 }
213 213
214 #if !defined(USE_AURA)
215 gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
216 return ::GetAncestor(view, GA_ROOT);
217 }
218
219 gfx::NativeView GetParent(gfx::NativeView view) {
220 return ::GetParent(view);
221 }
222
223 bool IsWindowActive(gfx::NativeWindow window) {
224 return ::GetForegroundWindow() == window;
225 }
226
227 void ActivateWindow(gfx::NativeWindow window) {
228 ::SetForegroundWindow(window);
229 }
230
231 bool IsVisible(gfx::NativeView view) {
232 // MSVC complains if we don't include != 0.
233 return ::IsWindowVisible(view) != 0;
234 }
235 #endif
236
237 } // namespace platform_util 214 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_util_win.cc ('k') | chrome/browser/process_singleton_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698