Home | History | Annotate | Download | only in extensions

Lines Matching refs:extension

11 #include "chrome/common/extensions/extension.h"
49 void ExtensionToolbarModel::MoveBrowserAction(const Extension* extension,
51 ExtensionList::iterator pos = std::find(begin(), end(), extension);
62 toolitems_.insert(iter, make_scoped_refptr(extension));
72 toolitems_.push_back(make_scoped_refptr(extension));
75 FOR_EACH_OBSERVER(Observer, observers_, BrowserActionMoved(extension, index));
97 const Extension* extension = NULL;
99 extension = Details<UnloadedExtensionInfo>(details)->extension;
101 extension = Details<const Extension>(details).ptr();
104 // We don't want to add the same extension twice. It may have already been
106 // hides the browser action and then disables and enables the extension.
108 if (toolitems_[i].get() == extension)
111 if (service_->GetBrowserActionVisibility(extension))
112 AddExtension(extension);
114 RemoveExtension(extension);
117 if (service_->GetBrowserActionVisibility(extension))
118 AddExtension(extension);
120 RemoveExtension(extension);
126 void ExtensionToolbarModel::AddExtension(const Extension* extension) {
128 if (!extension->browser_action())
131 if (extension->id() == last_extension_removed_ &&
134 make_scoped_refptr(extension));
136 BrowserActionAdded(extension, last_extension_removed_index_));
138 toolitems_.push_back(make_scoped_refptr(extension));
140 BrowserActionAdded(extension, toolitems_.size() - 1));
149 void ExtensionToolbarModel::RemoveExtension(const Extension* extension) {
150 ExtensionList::iterator pos = std::find(begin(), end(), extension);
155 last_extension_removed_ = extension->id();
160 BrowserActionRemoved(extension));
185 const Extension* extension = service_->extensions()->at(i);
186 if (!extension->browser_action())
188 if (!service_->GetBrowserActionVisibility(extension))
192 std::find(pref_order.begin(), pref_order.end(), extension->id());
195 sorted[index] = extension;
197 unsorted.push_back(make_scoped_refptr(extension));
233 const Extension* ExtensionToolbarModel::GetExtensionByIndex(int index) const {