1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_LIST_H_
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_LIST_H_
9 #include "base/basictypes.h"
11 class AutomationProvider
;
13 // Stores a list of all AutomationProvider objects.
14 class AutomationProviderList
{
16 AutomationProviderList();
17 ~AutomationProviderList();
18 typedef std::vector
<AutomationProvider
*> list_type
;
19 typedef list_type::iterator iterator
;
20 typedef list_type::const_iterator const_iterator
;
22 // Adds and removes automation providers from the global list.
23 bool AddProvider(AutomationProvider
* provider
);
24 bool RemoveProvider(AutomationProvider
* provider
);
26 const_iterator
begin() {
27 return automation_providers_
.begin();
30 const_iterator
end() {
31 return automation_providers_
.end();
35 return automation_providers_
.size();
39 void OnLastProviderRemoved();
40 list_type automation_providers_
;
42 DISALLOW_COPY_AND_ASSIGN(AutomationProviderList
);
45 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_LIST_H_