Lines Matching defs:ExtensionMenuItem
24 ExtensionMenuItem::ExtensionMenuItem(const Id& id,
37 ExtensionMenuItem::~ExtensionMenuItem() {
41 ExtensionMenuItem* ExtensionMenuItem::ReleaseChild(const Id& child_id,
44 ExtensionMenuItem* child = NULL;
58 std::set<ExtensionMenuItem::Id> ExtensionMenuItem::RemoveAllDescendants() {
61 ExtensionMenuItem* child = *i;
70 string16 ExtensionMenuItem::TitleWithReplacement(
82 bool ExtensionMenuItem::SetChecked(bool checked) {
89 void ExtensionMenuItem::AddChild(ExtensionMenuItem* item) {
118 const ExtensionMenuItem::List* ExtensionMenuManager::MenuItems(
128 ExtensionMenuItem* item) {
141 if (item->type() == ExtensionMenuItem::RADIO && item->checked())
151 bool ExtensionMenuManager::AddChildItem(const ExtensionMenuItem::Id& parent_id,
152 ExtensionMenuItem* child) {
153 ExtensionMenuItem* parent = GetItemById(parent_id);
154 if (!parent || parent->type() != ExtensionMenuItem::NORMAL ||
164 ExtensionMenuItem* item,
165 const ExtensionMenuItem::Id& ancestor_id) {
167 ExtensionMenuItem::Id* id = item->parent_id();
172 ExtensionMenuItem* next = GetItemById(*id);
183 const ExtensionMenuItem::Id& child_id,
184 const ExtensionMenuItem::Id* parent_id) {
185 ExtensionMenuItem* child = GetItemById(child_id);
186 ExtensionMenuItem* new_parent = parent_id ? GetItemById(*parent_id) : NULL;
193 ExtensionMenuItem::Id* old_parent_id = child->parent_id();
195 ExtensionMenuItem* old_parent = GetItemById(*old_parent_id);
200 ExtensionMenuItem* taken =
211 ExtensionMenuItem::List& list = i->second;
212 ExtensionMenuItem::List::iterator j = std::find(list.begin(), list.end(),
231 const ExtensionMenuItem::Id& id) {
235 ExtensionMenuItem* menu_item = GetItemById(id);
245 std::set<ExtensionMenuItem::Id> items_removed;
246 ExtensionMenuItem::List& list = i->second;
247 ExtensionMenuItem::List::iterator j;
260 ExtensionMenuItem* child = (*j)->ReleaseChild(id, true /* recursive */);
273 std::set<ExtensionMenuItem::Id>::iterator removed_iter;
290 ExtensionMenuItem::List::iterator i;
293 ExtensionMenuItem* item = *i;
297 std::set<ExtensionMenuItem::Id> removed_ids = item->RemoveAllDescendants();
298 std::set<ExtensionMenuItem::Id>::const_iterator j;
308 ExtensionMenuItem* ExtensionMenuManager::GetItemById(
309 const ExtensionMenuItem::Id& id) const {
310 std::map<ExtensionMenuItem::Id, ExtensionMenuItem*>::const_iterator i =
318 void ExtensionMenuManager::RadioItemSelected(ExtensionMenuItem* item) {
321 const ExtensionMenuItem::List* list = NULL;
323 ExtensionMenuItem* parent = GetItemById(*item->parent_id());
338 ExtensionMenuItem::List::const_iterator item_location;
350 ExtensionMenuItem::List::const_iterator i;
355 if ((*i)->type() != ExtensionMenuItem::RADIO)
363 if ((*i)->type() != ExtensionMenuItem::RADIO)
379 const ExtensionMenuItem::Id& menuItemId) {
384 ExtensionMenuItem* item = GetItemById(menuItemId);
388 if (item->type() == ExtensionMenuItem::RADIO)
430 if (item->type() == ExtensionMenuItem::CHECKBOX ||
431 item->type() == ExtensionMenuItem::RADIO) {
438 (item->type() == ExtensionMenuItem::RADIO) ? true : !was_checked;
477 ExtensionMenuItem::Id::Id()
481 ExtensionMenuItem::Id::Id(Profile* profile,
487 ExtensionMenuItem::Id::~Id() {
490 bool ExtensionMenuItem::Id::operator==(const Id& other) const {
496 bool ExtensionMenuItem::Id::operator!=(const Id& other) const {
500 bool ExtensionMenuItem::Id::operator<(const Id& other) const {