| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // action id | 31 // action id |
| 32 const std::string& id() const { return id_; } | 32 const std::string& id() const { return id_; } |
| 33 void set_id(const std::string& id) { id_ = id; } | 33 void set_id(const std::string& id) { id_ = id; } |
| 34 | 34 |
| 35 // default title | 35 // default title |
| 36 const std::string& title() const { return title_; } | 36 const std::string& title() const { return title_; } |
| 37 void set_title(const std::string& title) { title_ = title; } | 37 void set_title(const std::string& title) { title_ = title; } |
| 38 | 38 |
| 39 // File schema URL patterns. | 39 // File schema URL patterns. |
| 40 const URLPatternList& file_url_patterns() const { | 40 const URLPatternSet& file_url_patterns() const { |
| 41 return url_set_.patterns(); | 41 return url_set_; |
| 42 } | 42 } |
| 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 private: | 53 private: |
| 54 // The id for the extension this action belongs to (as defined in the | 54 // The id for the extension this action belongs to (as defined in the |
| 55 // extension manifest). | 55 // extension manifest). |
| 56 std::string extension_id_; | 56 std::string extension_id_; |
| 57 std::string title_; | 57 std::string title_; |
| 58 std::string default_icon_path_; | 58 std::string default_icon_path_; |
| 59 // The id for the FileBrowserHandler, for example: "PdfFileAction". | 59 // The id for the FileBrowserHandler, for example: "PdfFileAction". |
| 60 std::string id_; | 60 std::string id_; |
| 61 // A list of file filters. | 61 // A list of file filters. |
| 62 URLPatternSet url_set_; | 62 URLPatternSet url_set_; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 #endif // CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ | 65 #endif // CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_ |
| OLD | NEW |