Chromium Code Reviews| 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 #ifndef CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 void AddPattern(const URLPattern& pattern); | 43 void AddPattern(const URLPattern& pattern); |
| 44 bool MatchesURL(const GURL& url) const; | 44 bool MatchesURL(const GURL& url) const; |
| 45 void ClearPatterns(); | 45 void ClearPatterns(); |
| 46 | 46 |
| 47 // Action icon path. | 47 // Action icon path. |
| 48 const std::string icon_path() const { return default_icon_path_; } | 48 const std::string icon_path() const { return default_icon_path_; } |
| 49 void set_icon_path(const std::string& path) { | 49 void set_icon_path(const std::string& path) { |
| 50 default_icon_path_ = path; | 50 default_icon_path_ = path; |
| 51 } | 51 } |
| 52 | 52 |
| 53 // File access permissions. | |
| 54 bool AddFileAccessPermission(const std::string& permission_str); | |
|
Yoyo Zhou
2012/03/26 22:42:58
Both these functions should have some documentatio
tbarzic
2012/03/26 23:22:51
Done.
| |
| 55 bool InvalidateFileAccessPermissions(); | |
|
Yoyo Zhou
2012/03/26 22:42:58
I think it'd be clearer if it was called ValidateF
tbarzic
2012/03/26 23:22:51
Done.
| |
| 56 bool CanRead() const; | |
| 57 bool CanWrite() const; | |
| 58 bool CanCreate() const; | |
| 59 | |
| 53 private: | 60 private: |
| 54 // The id for the extension this action belongs to (as defined in the | 61 // The id for the extension this action belongs to (as defined in the |
| 55 // extension manifest). | 62 // extension manifest). |
| 56 std::string extension_id_; | 63 std::string extension_id_; |
| 57 std::string title_; | 64 std::string title_; |
| 58 std::string default_icon_path_; | 65 std::string default_icon_path_; |
| 59 // The id for the FileBrowserHandler, for example: "PdfFileAction". | 66 // The id for the FileBrowserHandler, for example: "PdfFileAction". |
| 60 std::string id_; | 67 std::string id_; |
| 68 unsigned int file_access_permission_flags_; | |
| 69 | |
| 61 // A list of file filters. | 70 // A list of file filters. |
| 62 URLPatternSet url_set_; | 71 URLPatternSet url_set_; |
| 63 }; | 72 }; |
| 64 | 73 |
| 65 #endif // CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ | 74 #endif // CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ |
| OLD | NEW |