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

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

Issue 113169: Move win_util.h from common to app. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/common.vcproj ('k') | chrome/common/win_safe_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/common/platform_util.h" 5 #include "chrome/common/platform_util.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlapp.h> 8 #include <atlapp.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #include <dwmapi.h> 10 #include <dwmapi.h>
11 #include <shellapi.h> 11 #include <shellapi.h>
12 #include <shlobj.h> 12 #include <shlobj.h>
13 13
14 #include "app/win_util.h"
14 #include "base/file_path.h" 15 #include "base/file_path.h"
15 #include "base/file_util.h" 16 #include "base/file_util.h"
16 #include "base/gfx/native_widget_types.h" 17 #include "base/gfx/native_widget_types.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/string_util.h" 19 #include "base/string_util.h"
19 #include "chrome/common/win_util.h"
20 20
21 namespace platform_util { 21 namespace platform_util {
22 22
23 void ShowItemInFolder(const FilePath& full_path) { 23 void ShowItemInFolder(const FilePath& full_path) {
24 FilePath dir = full_path.DirName(); 24 FilePath dir = full_path.DirName();
25 // ParseDisplayName will fail if the directory is "C:", it must be "C:\\". 25 // ParseDisplayName will fail if the directory is "C:", it must be "C:\\".
26 if (dir.value() == L"" || !file_util::EnsureEndsWithSeparator(&dir)) 26 if (dir.value() == L"" || !file_util::EnsureEndsWithSeparator(&dir))
27 return; 27 return;
28 28
29 typedef HRESULT (WINAPI *SHOpenFolderAndSelectItemsFuncPtr)( 29 typedef HRESULT (WINAPI *SHOpenFolderAndSelectItemsFuncPtr)(
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 int length = ::GetWindowTextLength(window_handle) + 1; 91 int length = ::GetWindowTextLength(window_handle) + 1;
92 ::GetWindowText(window_handle, WriteInto(&result, length), length); 92 ::GetWindowText(window_handle, WriteInto(&result, length), length);
93 return WideToUTF16(result); 93 return WideToUTF16(result);
94 } 94 }
95 95
96 bool IsWindowActive(gfx::NativeWindow window) { 96 bool IsWindowActive(gfx::NativeWindow window) {
97 return ::GetForegroundWindow() == window; 97 return ::GetForegroundWindow() == window;
98 } 98 }
99 99
100 } // namespace platform_util 100 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/common/common.vcproj ('k') | chrome/common/win_safe_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698