| Index: chrome/browser/automation/testing_automation_provider.cc
|
| diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
|
| index bf88e8c5048e46120b26f20c1fc0643cf4afdba5..bc8578d557786e59450309c086b16e378cde6966 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.cc
|
| +++ b/chrome/browser/automation/testing_automation_provider.cc
|
| @@ -86,6 +86,7 @@
|
| #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
|
| #include "chrome/browser/ui/browser_init.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| +#include "chrome/browser/ui/constrained_window_tab_helper.h"
|
| #include "chrome/browser/ui/find_bar/find_bar.h"
|
| #include "chrome/browser/ui/login/login_prompt.h"
|
| #include "chrome/browser/ui/omnibox/location_bar.h"
|
| @@ -1356,8 +1357,14 @@ void TestingAutomationProvider::GetConstrainedWindowCount(int handle,
|
| if (tab_tracker_->ContainsHandle(handle)) {
|
| NavigationController* nav_controller = tab_tracker_->GetResource(handle);
|
| TabContents* tab_contents = nav_controller->tab_contents();
|
| - if (tab_contents)
|
| - *count = static_cast<int>(tab_contents->child_windows_.size());
|
| + if (tab_contents) {
|
| + TabContentsWrapper* wrapper =
|
| + TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
|
| + if (wrapper) {
|
| + *count = static_cast<int>(wrapper->constrained_window_tab_helper()->
|
| + constrained_window_count());
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|