Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: chrome/browser/extensions/menu_manager.h

Issue 459493002: Revert of Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
100 }; 98 };
101 99
102 // An item can be only one of these types. 100 // An item can be only one of these types.
103 enum Type { 101 enum Type {
104 NORMAL, 102 NORMAL,
105 CHECKBOX, 103 CHECKBOX,
106 RADIO, 104 RADIO,
107 SEPARATOR 105 SEPARATOR
108 }; 106 };
109 107
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Simple accessor methods. 160 // Simple accessor methods.
163 bool incognito() const { return id_.incognito; } 161 bool incognito() const { return id_.incognito; }
164 const std::string& extension_id() const { 162 const std::string& extension_id() const {
165 return id_.extension_key.extension_id; 163 return id_.extension_key.extension_id;
166 } 164 }
167 const std::string& title() const { return title_; } 165 const std::string& title() const { return title_; }
168 const List& children() { return children_; } 166 const List& children() { return children_; }
169 const Id& id() const { return id_; } 167 const Id& id() const { return id_; }
170 Id* parent_id() const { return parent_id_.get(); } 168 Id* parent_id() const { return parent_id_.get(); }
171 int child_count() const { return children_.size(); } 169 int child_count() const { return children_.size(); }
172 const ContextList& contexts() const { return contexts_; } 170 ContextList contexts() const { return contexts_; }
173 Type type() const { return type_; } 171 Type type() const { return type_; }
174 bool checked() const { return checked_; } 172 bool checked() const { return checked_; }
175 bool enabled() const { return enabled_; } 173 bool enabled() const { return enabled_; }
176 const URLPatternSet& document_url_patterns() const { 174 const URLPatternSet& document_url_patterns() const {
177 return document_url_patterns_; 175 return document_url_patterns_;
178 } 176 }
179 const URLPatternSet& target_url_patterns() const { 177 const URLPatternSet& target_url_patterns() const {
180 return target_url_patterns_; 178 return target_url_patterns_;
181 } 179 }
182 180
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 399
402 // Owned by ExtensionSystem. 400 // Owned by ExtensionSystem.
403 StateStore* store_; 401 StateStore* store_;
404 402
405 DISALLOW_COPY_AND_ASSIGN(MenuManager); 403 DISALLOW_COPY_AND_ASSIGN(MenuManager);
406 }; 404 };
407 405
408 } // namespace extensions 406 } // namespace extensions
409 407
410 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 408 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model_unittest.cc ('k') | chrome/browser/extensions/menu_manager_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698