| 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/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 if (automation_) { | 500 if (automation_) { |
| 501 AutomationMsg_WaitForTabCountToBecome::WriteReplyParams( | 501 AutomationMsg_WaitForTabCountToBecome::WriteReplyParams( |
| 502 reply_message_.get(), true); | 502 reply_message_.get(), true); |
| 503 automation_->Send(reply_message_.release()); | 503 automation_->Send(reply_message_.release()); |
| 504 } | 504 } |
| 505 | 505 |
| 506 delete this; | 506 delete this; |
| 507 } | 507 } |
| 508 | 508 |
| 509 bool DidExtensionHostsStopLoading(ExtensionProcessManager* manager) { | 509 bool DidExtensionHostsStopLoading(ExtensionProcessManager* manager) { |
| 510 for (ExtensionProcessManager::const_iterator iter = manager->begin(); | 510 ExtensionProcessManager::ViewSet all_views = manager->GetAllViews(); |
| 511 iter != manager->end(); ++iter) { | 511 for (ExtensionProcessManager::ViewSet::const_iterator iter = |
| 512 if (!(*iter)->did_stop_loading()) | 512 all_views.begin(); |
| 513 iter != all_views.end(); ++iter) { |
| 514 if ((*iter)->IsLoading()) |
| 513 return false; | 515 return false; |
| 514 } | 516 } |
| 515 return true; | 517 return true; |
| 516 } | 518 } |
| 517 | 519 |
| 518 ExtensionUninstallObserver::ExtensionUninstallObserver( | 520 ExtensionUninstallObserver::ExtensionUninstallObserver( |
| 519 AutomationProvider* automation, | 521 AutomationProvider* automation, |
| 520 IPC::Message* reply_message, | 522 IPC::Message* reply_message, |
| 521 const std::string& id) | 523 const std::string& id) |
| 522 : automation_(automation->AsWeakPtr()), | 524 : automation_(automation->AsWeakPtr()), |
| (...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3053 } | 3055 } |
| 3054 | 3056 |
| 3055 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3057 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
| 3056 if (host->extension_id() == extension_id_ && | 3058 if (host->extension_id() == extension_id_ && |
| 3057 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3059 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 3058 AutomationJSONReply(automation_, reply_message_.release()) | 3060 AutomationJSONReply(automation_, reply_message_.release()) |
| 3059 .SendSuccess(NULL); | 3061 .SendSuccess(NULL); |
| 3060 delete this; | 3062 delete this; |
| 3061 } | 3063 } |
| 3062 } | 3064 } |
| OLD | NEW |