| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3667 all.insert(all.end(), | 3667 all.insert(all.end(), |
| 3668 extensions->begin(), | 3668 extensions->begin(), |
| 3669 extensions->end()); | 3669 extensions->end()); |
| 3670 all.insert(all.end(), | 3670 all.insert(all.end(), |
| 3671 disabled_extensions->begin(), | 3671 disabled_extensions->begin(), |
| 3672 disabled_extensions->end()); | 3672 disabled_extensions->end()); |
| 3673 ExtensionActionManager* extension_action_manager = | 3673 ExtensionActionManager* extension_action_manager = |
| 3674 ExtensionActionManager::Get(browser->profile()); | 3674 ExtensionActionManager::Get(browser->profile()); |
| 3675 for (ExtensionList::const_iterator it = all.begin(); | 3675 for (ExtensionList::const_iterator it = all.begin(); |
| 3676 it != all.end(); ++it) { | 3676 it != all.end(); ++it) { |
| 3677 const Extension* extension = *it; | 3677 const Extension* extension = it->get(); |
| 3678 std::string id = extension->id(); | 3678 std::string id = extension->id(); |
| 3679 DictionaryValue* extension_value = new DictionaryValue; | 3679 DictionaryValue* extension_value = new DictionaryValue; |
| 3680 extension_value->SetString("id", id); | 3680 extension_value->SetString("id", id); |
| 3681 extension_value->SetString("version", extension->VersionString()); | 3681 extension_value->SetString("version", extension->VersionString()); |
| 3682 extension_value->SetString("name", extension->name()); | 3682 extension_value->SetString("name", extension->name()); |
| 3683 extension_value->SetString("public_key", extension->public_key()); | 3683 extension_value->SetString("public_key", extension->public_key()); |
| 3684 extension_value->SetString("description", extension->description()); | 3684 extension_value->SetString("description", extension->description()); |
| 3685 extension_value->SetString( | 3685 extension_value->SetString( |
| 3686 "background_url", | 3686 "background_url", |
| 3687 extensions::BackgroundInfo::GetBackgroundURL(extension).spec()); | 3687 extensions::BackgroundInfo::GetBackgroundURL(extension).spec()); |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5685 if (g_browser_process) | 5685 if (g_browser_process) |
| 5686 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 5686 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 5687 } | 5687 } |
| 5688 | 5688 |
| 5689 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 5689 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
| 5690 WebContents* tab) { | 5690 WebContents* tab) { |
| 5691 TabStripModel* tab_strip = browser->tab_strip_model(); | 5691 TabStripModel* tab_strip = browser->tab_strip_model(); |
| 5692 if (tab_strip->GetActiveWebContents() != tab) | 5692 if (tab_strip->GetActiveWebContents() != tab) |
| 5693 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); | 5693 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); |
| 5694 } | 5694 } |
| OLD | NEW |