| 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_EXTENSIONS_MENU_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 enum Context { | 87 enum Context { |
| 88 ALL = 1, | 88 ALL = 1, |
| 89 PAGE = 2, | 89 PAGE = 2, |
| 90 SELECTION = 4, | 90 SELECTION = 4, |
| 91 LINK = 8, | 91 LINK = 8, |
| 92 EDITABLE = 16, | 92 EDITABLE = 16, |
| 93 IMAGE = 32, | 93 IMAGE = 32, |
| 94 VIDEO = 64, | 94 VIDEO = 64, |
| 95 AUDIO = 128, | 95 AUDIO = 128, |
| 96 FRAME = 256, | 96 FRAME = 256, |
| 97 LAUNCHER = 512 | 97 LAUNCHER = 512, |
| 98 BROWSER_ACTION = 1024, |
| 99 PAGE_ACTION = 2048 |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 // An item can be only one of these types. | 102 // An item can be only one of these types. |
| 101 enum Type { | 103 enum Type { |
| 102 NORMAL, | 104 NORMAL, |
| 103 CHECKBOX, | 105 CHECKBOX, |
| 104 RADIO, | 106 RADIO, |
| 105 SEPARATOR | 107 SEPARATOR |
| 106 }; | 108 }; |
| 107 | 109 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Simple accessor methods. | 162 // Simple accessor methods. |
| 161 bool incognito() const { return id_.incognito; } | 163 bool incognito() const { return id_.incognito; } |
| 162 const std::string& extension_id() const { | 164 const std::string& extension_id() const { |
| 163 return id_.extension_key.extension_id; | 165 return id_.extension_key.extension_id; |
| 164 } | 166 } |
| 165 const std::string& title() const { return title_; } | 167 const std::string& title() const { return title_; } |
| 166 const List& children() { return children_; } | 168 const List& children() { return children_; } |
| 167 const Id& id() const { return id_; } | 169 const Id& id() const { return id_; } |
| 168 Id* parent_id() const { return parent_id_.get(); } | 170 Id* parent_id() const { return parent_id_.get(); } |
| 169 int child_count() const { return children_.size(); } | 171 int child_count() const { return children_.size(); } |
| 170 ContextList contexts() const { return contexts_; } | 172 const ContextList& contexts() const { return contexts_; } |
| 171 Type type() const { return type_; } | 173 Type type() const { return type_; } |
| 172 bool checked() const { return checked_; } | 174 bool checked() const { return checked_; } |
| 173 bool enabled() const { return enabled_; } | 175 bool enabled() const { return enabled_; } |
| 174 const URLPatternSet& document_url_patterns() const { | 176 const URLPatternSet& document_url_patterns() const { |
| 175 return document_url_patterns_; | 177 return document_url_patterns_; |
| 176 } | 178 } |
| 177 const URLPatternSet& target_url_patterns() const { | 179 const URLPatternSet& target_url_patterns() const { |
| 178 return target_url_patterns_; | 180 return target_url_patterns_; |
| 179 } | 181 } |
| 180 | 182 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 401 |
| 400 // Owned by ExtensionSystem. | 402 // Owned by ExtensionSystem. |
| 401 StateStore* store_; | 403 StateStore* store_; |
| 402 | 404 |
| 403 DISALLOW_COPY_AND_ASSIGN(MenuManager); | 405 DISALLOW_COPY_AND_ASSIGN(MenuManager); |
| 404 }; | 406 }; |
| 405 | 407 |
| 406 } // namespace extensions | 408 } // namespace extensions |
| 407 | 409 |
| 408 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 410 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| OLD | NEW |