Chromium Code Reviews| 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..532e6f36a926bd20be96df365eb74df074265716 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,13 @@ 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) |
|
Avi (use Gerrit)
2011/09/29 18:30:36
braces around content of if when it spans more tha
|
| + *count = static_cast<int>(wrapper->constrained_window_tab_helper()-> |
| + constrained_window_count()); |
| + } |
| } |
| } |