Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_PLATFORM_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PLATFORM_UTIL_H_ |
| 6 #define CHROME_BROWSER_PLATFORM_UTIL_H_ | 6 #define CHROME_BROWSER_PLATFORM_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 // was expected. I.e. OpenFile was called on a | 30 // was expected. I.e. OpenFile was called on a |
| 31 // folder or OpenFolder called on a file. | 31 // folder or OpenFolder called on a file. |
| 32 OPEN_FAILED_NO_HANLDER_FOR_FILE_TYPE, // There was no file handler capable of | 32 OPEN_FAILED_NO_HANLDER_FOR_FILE_TYPE, // There was no file handler capable of |
| 33 // opening file. Only returned on | 33 // opening file. Only returned on |
| 34 // ChromeOS. | 34 // ChromeOS. |
| 35 OPEN_FAILED_FILE_ERROR, // Open operation failed due to some other file | 35 OPEN_FAILED_FILE_ERROR, // Open operation failed due to some other file |
| 36 // error. | 36 // error. |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 // Type of item that is the target of the OpenItem() call. | 39 // Type of item that is the target of the OpenItem() call. |
| 40 enum OpenItemType { OPEN_FILE, OPEN_FOLDER }; | 40 enum OpenItemType { OPEN_FILE, OPEN_FOLDER, SHOW_ITEM_IN_FOLDER }; |
|
Lei Zhang
2016/04/19 21:51:25
You may want to make SHOW_ITEM_IN_FOLDER Linux-onl
maksims (do not use this acc)
2016/04/20 12:02:45
Done.
Lei Zhang
2016/04/20 20:45:57
Consider if the enum had many different values. Wo
| |
| 41 | 41 |
| 42 // Callback used with OpenFile and OpenFolder. | 42 // Callback used with OpenFile and OpenFolder. |
| 43 typedef base::Callback<void(OpenOperationResult)> OpenOperationCallback; | 43 typedef base::Callback<void(OpenOperationResult)> OpenOperationCallback; |
| 44 | 44 |
| 45 // Opens the item specified by |full_path|, which is expected to be the type | 45 // Opens the item specified by |full_path|, which is expected to be the type |
| 46 // indicated by |item_type| in the desktop's default manner. | 46 // indicated by |item_type| in the desktop's default manner. |
| 47 // |callback| will be invoked on the UI thread with the result of the open | 47 // |callback| will be invoked on the UI thread with the result of the open |
| 48 // operation. | 48 // operation. |
| 49 // | 49 // |
| 50 // It is an error if the object at |full_path| does not match the intended type | 50 // It is an error if the object at |full_path| does not match the intended type |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 // the feature is supported and enabled, and false otherwise. | 99 // the feature is supported and enabled, and false otherwise. |
| 100 bool IsSwipeTrackingFromScrollEventsEnabled(); | 100 bool IsSwipeTrackingFromScrollEventsEnabled(); |
| 101 #endif | 101 #endif |
| 102 | 102 |
| 103 #if BUILDFLAG(ANDROID_JAVA_UI) | 103 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 104 bool RegisterPlatformUtil(JNIEnv* env); | 104 bool RegisterPlatformUtil(JNIEnv* env); |
| 105 #endif | 105 #endif |
| 106 } // namespace platform_util | 106 } // namespace platform_util |
| 107 | 107 |
| 108 #endif // CHROME_BROWSER_PLATFORM_UTIL_H_ | 108 #endif // CHROME_BROWSER_PLATFORM_UTIL_H_ |
| OLD | NEW |