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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 #include "content/public/browser/web_contents.h" | 133 #include "content/public/browser/web_contents.h" |
134 #include "content/public/common/child_process_host.h" | 134 #include "content/public/common/child_process_host.h" |
135 #include "content/public/common/common_param_traits.h" | 135 #include "content/public/common/common_param_traits.h" |
136 #include "content/public/common/drop_data.h" | 136 #include "content/public/common/drop_data.h" |
137 #include "content/public/common/geoposition.h" | 137 #include "content/public/common/geoposition.h" |
138 #include "content/public/common/ssl_status.h" | 138 #include "content/public/common/ssl_status.h" |
139 #include "content/public/common/webplugininfo.h" | 139 #include "content/public/common/webplugininfo.h" |
140 #include "extensions/browser/process_manager.h" | 140 #include "extensions/browser/process_manager.h" |
141 #include "extensions/browser/view_type_utils.h" | 141 #include "extensions/browser/view_type_utils.h" |
142 #include "extensions/common/extension.h" | 142 #include "extensions/common/extension.h" |
| 143 #include "extensions/common/extension_set.h" |
143 #include "extensions/common/manifest_handlers/background_info.h" | 144 #include "extensions/common/manifest_handlers/background_info.h" |
144 #include "extensions/common/permissions/permission_set.h" | 145 #include "extensions/common/permissions/permission_set.h" |
145 #include "extensions/common/permissions/permissions_data.h" | 146 #include "extensions/common/permissions/permissions_data.h" |
146 #include "extensions/common/url_pattern.h" | 147 #include "extensions/common/url_pattern.h" |
147 #include "extensions/common/url_pattern_set.h" | 148 #include "extensions/common/url_pattern_set.h" |
148 #include "net/cookies/cookie_store.h" | 149 #include "net/cookies/cookie_store.h" |
149 #include "third_party/WebKit/public/web/WebInputEvent.h" | 150 #include "third_party/WebKit/public/web/WebInputEvent.h" |
150 #include "ui/base/ui_base_types.h" | 151 #include "ui/base/ui_base_types.h" |
151 #include "ui/events/event_constants.h" | 152 #include "ui/events/event_constants.h" |
152 #include "ui/events/keycodes/keyboard_codes.h" | 153 #include "ui/events/keycodes/keyboard_codes.h" |
(...skipping 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3528 return; | 3529 return; |
3529 } | 3530 } |
3530 ExtensionService* service = extensions::ExtensionSystem::Get( | 3531 ExtensionService* service = extensions::ExtensionSystem::Get( |
3531 browser->profile())->extension_service(); | 3532 browser->profile())->extension_service(); |
3532 if (!service) { | 3533 if (!service) { |
3533 reply.SendError("No extensions service."); | 3534 reply.SendError("No extensions service."); |
3534 return; | 3535 return; |
3535 } | 3536 } |
3536 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); | 3537 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); |
3537 ListValue* extensions_values = new ListValue; | 3538 ListValue* extensions_values = new ListValue; |
3538 const ExtensionSet* extensions = service->extensions(); | 3539 const extensions::ExtensionSet* extensions = service->extensions(); |
3539 const ExtensionSet* disabled_extensions = service->disabled_extensions(); | 3540 const extensions::ExtensionSet* disabled_extensions = |
| 3541 service->disabled_extensions(); |
3540 ExtensionList all; | 3542 ExtensionList all; |
3541 all.insert(all.end(), | 3543 all.insert(all.end(), |
3542 extensions->begin(), | 3544 extensions->begin(), |
3543 extensions->end()); | 3545 extensions->end()); |
3544 all.insert(all.end(), | 3546 all.insert(all.end(), |
3545 disabled_extensions->begin(), | 3547 disabled_extensions->begin(), |
3546 disabled_extensions->end()); | 3548 disabled_extensions->end()); |
3547 ExtensionActionManager* extension_action_manager = | 3549 ExtensionActionManager* extension_action_manager = |
3548 ExtensionActionManager::Get(browser->profile()); | 3550 ExtensionActionManager::Get(browser->profile()); |
3549 for (ExtensionList::const_iterator it = all.begin(); | 3551 for (ExtensionList::const_iterator it = all.begin(); |
(...skipping 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5456 if (g_browser_process) | 5458 if (g_browser_process) |
5457 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 5459 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
5458 } | 5460 } |
5459 | 5461 |
5460 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 5462 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
5461 WebContents* tab) { | 5463 WebContents* tab) { |
5462 TabStripModel* tab_strip = browser->tab_strip_model(); | 5464 TabStripModel* tab_strip = browser->tab_strip_model(); |
5463 if (tab_strip->GetActiveWebContents() != tab) | 5465 if (tab_strip->GetActiveWebContents() != tab) |
5464 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); | 5466 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); |
5465 } | 5467 } |
OLD | NEW |