Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5129)

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 7880003: content: Move constrained window code from TabContents to TabContentsWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix views merge part 2 Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
+ }
}
}
« no previous file with comments | « no previous file | chrome/browser/instant/instant_loader.cc » ('j') | chrome/browser/ui/cocoa/constrained_window_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698