| OLD | NEW |
| 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/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 4644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4655 new ExtensionReadyNotificationObserver( | 4655 new ExtensionReadyNotificationObserver( |
| 4656 manager, | 4656 manager, |
| 4657 service, | 4657 service, |
| 4658 this, | 4658 this, |
| 4659 reply_message); | 4659 reply_message); |
| 4660 service->EnableExtension(extension->id()); | 4660 service->EnableExtension(extension->id()); |
| 4661 } else { | 4661 } else { |
| 4662 AutomationJSONReply(this, reply_message).SendSuccess(NULL); | 4662 AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
| 4663 } | 4663 } |
| 4664 } else { | 4664 } else { |
| 4665 service->DisableExtension(extension->id()); | 4665 service->DisableExtension(extension->id(), Extension::DISABLE_USER_ACTION); |
| 4666 AutomationJSONReply(this, reply_message).SendSuccess(NULL); | 4666 AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
| 4667 } | 4667 } |
| 4668 | 4668 |
| 4669 service->SetIsIncognitoEnabled(extension->id(), allow_in_incognito); | 4669 service->SetIsIncognitoEnabled(extension->id(), allow_in_incognito); |
| 4670 } | 4670 } |
| 4671 | 4671 |
| 4672 namespace { | 4672 namespace { |
| 4673 | 4673 |
| 4674 // Selects the given |browser| and |tab| if not selected already. | 4674 // Selects the given |browser| and |tab| if not selected already. |
| 4675 void EnsureTabSelected(Browser* browser, WebContents* tab) { | 4675 void EnsureTabSelected(Browser* browser, WebContents* tab) { |
| (...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7050 *browser_handle = browser_tracker_->Add(browser); | 7050 *browser_handle = browser_tracker_->Add(browser); |
| 7051 *success = true; | 7051 *success = true; |
| 7052 } | 7052 } |
| 7053 } | 7053 } |
| 7054 } | 7054 } |
| 7055 | 7055 |
| 7056 void TestingAutomationProvider::OnRemoveProvider() { | 7056 void TestingAutomationProvider::OnRemoveProvider() { |
| 7057 if (g_browser_process) | 7057 if (g_browser_process) |
| 7058 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 7058 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 7059 } | 7059 } |
| OLD | NEW |