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

Side by Side Diff: chrome/browser/extensions/extension_toolbar_model.cc

Issue 1152983004: Move ObserverList to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 #include "chrome/browser/extensions/extension_toolbar_model.h" 5 #include "chrome/browser/extensions/extension_toolbar_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 if (toolbar_items()[i]->id() == id) 632 if (toolbar_items()[i]->id() == id)
633 return i; 633 return i;
634 } 634 }
635 return -1; 635 return -1;
636 } 636 }
637 637
638 bool ExtensionToolbarModel::ShowExtensionActionPopup( 638 bool ExtensionToolbarModel::ShowExtensionActionPopup(
639 const Extension* extension, 639 const Extension* extension,
640 Browser* browser, 640 Browser* browser,
641 bool grant_active_tab) { 641 bool grant_active_tab) {
642 ObserverListBase<Observer>::Iterator it(&observers_); 642 base::ObserverListBase<Observer>::Iterator it(&observers_);
643 Observer* obs = NULL; 643 Observer* obs = NULL;
644 // Look for the Observer associated with the browser. 644 // Look for the Observer associated with the browser.
645 // This would be cleaner if we had an abstract class for the Toolbar UI 645 // This would be cleaner if we had an abstract class for the Toolbar UI
646 // (like we do for LocationBar), but sadly, we don't. 646 // (like we do for LocationBar), but sadly, we don't.
647 while ((obs = it.GetNext()) != NULL) { 647 while ((obs = it.GetNext()) != NULL) {
648 if (obs->GetBrowser() == browser) 648 if (obs->GetBrowser() == browser)
649 return obs->ShowExtensionActionPopup(extension, grant_active_tab); 649 return obs->ShowExtensionActionPopup(extension, grant_active_tab);
650 } 650 }
651 return false; 651 return false;
652 } 652 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 // Without the redesign, we only show extensions with browser actions. 737 // Without the redesign, we only show extensions with browser actions.
738 // Any extension without a browser action is an indication that we're 738 // Any extension without a browser action is an indication that we're
739 // showing something new. 739 // showing something new.
740 if (!extension->manifest()->HasKey(manifest_keys::kBrowserAction)) 740 if (!extension->manifest()->HasKey(manifest_keys::kBrowserAction))
741 return true; 741 return true;
742 } 742 }
743 return false; 743 return false;
744 } 744 }
745 745
746 } // namespace extensions 746 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698