OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <CoreServices/CoreServices.h> | 9 #include <CoreServices/CoreServices.h> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/files/file_path.h" |
12 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
13 #include "base/files/file_path.h" | |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/mac/mac_logging.h" | 15 #include "base/mac/mac_logging.h" |
16 #import "base/mac/mac_util.h" | 16 #import "base/mac/mac_util.h" |
| 17 #include "base/mac/scoped_aedesc.h" |
17 #import "base/mac/sdk_forward_declarations.h" | 18 #import "base/mac/sdk_forward_declarations.h" |
18 #include "base/mac/scoped_aedesc.h" | |
19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
20 #include "chrome/browser/platform_util_internal.h" | 20 #include "chrome/browser/platform_util_internal.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace platform_util { | 24 namespace platform_util { |
25 | 25 |
26 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) { | 26 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) { |
27 DCHECK([NSThread isMainThread]); | 27 DCHECK([NSThread isMainThread]); |
28 NSString* path_string = base::SysUTF8ToNSString(full_path.value()); | 28 NSString* path_string = base::SysUTF8ToNSString(full_path.value()); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 [[view window] isVisible]); | 201 [[view window] isVisible]); |
202 } | 202 } |
203 | 203 |
204 bool IsSwipeTrackingFromScrollEventsEnabled() { | 204 bool IsSwipeTrackingFromScrollEventsEnabled() { |
205 SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled); | 205 SEL selector = @selector(isSwipeTrackingFromScrollEventsEnabled); |
206 return [NSEvent respondsToSelector:selector] | 206 return [NSEvent respondsToSelector:selector] |
207 && [NSEvent performSelector:selector]; | 207 && [NSEvent performSelector:selector]; |
208 } | 208 } |
209 | 209 |
210 } // namespace platform_util | 210 } // namespace platform_util |
OLD | NEW |